From ffec373e34178d8bd90f45c8a518f7ad572c4798 Mon Sep 17 00:00:00 2001 From: Rizwan Saeed Date: Fri, 2 Sep 2022 09:35:53 +0100 Subject: [PATCH] test generation for instrument discriminators --- lusid.json | 4721 ++++++++++++++++- sdk/README.md | 128 +- sdk/docs/AggregationApi.md | 14 +- sdk/docs/AllocationsApi.md | 26 +- sdk/docs/ApplicationMetadataApi.md | 20 +- sdk/docs/Barrier.md | 15 + sdk/docs/Basket.md | 15 + sdk/docs/BasketAllOf.md | 14 + sdk/docs/BasketIdentifier.md | 15 + sdk/docs/Bond.md | 23 + sdk/docs/BondAllOf.md | 22 + sdk/docs/CalendarsApi.md | 74 +- sdk/docs/CapFloor.md | 17 + sdk/docs/CapFloorAllOf.md | 16 + sdk/docs/CashPerpetual.md | 15 + sdk/docs/CashPerpetualAllOf.md | 14 + sdk/docs/CdsFlowConventions.md | 21 + sdk/docs/CdsIndex.md | 20 + sdk/docs/CdsIndexAllOf.md | 19 + sdk/docs/CdsProtectionDetailSpecification.md | 15 + sdk/docs/ComplexBond.md | 15 + sdk/docs/ComplexBondAllOf.md | 14 + sdk/docs/ComplexMarketDataApi.md | 20 +- sdk/docs/Compounding.md | 16 + sdk/docs/ConfigurationRecipeApi.md | 26 +- sdk/docs/ContractForDifference.md | 21 + sdk/docs/ContractForDifferenceAllOf.md | 20 + sdk/docs/CorporateActionSourcesApi.md | 26 +- sdk/docs/CreditDefaultSwap.md | 20 + sdk/docs/CreditDefaultSwapAllOf.md | 19 + sdk/docs/CreditSpreadCurveData.md | 20 + sdk/docs/CreditSpreadCurveDataAllOf.md | 19 + sdk/docs/CutLabelDefinitionsApi.md | 32 +- sdk/docs/DataTypesApi.md | 44 +- sdk/docs/DerivedTransactionPortfoliosApi.md | 14 +- sdk/docs/DiscountFactorCurveData.md | 16 + sdk/docs/DiscountFactorCurveDataAllOf.md | 15 + sdk/docs/EmptyModelOptions.md | 11 + sdk/docs/EmptyModelOptionsAllOf.md | 11 + sdk/docs/EntitiesApi.md | 8 +- sdk/docs/Equity.md | 14 + sdk/docs/EquityAllOf.md | 13 + sdk/docs/EquityAllOfIdentifiers.md | 22 + sdk/docs/EquityCurveByPricesData.md | 16 + sdk/docs/EquityCurveByPricesDataAllOf.md | 15 + sdk/docs/EquityModelOptions.md | 13 + sdk/docs/EquityModelOptionsAllOf.md | 12 + sdk/docs/EquityOption.md | 24 + sdk/docs/EquityOptionAllOf.md | 23 + sdk/docs/EquitySwap.md | 23 + sdk/docs/EquitySwapAllOf.md | 22 + sdk/docs/EquityVolSurfaceData.md | 16 + sdk/docs/EquityVolSurfaceDataAllOf.md | 15 + sdk/docs/ExchangeTradedOption.md | 16 + sdk/docs/ExchangeTradedOptionAllOf.md | 15 + .../ExchangeTradedOptionContractDetails.md | 24 + sdk/docs/ExecutionsApi.md | 26 +- sdk/docs/ExoticInstrument.md | 14 + sdk/docs/ExoticInstrumentAllOf.md | 13 + sdk/docs/FixedLeg.md | 17 + sdk/docs/FixedLegAllOf.md | 16 + sdk/docs/FixedLegAllOfOverrides.md | 13 + sdk/docs/FloatingLeg.md | 17 + sdk/docs/FloatingLegAllOf.md | 16 + sdk/docs/FlowConventionName.md | 14 + sdk/docs/FlowConventions.md | 22 + sdk/docs/ForwardRateAgreement.md | 19 + sdk/docs/ForwardRateAgreementAllOf.md | 18 + sdk/docs/FundingLeg.md | 16 + sdk/docs/FundingLegAllOf.md | 15 + sdk/docs/Future.md | 19 + sdk/docs/FutureAllOf.md | 18 + sdk/docs/FuturesContractDetails.md | 24 + sdk/docs/FxForward.md | 22 + sdk/docs/FxForwardAllOf.md | 21 + sdk/docs/FxForwardCurveByQuoteReference.md | 17 + .../FxForwardCurveByQuoteReferenceAllOf.md | 16 + sdk/docs/FxForwardCurveData.md | 18 + sdk/docs/FxForwardCurveDataAllOf.md | 17 + sdk/docs/FxForwardModelOptions.md | 14 + sdk/docs/FxForwardModelOptionsAllOf.md | 14 + sdk/docs/FxForwardPipsCurveData.md | 18 + sdk/docs/FxForwardPipsCurveDataAllOf.md | 17 + sdk/docs/FxForwardTenorCurveData.md | 18 + sdk/docs/FxForwardTenorCurveDataAllOf.md | 17 + sdk/docs/FxForwardTenorPipsCurveData.md | 18 + sdk/docs/FxForwardTenorPipsCurveDataAllOf.md | 17 + sdk/docs/FxOption.md | 28 + sdk/docs/FxOptionAllOf.md | 27 + sdk/docs/FxSwap.md | 15 + sdk/docs/FxSwapAllOf.md | 14 + sdk/docs/FxVolSurfaceData.md | 16 + sdk/docs/IndexConvention.md | 19 + sdk/docs/IndexModelOptions.md | 12 + sdk/docs/IndexModelOptionsAllOf.md | 12 + sdk/docs/InflationLinkedBond.md | 30 + sdk/docs/InflationLinkedBondAllOf.md | 29 + sdk/docs/InstrumentDefinitionFormat.md | 14 + sdk/docs/InstrumentLeg.md | 12 + sdk/docs/InstrumentLegAllOf.md | 11 + sdk/docs/InstrumentsApi.md | 62 +- sdk/docs/InterestRateSwap.md | 17 + sdk/docs/InterestRateSwapAllOf.md | 16 + sdk/docs/InterestRateSwaption.md | 17 + sdk/docs/InterestRateSwaptionAllOf.md | 16 + sdk/docs/IrVolCubeData.md | 16 + sdk/docs/IrVolCubeDataAllOf.md | 15 + sdk/docs/LegDefinition.md | 22 + sdk/docs/LegalEntitiesApi.md | 80 +- sdk/docs/LevelStep.md | 13 + sdk/docs/MarketQuote.md | 13 + sdk/docs/OpaqueMarketData.md | 16 + sdk/docs/OpaqueMarketDataAllOf.md | 15 + sdk/docs/OpaqueModelOptions.md | 12 + sdk/docs/OpaqueModelOptionsAllOf.md | 12 + sdk/docs/OrdersApi.md | 26 +- sdk/docs/PersonsApi.md | 32 +- sdk/docs/PortfolioGroupsApi.md | 140 +- sdk/docs/PortfolioResultDataKeyRule.md | 18 + sdk/docs/PortfolioResultDataKeyRuleAllOf.md | 18 + sdk/docs/PortfoliosApi.md | 110 +- sdk/docs/Premium.md | 14 + sdk/docs/PropertyDefinitionsApi.md | 38 +- sdk/docs/QuotesApi.md | 32 +- sdk/docs/ReconciliationsApi.md | 8 +- sdk/docs/ReferenceInstrument.md | 15 + sdk/docs/ReferenceInstrumentAllOf.md | 14 + sdk/docs/ReferencePortfolioApi.md | 26 +- sdk/docs/RelationshipDefinitionsApi.md | 32 +- sdk/docs/RelationshipsApi.md | 14 +- sdk/docs/Repo.md | 23 + sdk/docs/RepoAllOf.md | 22 + sdk/docs/ResultDataKeyRule.md | 5 +- sdk/docs/ResultDataKeyRuleAllOf.md | 18 + sdk/docs/Schedule.md | 12 + sdk/docs/ScopesApi.md | 8 +- sdk/docs/SearchApi.md | 20 +- sdk/docs/SequencesApi.md | 26 +- sdk/docs/SimpleInstrument.md | 17 + sdk/docs/SimpleInstrumentAllOf.md | 16 + sdk/docs/StepSchedule.md | 15 + sdk/docs/SystemConfigurationApi.md | 14 +- sdk/docs/TermDeposit.md | 18 + sdk/docs/TermDepositAllOf.md | 17 + sdk/docs/Touch.md | 15 + sdk/docs/TransactionPortfoliosApi.md | 132 +- sdk/docs/WeightedInstruments.md | 12 + sdk/docs/YieldCurveData.md | 16 + sdk/docs/YieldCurveDataAllOf.md | 15 + sdk/lusid/__init__.py | 128 +- sdk/lusid/api/transaction_portfolios_api.py | 4 +- sdk/lusid/configuration.py | 4 +- sdk/lusid/models/__init__.py | 118 + sdk/lusid/models/barrier.py | 240 + sdk/lusid/models/basket.py | 244 + sdk/lusid/models/basket_all_of.py | 244 + sdk/lusid/models/basket_identifier.py | 242 + sdk/lusid/models/bond.py | 492 ++ sdk/lusid/models/bond_all_of.py | 492 ++ sdk/lusid/models/cap_floor.py | 310 ++ sdk/lusid/models/cap_floor_all_of.py | 310 ++ sdk/lusid/models/cash_perpetual.py | 248 + sdk/lusid/models/cash_perpetual_all_of.py | 248 + sdk/lusid/models/cds_flow_conventions.py | 502 ++ sdk/lusid/models/cds_index.py | 400 ++ sdk/lusid/models/cds_index_all_of.py | 400 ++ .../cds_protection_detail_specification.py | 242 + sdk/lusid/models/complex_bond.py | 242 + sdk/lusid/models/complex_bond_all_of.py | 242 + sdk/lusid/models/complex_market_data.py | 13 + sdk/lusid/models/compounding.py | 271 + sdk/lusid/models/contract_for_difference.py | 438 ++ .../models/contract_for_difference_all_of.py | 438 ++ sdk/lusid/models/credit_default_swap.py | 398 ++ .../models/credit_default_swap_all_of.py | 398 ++ sdk/lusid/models/credit_spread_curve_data.py | 408 ++ .../models/credit_spread_curve_data_all_of.py | 408 ++ .../models/discount_factor_curve_data.py | 284 + .../discount_factor_curve_data_all_of.py | 284 + sdk/lusid/models/empty_model_options.py | 152 + .../models/empty_model_options_all_of.py | 152 + sdk/lusid/models/equity.py | 212 + sdk/lusid/models/equity_all_of.py | 212 + sdk/lusid/models/equity_all_of_identifiers.py | 433 ++ .../models/equity_curve_by_prices_data.py | 284 + .../equity_curve_by_prices_data_all_of.py | 284 + sdk/lusid/models/equity_model_options.py | 184 + .../models/equity_model_options_all_of.py | 184 + sdk/lusid/models/equity_option.py | 529 ++ sdk/lusid/models/equity_option_all_of.py | 529 ++ sdk/lusid/models/equity_swap.py | 498 ++ sdk/lusid/models/equity_swap_all_of.py | 498 ++ sdk/lusid/models/equity_vol_surface_data.py | 284 + .../models/equity_vol_surface_data_all_of.py | 284 + sdk/lusid/models/exchange_traded_option.py | 278 + .../models/exchange_traded_option_all_of.py | 278 + ...exchange_traded_option_contract_details.py | 528 ++ sdk/lusid/models/exotic_instrument.py | 214 + sdk/lusid/models/exotic_instrument_all_of.py | 214 + sdk/lusid/models/fixed_leg.py | 304 ++ sdk/lusid/models/fixed_leg_all_of.py | 304 ++ .../models/fixed_leg_all_of_overrides.py | 172 + sdk/lusid/models/floating_leg.py | 306 ++ sdk/lusid/models/floating_leg_all_of.py | 306 ++ sdk/lusid/models/flow_convention_name.py | 208 + sdk/lusid/models/flow_conventions.py | 496 ++ sdk/lusid/models/forward_rate_agreement.py | 373 ++ .../models/forward_rate_agreement_all_of.py | 373 ++ sdk/lusid/models/funding_leg.py | 276 + sdk/lusid/models/funding_leg_all_of.py | 276 + sdk/lusid/models/future.py | 369 ++ sdk/lusid/models/future_all_of.py | 369 ++ sdk/lusid/models/futures_contract_details.py | 526 ++ sdk/lusid/models/fx_forward.py | 467 ++ sdk/lusid/models/fx_forward_all_of.py | 467 ++ .../fx_forward_curve_by_quote_reference.py | 316 ++ ...forward_curve_by_quote_reference_all_of.py | 316 ++ sdk/lusid/models/fx_forward_curve_data.py | 348 ++ .../models/fx_forward_curve_data_all_of.py | 348 ++ sdk/lusid/models/fx_forward_model_options.py | 260 + .../models/fx_forward_model_options_all_of.py | 260 + .../models/fx_forward_pips_curve_data.py | 348 ++ .../fx_forward_pips_curve_data_all_of.py | 348 ++ .../models/fx_forward_tenor_curve_data.py | 348 ++ .../fx_forward_tenor_curve_data_all_of.py | 348 ++ .../fx_forward_tenor_pips_curve_data.py | 348 ++ ...fx_forward_tenor_pips_curve_data_all_of.py | 348 ++ sdk/lusid/models/fx_option.py | 646 +++ sdk/lusid/models/fx_option_all_of.py | 646 +++ sdk/lusid/models/fx_swap.py | 242 + sdk/lusid/models/fx_swap_all_of.py | 242 + sdk/lusid/models/fx_vol_surface_data.py | 284 + sdk/lusid/models/index_convention.py | 406 ++ sdk/lusid/models/index_model_options.py | 190 + .../models/index_model_options_all_of.py | 190 + sdk/lusid/models/inflation_linked_bond.py | 707 +++ .../models/inflation_linked_bond_all_of.py | 707 +++ .../models/instrument_definition_format.py | 210 + sdk/lusid/models/instrument_leg.py | 164 + sdk/lusid/models/instrument_leg_all_of.py | 152 + sdk/lusid/models/interest_rate_swap.py | 309 ++ sdk/lusid/models/interest_rate_swap_all_of.py | 309 ++ sdk/lusid/models/interest_rate_swaption.py | 307 ++ .../models/interest_rate_swaption_all_of.py | 307 ++ sdk/lusid/models/ir_vol_cube_data.py | 284 + sdk/lusid/models/ir_vol_cube_data_all_of.py | 284 + sdk/lusid/models/leg_definition.py | 446 ++ sdk/lusid/models/level_step.py | 178 + sdk/lusid/models/lusid_instrument.py | 26 + sdk/lusid/models/market_quote.py | 184 + sdk/lusid/models/model_options.py | 5 + sdk/lusid/models/opaque_market_data.py | 284 + sdk/lusid/models/opaque_market_data_all_of.py | 284 + sdk/lusid/models/opaque_model_options.py | 182 + .../models/opaque_model_options_all_of.py | 182 + .../models/portfolio_result_data_key_rule.py | 409 ++ .../portfolio_result_data_key_rule_all_of.py | 409 ++ sdk/lusid/models/premium.py | 210 + sdk/lusid/models/reference_instrument.py | 248 + .../models/reference_instrument_all_of.py | 248 + sdk/lusid/models/repo.py | 490 ++ sdk/lusid/models/repo_all_of.py | 490 ++ sdk/lusid/models/result_data_key_rule.py | 403 ++ .../models/result_data_key_rule_all_of.py | 403 ++ sdk/lusid/models/result_key_rule.py | 2 + sdk/lusid/models/schedule.py | 161 + sdk/lusid/models/simple_instrument.py | 315 ++ sdk/lusid/models/simple_instrument_all_of.py | 315 ++ sdk/lusid/models/step_schedule.py | 242 + sdk/lusid/models/term_deposit.py | 340 ++ sdk/lusid/models/term_deposit_all_of.py | 340 ++ sdk/lusid/models/touch.py | 240 + sdk/lusid/models/weighted_instruments.py | 146 + sdk/lusid/models/yield_curve_data.py | 284 + sdk/lusid/models/yield_curve_data_all_of.py | 284 + sdk/lusid/rest.py | 2 +- 276 files changed, 46177 insertions(+), 586 deletions(-) create mode 100644 sdk/docs/Barrier.md create mode 100644 sdk/docs/Basket.md create mode 100644 sdk/docs/BasketAllOf.md create mode 100644 sdk/docs/BasketIdentifier.md create mode 100644 sdk/docs/Bond.md create mode 100644 sdk/docs/BondAllOf.md create mode 100644 sdk/docs/CapFloor.md create mode 100644 sdk/docs/CapFloorAllOf.md create mode 100644 sdk/docs/CashPerpetual.md create mode 100644 sdk/docs/CashPerpetualAllOf.md create mode 100644 sdk/docs/CdsFlowConventions.md create mode 100644 sdk/docs/CdsIndex.md create mode 100644 sdk/docs/CdsIndexAllOf.md create mode 100644 sdk/docs/CdsProtectionDetailSpecification.md create mode 100644 sdk/docs/ComplexBond.md create mode 100644 sdk/docs/ComplexBondAllOf.md create mode 100644 sdk/docs/Compounding.md create mode 100644 sdk/docs/ContractForDifference.md create mode 100644 sdk/docs/ContractForDifferenceAllOf.md create mode 100644 sdk/docs/CreditDefaultSwap.md create mode 100644 sdk/docs/CreditDefaultSwapAllOf.md create mode 100644 sdk/docs/CreditSpreadCurveData.md create mode 100644 sdk/docs/CreditSpreadCurveDataAllOf.md create mode 100644 sdk/docs/DiscountFactorCurveData.md create mode 100644 sdk/docs/DiscountFactorCurveDataAllOf.md create mode 100644 sdk/docs/EmptyModelOptions.md create mode 100644 sdk/docs/EmptyModelOptionsAllOf.md create mode 100644 sdk/docs/Equity.md create mode 100644 sdk/docs/EquityAllOf.md create mode 100644 sdk/docs/EquityAllOfIdentifiers.md create mode 100644 sdk/docs/EquityCurveByPricesData.md create mode 100644 sdk/docs/EquityCurveByPricesDataAllOf.md create mode 100644 sdk/docs/EquityModelOptions.md create mode 100644 sdk/docs/EquityModelOptionsAllOf.md create mode 100644 sdk/docs/EquityOption.md create mode 100644 sdk/docs/EquityOptionAllOf.md create mode 100644 sdk/docs/EquitySwap.md create mode 100644 sdk/docs/EquitySwapAllOf.md create mode 100644 sdk/docs/EquityVolSurfaceData.md create mode 100644 sdk/docs/EquityVolSurfaceDataAllOf.md create mode 100644 sdk/docs/ExchangeTradedOption.md create mode 100644 sdk/docs/ExchangeTradedOptionAllOf.md create mode 100644 sdk/docs/ExchangeTradedOptionContractDetails.md create mode 100644 sdk/docs/ExoticInstrument.md create mode 100644 sdk/docs/ExoticInstrumentAllOf.md create mode 100644 sdk/docs/FixedLeg.md create mode 100644 sdk/docs/FixedLegAllOf.md create mode 100644 sdk/docs/FixedLegAllOfOverrides.md create mode 100644 sdk/docs/FloatingLeg.md create mode 100644 sdk/docs/FloatingLegAllOf.md create mode 100644 sdk/docs/FlowConventionName.md create mode 100644 sdk/docs/FlowConventions.md create mode 100644 sdk/docs/ForwardRateAgreement.md create mode 100644 sdk/docs/ForwardRateAgreementAllOf.md create mode 100644 sdk/docs/FundingLeg.md create mode 100644 sdk/docs/FundingLegAllOf.md create mode 100644 sdk/docs/Future.md create mode 100644 sdk/docs/FutureAllOf.md create mode 100644 sdk/docs/FuturesContractDetails.md create mode 100644 sdk/docs/FxForward.md create mode 100644 sdk/docs/FxForwardAllOf.md create mode 100644 sdk/docs/FxForwardCurveByQuoteReference.md create mode 100644 sdk/docs/FxForwardCurveByQuoteReferenceAllOf.md create mode 100644 sdk/docs/FxForwardCurveData.md create mode 100644 sdk/docs/FxForwardCurveDataAllOf.md create mode 100644 sdk/docs/FxForwardModelOptions.md create mode 100644 sdk/docs/FxForwardModelOptionsAllOf.md create mode 100644 sdk/docs/FxForwardPipsCurveData.md create mode 100644 sdk/docs/FxForwardPipsCurveDataAllOf.md create mode 100644 sdk/docs/FxForwardTenorCurveData.md create mode 100644 sdk/docs/FxForwardTenorCurveDataAllOf.md create mode 100644 sdk/docs/FxForwardTenorPipsCurveData.md create mode 100644 sdk/docs/FxForwardTenorPipsCurveDataAllOf.md create mode 100644 sdk/docs/FxOption.md create mode 100644 sdk/docs/FxOptionAllOf.md create mode 100644 sdk/docs/FxSwap.md create mode 100644 sdk/docs/FxSwapAllOf.md create mode 100644 sdk/docs/FxVolSurfaceData.md create mode 100644 sdk/docs/IndexConvention.md create mode 100644 sdk/docs/IndexModelOptions.md create mode 100644 sdk/docs/IndexModelOptionsAllOf.md create mode 100644 sdk/docs/InflationLinkedBond.md create mode 100644 sdk/docs/InflationLinkedBondAllOf.md create mode 100644 sdk/docs/InstrumentDefinitionFormat.md create mode 100644 sdk/docs/InstrumentLeg.md create mode 100644 sdk/docs/InstrumentLegAllOf.md create mode 100644 sdk/docs/InterestRateSwap.md create mode 100644 sdk/docs/InterestRateSwapAllOf.md create mode 100644 sdk/docs/InterestRateSwaption.md create mode 100644 sdk/docs/InterestRateSwaptionAllOf.md create mode 100644 sdk/docs/IrVolCubeData.md create mode 100644 sdk/docs/IrVolCubeDataAllOf.md create mode 100644 sdk/docs/LegDefinition.md create mode 100644 sdk/docs/LevelStep.md create mode 100644 sdk/docs/MarketQuote.md create mode 100644 sdk/docs/OpaqueMarketData.md create mode 100644 sdk/docs/OpaqueMarketDataAllOf.md create mode 100644 sdk/docs/OpaqueModelOptions.md create mode 100644 sdk/docs/OpaqueModelOptionsAllOf.md create mode 100644 sdk/docs/PortfolioResultDataKeyRule.md create mode 100644 sdk/docs/PortfolioResultDataKeyRuleAllOf.md create mode 100644 sdk/docs/Premium.md create mode 100644 sdk/docs/ReferenceInstrument.md create mode 100644 sdk/docs/ReferenceInstrumentAllOf.md create mode 100644 sdk/docs/Repo.md create mode 100644 sdk/docs/RepoAllOf.md create mode 100644 sdk/docs/ResultDataKeyRuleAllOf.md create mode 100644 sdk/docs/Schedule.md create mode 100644 sdk/docs/SimpleInstrument.md create mode 100644 sdk/docs/SimpleInstrumentAllOf.md create mode 100644 sdk/docs/StepSchedule.md create mode 100644 sdk/docs/TermDeposit.md create mode 100644 sdk/docs/TermDepositAllOf.md create mode 100644 sdk/docs/Touch.md create mode 100644 sdk/docs/WeightedInstruments.md create mode 100644 sdk/docs/YieldCurveData.md create mode 100644 sdk/docs/YieldCurveDataAllOf.md create mode 100644 sdk/lusid/models/barrier.py create mode 100644 sdk/lusid/models/basket.py create mode 100644 sdk/lusid/models/basket_all_of.py create mode 100644 sdk/lusid/models/basket_identifier.py create mode 100644 sdk/lusid/models/bond.py create mode 100644 sdk/lusid/models/bond_all_of.py create mode 100644 sdk/lusid/models/cap_floor.py create mode 100644 sdk/lusid/models/cap_floor_all_of.py create mode 100644 sdk/lusid/models/cash_perpetual.py create mode 100644 sdk/lusid/models/cash_perpetual_all_of.py create mode 100644 sdk/lusid/models/cds_flow_conventions.py create mode 100644 sdk/lusid/models/cds_index.py create mode 100644 sdk/lusid/models/cds_index_all_of.py create mode 100644 sdk/lusid/models/cds_protection_detail_specification.py create mode 100644 sdk/lusid/models/complex_bond.py create mode 100644 sdk/lusid/models/complex_bond_all_of.py create mode 100644 sdk/lusid/models/compounding.py create mode 100644 sdk/lusid/models/contract_for_difference.py create mode 100644 sdk/lusid/models/contract_for_difference_all_of.py create mode 100644 sdk/lusid/models/credit_default_swap.py create mode 100644 sdk/lusid/models/credit_default_swap_all_of.py create mode 100644 sdk/lusid/models/credit_spread_curve_data.py create mode 100644 sdk/lusid/models/credit_spread_curve_data_all_of.py create mode 100644 sdk/lusid/models/discount_factor_curve_data.py create mode 100644 sdk/lusid/models/discount_factor_curve_data_all_of.py create mode 100644 sdk/lusid/models/empty_model_options.py create mode 100644 sdk/lusid/models/empty_model_options_all_of.py create mode 100644 sdk/lusid/models/equity.py create mode 100644 sdk/lusid/models/equity_all_of.py create mode 100644 sdk/lusid/models/equity_all_of_identifiers.py create mode 100644 sdk/lusid/models/equity_curve_by_prices_data.py create mode 100644 sdk/lusid/models/equity_curve_by_prices_data_all_of.py create mode 100644 sdk/lusid/models/equity_model_options.py create mode 100644 sdk/lusid/models/equity_model_options_all_of.py create mode 100644 sdk/lusid/models/equity_option.py create mode 100644 sdk/lusid/models/equity_option_all_of.py create mode 100644 sdk/lusid/models/equity_swap.py create mode 100644 sdk/lusid/models/equity_swap_all_of.py create mode 100644 sdk/lusid/models/equity_vol_surface_data.py create mode 100644 sdk/lusid/models/equity_vol_surface_data_all_of.py create mode 100644 sdk/lusid/models/exchange_traded_option.py create mode 100644 sdk/lusid/models/exchange_traded_option_all_of.py create mode 100644 sdk/lusid/models/exchange_traded_option_contract_details.py create mode 100644 sdk/lusid/models/exotic_instrument.py create mode 100644 sdk/lusid/models/exotic_instrument_all_of.py create mode 100644 sdk/lusid/models/fixed_leg.py create mode 100644 sdk/lusid/models/fixed_leg_all_of.py create mode 100644 sdk/lusid/models/fixed_leg_all_of_overrides.py create mode 100644 sdk/lusid/models/floating_leg.py create mode 100644 sdk/lusid/models/floating_leg_all_of.py create mode 100644 sdk/lusid/models/flow_convention_name.py create mode 100644 sdk/lusid/models/flow_conventions.py create mode 100644 sdk/lusid/models/forward_rate_agreement.py create mode 100644 sdk/lusid/models/forward_rate_agreement_all_of.py create mode 100644 sdk/lusid/models/funding_leg.py create mode 100644 sdk/lusid/models/funding_leg_all_of.py create mode 100644 sdk/lusid/models/future.py create mode 100644 sdk/lusid/models/future_all_of.py create mode 100644 sdk/lusid/models/futures_contract_details.py create mode 100644 sdk/lusid/models/fx_forward.py create mode 100644 sdk/lusid/models/fx_forward_all_of.py create mode 100644 sdk/lusid/models/fx_forward_curve_by_quote_reference.py create mode 100644 sdk/lusid/models/fx_forward_curve_by_quote_reference_all_of.py create mode 100644 sdk/lusid/models/fx_forward_curve_data.py create mode 100644 sdk/lusid/models/fx_forward_curve_data_all_of.py create mode 100644 sdk/lusid/models/fx_forward_model_options.py create mode 100644 sdk/lusid/models/fx_forward_model_options_all_of.py create mode 100644 sdk/lusid/models/fx_forward_pips_curve_data.py create mode 100644 sdk/lusid/models/fx_forward_pips_curve_data_all_of.py create mode 100644 sdk/lusid/models/fx_forward_tenor_curve_data.py create mode 100644 sdk/lusid/models/fx_forward_tenor_curve_data_all_of.py create mode 100644 sdk/lusid/models/fx_forward_tenor_pips_curve_data.py create mode 100644 sdk/lusid/models/fx_forward_tenor_pips_curve_data_all_of.py create mode 100644 sdk/lusid/models/fx_option.py create mode 100644 sdk/lusid/models/fx_option_all_of.py create mode 100644 sdk/lusid/models/fx_swap.py create mode 100644 sdk/lusid/models/fx_swap_all_of.py create mode 100644 sdk/lusid/models/fx_vol_surface_data.py create mode 100644 sdk/lusid/models/index_convention.py create mode 100644 sdk/lusid/models/index_model_options.py create mode 100644 sdk/lusid/models/index_model_options_all_of.py create mode 100644 sdk/lusid/models/inflation_linked_bond.py create mode 100644 sdk/lusid/models/inflation_linked_bond_all_of.py create mode 100644 sdk/lusid/models/instrument_definition_format.py create mode 100644 sdk/lusid/models/instrument_leg.py create mode 100644 sdk/lusid/models/instrument_leg_all_of.py create mode 100644 sdk/lusid/models/interest_rate_swap.py create mode 100644 sdk/lusid/models/interest_rate_swap_all_of.py create mode 100644 sdk/lusid/models/interest_rate_swaption.py create mode 100644 sdk/lusid/models/interest_rate_swaption_all_of.py create mode 100644 sdk/lusid/models/ir_vol_cube_data.py create mode 100644 sdk/lusid/models/ir_vol_cube_data_all_of.py create mode 100644 sdk/lusid/models/leg_definition.py create mode 100644 sdk/lusid/models/level_step.py create mode 100644 sdk/lusid/models/market_quote.py create mode 100644 sdk/lusid/models/opaque_market_data.py create mode 100644 sdk/lusid/models/opaque_market_data_all_of.py create mode 100644 sdk/lusid/models/opaque_model_options.py create mode 100644 sdk/lusid/models/opaque_model_options_all_of.py create mode 100644 sdk/lusid/models/portfolio_result_data_key_rule.py create mode 100644 sdk/lusid/models/portfolio_result_data_key_rule_all_of.py create mode 100644 sdk/lusid/models/premium.py create mode 100644 sdk/lusid/models/reference_instrument.py create mode 100644 sdk/lusid/models/reference_instrument_all_of.py create mode 100644 sdk/lusid/models/repo.py create mode 100644 sdk/lusid/models/repo_all_of.py create mode 100644 sdk/lusid/models/result_data_key_rule.py create mode 100644 sdk/lusid/models/result_data_key_rule_all_of.py create mode 100644 sdk/lusid/models/schedule.py create mode 100644 sdk/lusid/models/simple_instrument.py create mode 100644 sdk/lusid/models/simple_instrument_all_of.py create mode 100644 sdk/lusid/models/step_schedule.py create mode 100644 sdk/lusid/models/term_deposit.py create mode 100644 sdk/lusid/models/term_deposit_all_of.py create mode 100644 sdk/lusid/models/touch.py create mode 100644 sdk/lusid/models/weighted_instruments.py create mode 100644 sdk/lusid/models/yield_curve_data.py create mode 100644 sdk/lusid/models/yield_curve_data_all_of.py diff --git a/lusid.json b/lusid.json index 3995a9c6af2..de9d5bba91d 100644 --- a/lusid.json +++ b/lusid.json @@ -17,7 +17,7 @@ }, "servers": [ { - "url": "https://www.lusid.com/api" + "url": "https://fbn-ci.lusid.com/api" } ], "paths": { @@ -41375,14 +41375,14 @@ { "name": "propertyKeys", "in": "query", - "description": "A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments.\r\n These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'.\r\n Note that properties from the 'Holding’ domain are automatically returned.", + "description": "A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments.\r\n These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'.\r\n Note that properties from the 'Holding’ domain are automatically returned.", "schema": { "type": "array", "items": { "type": "string", "description": "The key that uniquely identifies the property. It has the format {domain}/{scope}/{code}." }, - "description": "A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments.\r\n These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'.\r\n Note that properties from the 'Holding’ domain are automatically returned.", + "description": "A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments.\r\n These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'.\r\n Note that properties from the 'Holding’ domain are automatically returned.", "nullable": true }, "x-nullable": true @@ -44760,6 +44760,251 @@ "additionalProperties": false, "description": "The response to a request to annul (delete) a set of structured data from Lusid. This might have been for market data or some other structured entity." }, + "Barrier": { + "required": [ + "direction", + "level", + "type" + ], + "type": "object", + "properties": { + "direction": { + "type": "string", + "description": "Supported string (enumeration) values are: [Down, Up]." + }, + "level": { + "type": "number", + "description": "Trigger level, which the underlying should (or should not) cross/touch.", + "format": "double" + }, + "monitoring": { + "type": "string", + "description": "Supported string (enumeration) values are: [European, Bermudan, American].", + "nullable": true + }, + "type": { + "type": "string", + "description": "Supported string (enumeration) values are: [Knockin, Knockout]." + } + }, + "additionalProperties": false, + "description": "Barrier class for exotic FxOption" + }, + "Basket": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "basketName", + "basketType", + "instrumentType", + "weightedInstruments" + ], + "type": "object", + "properties": { + "basketName": { + "$ref": "#/components/schemas/BasketIdentifier" + }, + "basketType": { + "type": "string", + "description": "What contents does the basket have. The validation will check that the instrument types contained match those expected.\r\n\r\nSupported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]." + }, + "weightedInstruments": { + "$ref": "#/components/schemas/WeightedInstruments" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a basket of instruments." + }, + "BasketIdentifier": { + "required": [ + "index", + "name", + "region", + "seriesId" + ], + "type": "object", + "properties": { + "index": { + "type": "string", + "description": "Index set, e.g. iTraxx or CDX." + }, + "name": { + "type": "string", + "description": "The index name within the set, e.g. \"MAIN\" or \"Crossover\"." + }, + "region": { + "type": "string", + "description": "Applicable geographic country or region. Typically something like \"Europe\", \"Asia ex-Japan\", \"Japan\" or \"Australia\"." + }, + "seriesId": { + "type": "integer", + "description": "The series identifier.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Descriptive information that describes a particular basket of instruments. Most commonly required with a CDS Index or similarly defined instrument." + }, + "Bond": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "couponRate", + "domCcy", + "flowConventions", + "instrumentType", + "maturityDate", + "principal", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the bond's first coupon start date or accrual state date (if settle days = 0)", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "flowConventions": { + "$ref": "#/components/schemas/FlowConventions" + }, + "principal": { + "type": "number", + "description": "The face-value or principal for the bond at outset.\r\nThis might be reduced through its lifetime in the event of amortisation or similar.", + "format": "double" + }, + "couponRate": { + "type": "number", + "description": "Simple coupon rate.", + "format": "double" + }, + "identifiers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "External market codes and identifiers for the bond, e.g. ISIN.", + "nullable": true + }, + "exDividendDays": { + "type": "integer", + "description": "Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period\r\nthen the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date).", + "format": "int32", + "nullable": true + }, + "initialCouponDate": { + "type": "string", + "description": "The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to\r\ngenerate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest.", + "format": "date-time", + "nullable": true + }, + "firstCouponPayDate": { + "type": "string", + "description": "The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used\r\nas an anchor to compare with the start date and determine if this is a long/short coupon period.", + "format": "date-time", + "nullable": true + }, + "calculationType": { + "type": "string", + "description": "The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding,\r\nirregular coupons etc.\r\nThe default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency.\r\nPayment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively.\r\n\r\nSupported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon].", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Vanilla Fixed Rate Bond." + }, "Calendar": { "required": [ "id", @@ -44849,6 +45094,86 @@ }, "additionalProperties": false }, + "CapFloor": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "capFloorType", + "capStrike", + "floorStrike", + "includeFirstCaplet", + "instrumentType", + "underlyingFloatingLeg" + ], + "type": "object", + "properties": { + "capFloorType": { + "type": "string", + "description": "Determine if it's CAP, FLOOR, or COLLAR.\r\n\r\nSupported string (enumeration) values are: [Cap, Floor, Collar]." + }, + "capStrike": { + "type": "number", + "description": "Strike rate of the Cap.", + "format": "double" + }, + "floorStrike": { + "type": "number", + "description": "Strike rate of the Floor.", + "format": "double" + }, + "includeFirstCaplet": { + "type": "boolean", + "description": "Include first caplet flag." + }, + "underlyingFloatingLeg": { + "$ref": "#/components/schemas/FloatingLeg" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of Cap, Floor, or Collar." + }, "CashLadderRecord": { "required": [ "activities", @@ -44879,6 +45204,287 @@ }, "additionalProperties": false }, + "CashPerpetual": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "domCcy", + "instrumentType", + "principal", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "principal": { + "type": "number", + "description": "The face-value or principal for the cash at outset.", + "format": "double" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Perpetual Cash Flow." + }, + "CdsFlowConventions": { + "required": [ + "currency", + "dayCountConvention", + "paymentCalendars", + "paymentFrequency", + "resetCalendars", + "resetDays", + "rollConvention", + "settleDays" + ], + "type": "object", + "properties": { + "rollFrequency": { + "maxLength": 16, + "minLength": 0, + "type": "string", + "description": "The frequency at which the reference bonds are updated, this defaults to 6M, but can be 3M, exp for historically issued products", + "nullable": true + }, + "currency": { + "type": "string", + "description": "Currency of the flow convention." + }, + "paymentFrequency": { + "maxLength": 50, + "minLength": 0, + "type": "string", + "description": "When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is,\r\nthe tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment." + }, + "dayCountConvention": { + "maxLength": 50, + "minLength": 0, + "type": "string", + "description": "when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year\r\nand difference between them.\r\nFor more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798)\r\n \r\nSupported 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]." + }, + "rollConvention": { + "maxLength": 50, + "minLength": 0, + "type": "string", + "description": "When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day.\r\n\r\nSupported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, EndOfMonth, EOM, EndOfMonthPrevious, EOMP, EndOfMonthFollowing, EOMF, HalfMonthModifiedFollowing]." + }, + "paymentCalendars": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of strings denoting holiday calendars that apply to generation of payment schedules." + }, + "resetCalendars": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of strings denoting holiday calendars that apply to generation of reset schedules." + }, + "settleDays": { + "type": "integer", + "description": "Number of Good Business Days between the trade date and the effective or settlement date of the instrument.", + "format": "int32" + }, + "resetDays": { + "type": "integer", + "description": "The number of Good Business Days between determination and payment of reset.", + "format": "int32" + }, + "scope": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "The scope used when updating or inserting the convention.", + "nullable": true + }, + "code": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "The code of the convention.", + "nullable": true + } + }, + "additionalProperties": false + }, + "CdsIndex": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "basket", + "couponRate", + "identifiers", + "instrumentType", + "maturityDate", + "notional", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "flowConventions": { + "$ref": "#/components/schemas/CdsFlowConventions" + }, + "couponRate": { + "type": "number", + "description": "The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%.\r\nFor a standard corporate CDS (North American) this must be either 100bps or 500bps.", + "format": "double" + }, + "identifiers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code." + }, + "basket": { + "$ref": "#/components/schemas/Basket" + }, + "conventionName": { + "$ref": "#/components/schemas/FlowConventionName" + }, + "notional": { + "type": "number", + "description": "The notional quantity that applies to both the premium and protection legs.", + "format": "double" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Credit Default Swap Index (CDX)." + }, + "CdsProtectionDetailSpecification": { + "required": [ + "payAccruedInterestOnDefault", + "protectStartDay", + "restructuringType", + "seniority" + ], + "type": "object", + "properties": { + "seniority": { + "type": "string", + "description": "The seniority level of the CDS.\r\n\r\nSupported string (enumeration) values are: [SNR, SUB, JRSUBUT2, PREFT1, SECDOM, SNRFOR, SUBLT2]." + }, + "restructuringType": { + "type": "string", + "description": "The restructuring clause.\r\nSupported string (enumeration) values are: [CR, MR, MM, XR]." + }, + "protectStartDay": { + "type": "boolean", + "description": "Does the protection leg pay out in the case of default on the start date." + }, + "payAccruedInterestOnDefault": { + "type": "boolean", + "description": "Should accrued interest on the premium leg be paid if a credit event occurs." + } + }, + "additionalProperties": false, + "description": "CDSs generally conform to fairly standard definitions, but can be tweaked in a number of different ways.\r\nThis class gathers a number of common features which may deviate. These will default to the market standard when\r\nno overrides are provided." + }, "Change": { "required": [ "amended", @@ -45151,6 +45757,81 @@ "additionalProperties": false, "description": "Representation of a relationship containing details of source and target entities, and both outward and inward descriptions." }, + "ComplexBond": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "instrumentType" + ], + "type": "object", + "properties": { + "identifiers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "external market codes and identifiers for the bond, e.g. ISIN.", + "nullable": true + }, + "calculationType": { + "type": "string", + "description": "The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding,\r\nirregular coupons etc.\r\nThe default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency.\r\nPayment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively.\r\n\r\nSupported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon].", + "nullable": true + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schedule" + }, + "description": "schedules.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Complex Bond.\r\nIncluding Floating, Callable, Puttable, Sinkable, and Fixed-to-float." + }, "ComplexMarketData": { "required": [ "marketDataType" @@ -45226,6 +45907,40 @@ "additionalProperties": false, "description": "An identifier that uniquely describes an item of complex market data such as an interest rate curve or volatility surface." }, + "Compounding": { + "required": [ + "compoundingMethod", + "resetFrequency", + "spreadCompoundingMethod" + ], + "type": "object", + "properties": { + "calculationShiftMethod": { + "type": "string", + "description": "Defines which resets and day counts are used for the rate calculation\r\n\r\nSupported string (enumeration) values are: [Lookback, NoShift, ObservationPeriodShift, Lockout].", + "nullable": true + }, + "compoundingMethod": { + "type": "string", + "description": "If the interest rate is simple or compounded.\r\n\r\nSupported string (enumeration) values are: [Average, Compounded]." + }, + "resetFrequency": { + "type": "string", + "description": "The interest payment frequency." + }, + "shift": { + "type": "integer", + "description": "Defines the number of days to lockout or shift observation period by - should be a non-negative integer", + "format": "int32" + }, + "spreadCompoundingMethod": { + "type": "string", + "description": "Defines how the computed leg spread is applied to compounded rate.\r\nIt applies only when CompoundingMethod = ‘Compounded‘.\r\n\r\nSupported string (enumeration) values are: [Straight, IsdaCompounding, NoCompounding, SpreadExclusive, IsdaFlatCompounding, Flat, None]." + } + }, + "additionalProperties": false, + "description": "The compounding settings used on interest rate." + }, "ConfigurationRecipe": { "required": [ "code", @@ -45354,6 +46069,107 @@ }, "additionalProperties": false }, + "ContractForDifference": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "code", + "contractSize", + "instrumentType", + "payCcy", + "startDate", + "type", + "underlyingCcy", + "underlyingIdentifier" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the CFD.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying\r\nfuture. If CFDType is Cash, this should not be set.", + "format": "date-time" + }, + "code": { + "type": "string", + "description": "The code of the underlying." + }, + "contractSize": { + "type": "number", + "description": "The size of the CFD contract, this should represent the total number of stocks that the CFD represents.", + "format": "double" + }, + "payCcy": { + "type": "string", + "description": "The currency that this CFD pays out, this can be different to the UnderlyingCcy." + }, + "referenceRate": { + "type": "number", + "description": "The reference rate of the CFD, this can be set to 0 but not negative values.\r\nThis field is optional, if not set it will default to 0.", + "format": "double" + }, + "type": { + "type": "string", + "description": "The type of CFD.\r\n\r\nSupported string (enumeration) values are: [Cash, Futures]." + }, + "underlyingCcy": { + "type": "string", + "description": "The currency of the underlying" + }, + "underlyingIdentifier": { + "type": "string", + "description": "external market codes and identifiers for the CFD, e.g. RIC.\r\n\r\nSupported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]." + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Contract for Difference." + }, "CorporateAction": { "required": [ "corporateActionCode" @@ -46492,6 +47308,99 @@ }, "additionalProperties": false }, + "CreditDefaultSwap": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "couponRate", + "instrumentType", + "maturityDate", + "protectionDetailSpecification", + "startDate", + "ticker" + ], + "type": "object", + "properties": { + "ticker": { + "type": "string", + "description": "A ticker to uniquely specify then entity against which the cds is written." + }, + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "flowConventions": { + "$ref": "#/components/schemas/CdsFlowConventions" + }, + "couponRate": { + "type": "number", + "description": "The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%.\r\nFor a standard corporate CDS (North American) this must be either 100bps or 500bps.", + "format": "double" + }, + "conventionName": { + "$ref": "#/components/schemas/FlowConventionName" + }, + "notional": { + "type": "number", + "description": "The notional protected by the Credit Default Swap", + "format": "double", + "nullable": true + }, + "protectionDetailSpecification": { + "$ref": "#/components/schemas/CdsProtectionDetailSpecification" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Credit Default Swap (CDS)." + }, "CreditRating": { "required": [ "rating", @@ -46517,6 +47426,97 @@ "additionalProperties": false, "description": "Object describing a credit rating,\r\nwhich assesses the stability and credit worthiness of a legal entity\r\nand hence its likelihood of defaulting on its outstanding obligations (typically debt)." }, + "CreditSpreadCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "domCcy", + "marketDataType", + "recoveryRate", + "spreads", + "tenors" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "EffectiveAt date of the quoted rates", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "Domestic currency of the curve" + }, + "tenors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The tenors for which the rates apply" + }, + "spreads": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Par spread quotes corresponding to the tenors." + }, + "recoveryRate": { + "type": "number", + "description": "The recovery rate in default.", + "format": "double" + }, + "referenceDate": { + "type": "string", + "description": "If tenors are provided, this is the date against which the tenors will be resolved.\r\nThis is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date.\r\nIn this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid.\r\nIf not provided, this defaults to the BaseDate of the curve.", + "format": "date-time", + "nullable": true + }, + "maturities": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + }, + "description": "The maturity dates for which the rates apply.\r\nEither tenors or maturities should be provided, not both.", + "nullable": true + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "A credit spread curve matching tenors against par spread quotes" + }, "CurrencyAndAmount": { "type": "object", "properties": { @@ -46981,6 +47981,100 @@ "additionalProperties": false, "description": "Encapsulates parts of a market data rule relating not to the nature of the market data requested, but rather the nature of the thing (instrument/model) that is requesting it.\r\nIn the first instance, this includes the instrument type, asset class, and the currency of the underlying instrument.\r\nThis can be used to differentiate requests for market data according to the source of the request. See MarketDataSpecificRule." }, + "DiscountFactorCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "dates", + "discountFactors", + "marketDataType" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "BaseDate for the Curve", + "format": "date-time" + }, + "dates": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + }, + "description": "Dates for which the discount factors apply" + }, + "discountFactors": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Discount factors to be applied to cashflow on the specified dates" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "A curve containing discount factors and dates to which they apply" + }, + "EmptyModelOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelOptions" + }, + { + "required": [ + "modelOptionsType" + ], + "type": "object", + "properties": { + "modelOptionsType": { + "enum": [ + "Invalid", + "OpaqueModelOptions", + "EmptyModelOptions", + "IndexModelOptions", + "FxForwardModelOptions", + "FundingLegModelOptions", + "EquityModelOptions" + ], + "type": "string", + "description": "The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions" + } + } + } + ] + }, "EntityIdentifier": { "required": [ "identifierType", @@ -47005,6 +48099,498 @@ "additionalProperties": false, "description": "Dto to expose mapped keys to new standardised format" }, + "Equity": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "domCcy", + "instrumentType" + ], + "type": "object", + "properties": { + "identifiers": { + "type": "object", + "properties": { + "LusidInstrumentId": { + "type": "string" + }, + "Isin": { + "type": "string" + }, + "Sedol": { + "type": "string" + }, + "Cusip": { + "type": "string" + }, + "ClientInternal": { + "type": "string" + }, + "Figi": { + "type": "string" + }, + "RIC": { + "type": "string" + }, + "QuotePermId": { + "type": "string" + }, + "REDCode": { + "type": "string" + }, + "BBGId": { + "type": "string" + }, + "ICECode": { + "type": "string" + } + }, + "additionalProperties": false, + "description": "external market codes and identifiers for the equity, e.g. IBM", + "nullable": true + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an Equity." + }, + "EquityCurveByPricesData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "dates", + "marketDataType", + "prices" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "EffectiveAt date of the provided prices", + "format": "date-time" + }, + "dates": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + }, + "description": "Dates provided for the forward price of the Equity at the corresponding price in Prices.\r\nThese dates should be in the future with respect to the BaseDate." + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "prices": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Prices provided for the forward price of the Equity at the corresponding date in Dates." + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Contains data (i.e. dates and prices + metadata) for building Equity curves" + }, + "EquityModelOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelOptions" + }, + { + "required": [ + "equityForwardProjectionType", + "modelOptionsType" + ], + "type": "object", + "properties": { + "equityForwardProjectionType": { + "type": "string", + "description": "Determines how forward equity prices should be projected.\r\n \r\nSupported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]." + }, + "modelOptionsType": { + "enum": [ + "Invalid", + "OpaqueModelOptions", + "EmptyModelOptions", + "IndexModelOptions", + "FxForwardModelOptions", + "FundingLegModelOptions", + "EquityModelOptions" + ], + "type": "string", + "description": "The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions" + } + } + } + ], + "description": "Model options for equity related pricing." + }, + "EquityOption": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "code", + "deliveryType", + "domCcy", + "instrumentType", + "optionMaturityDate", + "optionSettlementDate", + "optionType", + "startDate", + "strike", + "underlyingIdentifier" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "optionMaturityDate": { + "type": "string", + "description": "The maturity date of the option.", + "format": "date-time" + }, + "optionSettlementDate": { + "type": "string", + "description": "The settlement date of the option.", + "format": "date-time" + }, + "deliveryType": { + "type": "string", + "description": "is the option cash settled or physical delivery of option\r\n\r\nSupported string (enumeration) values are: [Cash, Physical]." + }, + "optionType": { + "type": "string", + "description": "Type of optionality for the option\r\n\r\nSupported string (enumeration) values are: [Call, Put]." + }, + "strike": { + "type": "number", + "description": "The strike of the option.", + "format": "double" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "underlyingIdentifier": { + "type": "string", + "description": "The market identifier type of the underlying code, e.g RIC.\r\n\r\nSupported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]." + }, + "code": { + "type": "string", + "description": "The identifying code for the equity underlying, e.g. 'IBM.N'." + }, + "equityOptionType": { + "type": "string", + "description": "Equity option types. E.g. Vanilla (default), RightsIssue, Warrant.\r\n\r\nSupported string (enumeration) values are: [Vanilla, RightsIssue, Warrant].", + "nullable": true + }, + "numberOfShares": { + "type": "number", + "description": "The amount of shares to exchange if the option is exercised.", + "format": "double", + "nullable": true + }, + "premium": { + "$ref": "#/components/schemas/Premium" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a plain vanilla OTC Equity Option." + }, + "EquitySwap": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "code", + "equityFlowConventions", + "fundingLeg", + "includeDividends", + "initialPrice", + "instrumentType", + "maturityDate", + "notionalReset", + "quantity", + "startDate", + "underlyingIdentifier" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the EquitySwap.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "code": { + "type": "string", + "description": "The code of the underlying." + }, + "equityFlowConventions": { + "$ref": "#/components/schemas/FlowConventions" + }, + "fundingLeg": { + "$ref": "#/components/schemas/InstrumentLeg" + }, + "includeDividends": { + "type": "boolean", + "description": "Dividend inclusion flag, if true dividends are included in the equity leg (total return)." + }, + "initialPrice": { + "type": "number", + "description": "The initial equity price of the Equity Swap.", + "format": "double" + }, + "notionalReset": { + "type": "boolean", + "description": "Notional reset flag, if true the notional of the funding leg is reset at the start of every\r\ncoupon to match the value of the equity leg (equity price at start of coupon times quantity)." + }, + "quantity": { + "type": "number", + "description": "The quantity or number of shares in the Equity Swap.", + "format": "double" + }, + "underlyingIdentifier": { + "type": "string", + "description": "external market codes and identifiers for the EquitySwap, e.g. RIC.\r\n\r\nSupported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]." + }, + "equitySwapDividendPaymentTiming": { + "type": "string", + "description": "Determines how the payment of dividends is handled for the equity swap.\r\nDefaults to paying at the next Equity coupon date.\r\n \r\nSupported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent].", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an Equity Swap." + }, + "EquityVolSurfaceData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "instruments", + "marketDataType", + "quotes" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "Base date of the surface", + "format": "date-time" + }, + "instruments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "description": "The set of instruments that define the surface." + }, + "quotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MarketQuote" + }, + "description": "The set of market quotes that define the surface, in NormalVol or LogNormalVol terms." + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Market Data for an equity vol surface, represented by a list of instruments and corresponding market quotes" + }, "ErrorDetail": { "type": "object", "properties": { @@ -47037,6 +48623,158 @@ }, "additionalProperties": false }, + "ExchangeTradedOption": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "contractDetails", + "contracts", + "instrumentType", + "refSpotPrice", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "contractDetails": { + "$ref": "#/components/schemas/ExchangeTradedOptionContractDetails" + }, + "contracts": { + "type": "number", + "description": "The number of contracts held.", + "format": "double" + }, + "refSpotPrice": { + "type": "number", + "description": "The reference spot price for the option at which the contract was entered into.", + "format": "double" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an Exchange Traded Option.\r\nIncluding, but not limited to, Equity Options, Bond Options, Index Options, Future Options, and Interest Rate Options." + }, + "ExchangeTradedOptionContractDetails": { + "required": [ + "contractSize", + "country", + "deliveryType", + "description", + "domCcy", + "exchangeCode", + "exerciseDate", + "exerciseType", + "optionCode", + "optionType", + "strike", + "underlying", + "underlyingCode" + ], + "type": "object", + "properties": { + "domCcy": { + "type": "string", + "description": "Currency in which the contract is paid." + }, + "strike": { + "type": "number", + "description": "The option strike, this can be negative for some options.", + "format": "double" + }, + "contractSize": { + "type": "number", + "description": "Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such.", + "format": "double" + }, + "country": { + "type": "string", + "description": "Country (code) for the exchange." + }, + "deliveryType": { + "type": "string", + "description": "The delivery type, cash or physical. An option on a future is physically settled if upon exercising the\r\nholder receives a future.\r\n\r\nSupported string (enumeration) values are: [Cash, Physical]." + }, + "description": { + "type": "string", + "description": "Description of contract" + }, + "exchangeCode": { + "type": "string", + "description": "Exchange code for contract\r\n\r\nSupported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]." + }, + "exerciseDate": { + "type": "string", + "description": "Exercise Date.", + "format": "date-time" + }, + "exerciseType": { + "type": "string", + "description": "The exercise type, European, American or Bermudan.\r\n\r\nSupported string (enumeration) values are: [European, Bermudan, American]." + }, + "optionCode": { + "type": "string", + "description": "Option Contract Code, typically one or two letters, e.g. OG => Option on Gold." + }, + "optionType": { + "type": "string", + "description": "The option type, Call or Put.\r\n\r\nSupported string (enumeration) values are: [Call, Put]." + }, + "underlying": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "underlyingCode": { + "type": "string", + "description": "Code of the underlying, for an option on futures this should be the futures code." + } + }, + "additionalProperties": false, + "description": "Most, if not all, information about contracts is standardised. See, e.g. https://www.cmegroup.com/ for\r\ncommon codes and similar data. This appears to be in common use by well known market information providers, e.g. Bloomberg and Refinitiv.\r\nThere is a lot of overlap with this and FuturesContractDetails but as that is an established DTO we must duplicate a number of fields here" + }, "Execution": { "required": [ "counterparty", @@ -47252,6 +48990,69 @@ "additionalProperties": false, "description": "A request to create or update multiple Executions." }, + "ExoticInstrument": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "content", + "instrumentFormat", + "instrumentType" + ], + "type": "object", + "properties": { + "instrumentFormat": { + "$ref": "#/components/schemas/InstrumentDefinitionFormat" + }, + "content": { + "type": "string", + "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\r\ninterface is supported it is possible to fall back onto this.\r\nFor example, a trade from an external client system. This may be recognized internally by Lusid or simply passed through to another vendor system." + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a generic OTC Exotic Instrument that is not fully defined within other LUSID models." + }, "ExpandedGroup": { "required": [ "displayName", @@ -47419,6 +49220,1454 @@ "additionalProperties": false, "description": "Allows a file (represented as a stream) to be returned from an Api call" }, + "FixedLeg": { + "allOf": [ + { + "$ref": "#/components/schemas/InstrumentLeg" + }, + { + "required": [ + "instrumentType", + "legDefinition", + "maturityDate", + "notional", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "legDefinition": { + "$ref": "#/components/schemas/LegDefinition" + }, + "notional": { + "type": "number", + "format": "double" + }, + "overrides": { + "type": "object", + "properties": { + "Amortization": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "Spreads": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "additionalProperties": false, + "description": "Any overriding data for notionals, spreads or rates that would affect generation of a leg.\r\nThis supports the case where an amortisation schedule is given but otherwise generation is allowed as usual.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Fixed Rate Leg." + }, + "FloatingLeg": { + "allOf": [ + { + "$ref": "#/components/schemas/InstrumentLeg" + }, + { + "required": [ + "instrumentType", + "legDefinition", + "maturityDate", + "notional", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "legDefinition": { + "$ref": "#/components/schemas/LegDefinition" + }, + "notional": { + "type": "number", + "description": "Scaling factor to apply to leg quantities.", + "format": "double" + }, + "overrides": { + "type": "object", + "properties": { + "Amortization": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "Spreads": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + } + }, + "additionalProperties": false, + "description": "Any overriding data for notionals, spreads or rates that would affect generation of a leg.\r\nThis supports the case where an amortisation schedule is given but otherwise generation is allowed as usual.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Floating Rate Leg." + }, + "FlowConventionName": { + "required": [ + "currency", + "tenor" + ], + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "Currency of the flow convention name." + }, + "indexName": { + "type": "string", + "description": "The index, if present, that is required. e.g. \"IBOR\", \"OIS\" or \"SONIA\".", + "nullable": true + }, + "tenor": { + "type": "string", + "description": "Tenor for the convention name." + } + }, + "additionalProperties": false, + "description": "Representation of an abstract definition of a flow convention set consisting of currency, tenor and an index name (arbitrary string but likely something like \"IBOR\")." + }, + "FlowConventions": { + "required": [ + "currency", + "dayCountConvention", + "paymentCalendars", + "paymentFrequency", + "resetCalendars", + "resetDays", + "rollConvention", + "settleDays" + ], + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "Currency of the flow convention." + }, + "paymentFrequency": { + "maxLength": 50, + "minLength": 0, + "type": "string", + "description": "When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is,\r\nthe tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment." + }, + "dayCountConvention": { + "maxLength": 50, + "minLength": 0, + "type": "string", + "description": "when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year\r\nand difference between them.\r\nFor more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798)\r\n \r\nSupported 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]." + }, + "rollConvention": { + "maxLength": 50, + "minLength": 0, + "type": "string", + "description": "When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day.\r\n\r\nSupported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing]." + }, + "paymentCalendars": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of strings denoting holiday calendars that apply to generation of payment schedules." + }, + "resetCalendars": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of strings denoting holiday calendars that apply to generation of reset schedules." + }, + "settleDays": { + "type": "integer", + "description": "Number of Good Business Days between the trade date and the effective or settlement date of the instrument.", + "format": "int32" + }, + "resetDays": { + "type": "integer", + "description": "The number of Good Business Days between determination and payment of reset.", + "format": "int32" + }, + "leapDaysIncluded": { + "type": "boolean", + "description": "If this flag is set to true, the 29th of February is included in the date schedule when the business roll convention is applied.\r\nIf this flag is set to false, the business roll convention ignores February 29 for date schedules, cash flow payments etc.\r\nThis flag defaults to true if not specified, i.e., leap days are included in a date schedule generation.", + "nullable": true + }, + "scope": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "The scope used when updating or inserting the convention.", + "nullable": true + }, + "code": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "The code of the convention.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A flow convention defines the specification for generation of the date schedule for a leg or set of cashflows.\r\nIt determines the tenor of these and, how to map the unadjusted set of dates to dates which are 'good business\r\ndays'. For example, if an unadjusted date falls on a Saturday or a bank holiday, should it be rolled forward\r\nor backward to obtain the adjusted date." + }, + "ForwardRateAgreement": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "domCcy", + "fixingDate", + "fraRate", + "instrumentType", + "maturityDate", + "notional", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The settlement date of the FRA", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date.", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "fixingDate": { + "type": "string", + "description": "The date at which the rate to be paid, the reference rate, is confirmed/observed.", + "format": "date-time" + }, + "fraRate": { + "type": "number", + "description": "The rate at which the FRA is traded.", + "format": "double" + }, + "notional": { + "type": "number", + "description": "The amount for which the FRA is traded.", + "format": "double" + }, + "indexConvention": { + "$ref": "#/components/schemas/IndexConvention" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Forward Rate Agreement." + }, + "FundingLeg": { + "allOf": [ + { + "$ref": "#/components/schemas/InstrumentLeg" + }, + { + "required": [ + "instrumentType", + "legDefinition", + "maturityDate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date.", + "format": "date-time" + }, + "legDefinition": { + "$ref": "#/components/schemas/LegDefinition" + }, + "notional": { + "type": "number", + "description": "The initial notional of the Funding Leg instrument.\r\nWhen \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance),\r\nthis field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations.\r\nAs such, we recommend setting this to 0 or not setting it at all.\r\nPlease see the following Notebook example and Knowledge Base article:\r\nNotebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb\r\nKnowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/", + "format": "double", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Funding Leg with variable notional.\r\n\r\nThis Funding Leg is a hybrid between a single leg swap and a loan facility; the notional is not fixed and can vary within a reset period. \r\n \r\nThe model can be used to represent the funding leg of a basket of instruments (e.g. equities) where the contents\r\nof the basket can change over time. The actual notional history is stored in the FundingLegHistory object. \r\n\r\nThe actual notional history is stored in the FundingLegHistory object.\r\n \r\nThe main analytic calculated for this instrument is Accrual rather than PV." + }, + "Future": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "contractDetails", + "identifiers", + "instrumentType", + "maturityDate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "identifiers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "External market codes and identifiers for the bond, e.g. ISIN." + }, + "contractDetails": { + "$ref": "#/components/schemas/FuturesContractDetails" + }, + "contracts": { + "type": "number", + "description": "The number of contracts held.", + "format": "double" + }, + "refSpotPrice": { + "type": "number", + "description": "The reference spot price for the future at which the contract was entered into.", + "format": "double" + }, + "underlying": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Future.\r\nIncluding, but not limited to, Equity Futures, Bond Futures, Index Futures, Currency Futures, and Interest Rate Futures." + }, + "FuturesContractDetails": { + "required": [ + "contractCode", + "contractMonth", + "contractSize", + "convention", + "country", + "description", + "domCcy", + "exchangeCode", + "exchangeName", + "tickerStep", + "unitValue" + ], + "type": "object", + "properties": { + "domCcy": { + "type": "string", + "description": "Currency in which the contract is paid." + }, + "fgnCcy": { + "type": "string", + "description": "Currency of the underlying, for use with FX Futures", + "nullable": true + }, + "assetClass": { + "type": "string", + "description": "The asset class of the underlying. Optional and will default to Unknown if not set.\r\n\r\nSupported string (enumeration) values are: [InterestRates, FX, Inflation, Equities, Credit, Commodities, Money].", + "nullable": true + }, + "contractCode": { + "type": "string", + "description": "The contract code used by the exchange, e.g. “CL” for Crude Oil, “ES” for E-mini SP 500, “FGBL” for Bund Futures, etc." + }, + "contractMonth": { + "type": "string", + "description": "Which month does the contract trade for.\r\n\r\nSupported string (enumeration) values are: [F, G, H, J, K, M, N, Q, U, V, X, Z]." + }, + "contractSize": { + "type": "number", + "description": "Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such.", + "format": "double" + }, + "convention": { + "type": "string", + "description": "If appropriate, the day count convention method used in pricing (rates futures).\r\nFor more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798)\r\n \r\nSupported 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]." + }, + "country": { + "type": "string", + "description": "Country (code) for the exchange." + }, + "description": { + "type": "string", + "description": "Description of contract." + }, + "exchangeCode": { + "type": "string", + "description": "Exchange code for contract\r\n\r\nSupported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]." + }, + "exchangeName": { + "type": "string", + "description": "Exchange name (for when code is not automatically recognised)." + }, + "tickerStep": { + "type": "number", + "description": "Minimal step size change in ticker.", + "format": "double" + }, + "unitValue": { + "type": "number", + "description": "The value in the currency of a 1 unit change in the contract price.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Most, if not all, information about contracts is standardized. See, e.g. https://www.cmegroup.com/ for\r\ncommon codes and similar data. This appears to be in common use by well known market information providers, e.g. Bloomberg and Refinitiv." + }, + "FxForward": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "domAmount", + "domCcy", + "fgnAmount", + "fgnCcy", + "instrumentType", + "maturityDate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "domAmount": { + "type": "number", + "description": "The amount that is to be paid in the domestic currency on the maturity date.", + "format": "double" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "fgnAmount": { + "type": "number", + "description": "The amount that is to be paid in the foreign currency on the maturity date.", + "format": "double" + }, + "fgnCcy": { + "type": "string", + "description": "The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency.\r\nFor the outright forward, currencies are exchanged. By domestic is then that of the portfolio." + }, + "refSpotRate": { + "type": "number", + "description": "The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time).", + "format": "double" + }, + "isNdf": { + "type": "boolean", + "description": "Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs\r\na reference rate is used." + }, + "fixingDate": { + "type": "string", + "description": "The fixing date.", + "format": "date-time" + }, + "settlementCcy": { + "type": "string", + "description": "The settlement currency.\r\nIf provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an FX Forward.\r\nIncluding FX Spot and Non-Deliverable Forwards." + }, + "FxForwardCurveByQuoteReference": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "domCcy", + "fgnCcy", + "marketDataType", + "quoteReferences", + "tenors" + ], + "type": "object", + "properties": { + "domCcy": { + "type": "string", + "description": "Domestic currency of the fx forward" + }, + "fgnCcy": { + "type": "string", + "description": "Foreign currency of the fx forward" + }, + "tenors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tenors for which the forward rates apply" + }, + "quoteReferences": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates." + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Contains data (i.e. tenors and rates + metadata) for building fx forward curves (when combined with a date to build on)" + }, + "FxForwardCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "dates", + "domCcy", + "fgnCcy", + "marketDataType", + "rates" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "EffectiveAt date of the quoted rates", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "Domestic currency of the fx forward" + }, + "fgnCcy": { + "type": "string", + "description": "Foreign currency of the fx forward" + }, + "dates": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + }, + "description": "Dates for which the forward rates apply" + }, + "rates": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Rates provided for the fx forward (price in FgnCcy per unit of DomCcy)" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Contains data (i.e. dates and rates + metadata) for building fx forward curves" + }, + "FxForwardModelOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelOptions" + }, + { + "required": [ + "convertToReportCcy", + "discountingMethod", + "forwardRateObservableType", + "modelOptionsType" + ], + "type": "object", + "properties": { + "forwardRateObservableType": { + "enum": [ + "ForwardPoints", + "ForwardRate", + "RatesCurve", + "FxForwardCurve", + "Invalid" + ], + "type": "string", + "description": "The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid" + }, + "discountingMethod": { + "enum": [ + "Standard", + "ConstantTimeValueOfMoney", + "Invalid" + ], + "type": "string", + "description": "The available values are: Standard, ConstantTimeValueOfMoney, Invalid" + }, + "convertToReportCcy": { + "type": "boolean", + "description": "Convert all FX flows to the report currency\r\nBy setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base." + }, + "modelOptionsType": { + "enum": [ + "Invalid", + "OpaqueModelOptions", + "EmptyModelOptions", + "IndexModelOptions", + "FxForwardModelOptions", + "FundingLegModelOptions", + "EquityModelOptions" + ], + "type": "string", + "description": "The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions" + } + } + } + ] + }, + "FxForwardPipsCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "dates", + "domCcy", + "fgnCcy", + "marketDataType", + "pipRates" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "EffectiveAt date of the quoted pip rates", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "Domestic currency of the fx forward" + }, + "fgnCcy": { + "type": "string", + "description": "Foreign currency of the fx forward" + }, + "dates": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + }, + "description": "Dates for which the forward rates apply" + }, + "pipRates": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Contains data (i.e. dates and pips + metadata) for building fx forward curves (when combined with a spot rate to build on)" + }, + "FxForwardTenorCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "domCcy", + "fgnCcy", + "marketDataType", + "rates", + "tenors" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "EffectiveAt date of the quoted rates", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "Domestic currency of the fx forward" + }, + "fgnCcy": { + "type": "string", + "description": "Foreign currency of the fx forward" + }, + "tenors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tenors for which the forward rates apply" + }, + "rates": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Rates provided for the fx forward (price in FgnCcy per unit of DomCcy)" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Contains data (i.e. tenors and rates + metadata) for building fx forward curves (when combined with a date to build on)" + }, + "FxForwardTenorPipsCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "domCcy", + "fgnCcy", + "marketDataType", + "pipRates", + "tenors" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "EffectiveAt date of the quoted pip rates", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "Domestic currency of the fx forward" + }, + "fgnCcy": { + "type": "string", + "description": "Foreign currency of the fx forward" + }, + "tenors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tenors for which the forward rates apply" + }, + "pipRates": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Contains data (i.e. tenors and pips + metadata) for building fx forward curves (when combined with a spot rate and a date to build on)" + }, + "FxOption": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "domCcy", + "fgnCcy", + "instrumentType", + "isCallNotPut", + "isDeliveryNotCash", + "optionMaturityDate", + "optionSettlementDate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "domAmount": { + "type": "number", + "description": "The Amount of DomCcy that will be exchanged if the option is exercised.\r\nThis amount should be a positive number, with the Call/Put flag used to indicate direction.\r\nThe corresponding amount of FgnCcy that will be exchanged is this amount times the strike.\r\nNote there is no rounding performed on this computed value.\r\nThis is an optional field, if not set the option ContractSize will default to 1.", + "format": "double", + "nullable": true + }, + "fgnCcy": { + "type": "string", + "description": "The foreign currency of the FX." + }, + "fgnAmount": { + "type": "number", + "description": "For a vanilla FxOption contract, FgnAmount cannot be set.\r\nIn case of a digital FxOption (IsPayoffDigital==true)\r\na payoff (if the option is in the money) can be either\r\nin domestic or in foreign currency - for the latter\r\nFgnAmount must be set.\r\nNote: It is invalid to have FgnAmount and DomAmount\r\nat the same time.", + "format": "double", + "nullable": true + }, + "strike": { + "type": "number", + "description": "The strike of the option.", + "format": "double", + "nullable": true + }, + "barriers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Barrier" + }, + "description": "For a barrier option the list should not be empty. Up to two barriers are supported.\r\nAn option cannot be at the same time barrier- and touch-option.\r\nOne (or both) of the lists must be empty.", + "nullable": true + }, + "exerciseType": { + "type": "string", + "description": "Type of optionality that is present; European, Bermudan, American.\r\n\r\nSupported string (enumeration) values are: [European, Bermudan, American].", + "nullable": true + }, + "isCallNotPut": { + "type": "boolean", + "description": "True if the option is a call, false if the option is a put." + }, + "isDeliveryNotCash": { + "type": "boolean", + "description": "True if the option is settled in cash, false if delivery." + }, + "isPayoffDigital": { + "type": "boolean", + "description": "By default IsPayoffDigital is false. If IsPayoffDigital=true,\r\nthe option is 'digital', and the option payoff is 0 or 1 unit of currency,\r\ninstead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0)." + }, + "optionMaturityDate": { + "type": "string", + "description": "The maturity date of the option.", + "format": "date-time" + }, + "optionSettlementDate": { + "type": "string", + "description": "The settlement date of the option.", + "format": "date-time" + }, + "payoutStyle": { + "type": "string", + "description": "PayoutStyle for touch options.\r\nFor options without touch optionality (IsTouch==false),\r\nPayoutStyle should not be set (ot it can be set to None)\r\nFor options with touch optionality (IsTouch==true),\r\nPayoutStyle cannot be None.\r\n\r\nSupported string (enumeration) values are: [Deferred, Immediate].", + "nullable": true + }, + "premium": { + "$ref": "#/components/schemas/Premium" + }, + "touches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Touch" + }, + "description": "For a touch option the list should not be empty. Up to two touches are supported.\r\nAn option cannot be at the same time barrier- and touch-option.\r\nOne (or both) of the lists must be empty.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an FX Option.\r\nIncluding Vanilla, American, European, and Digital (Binary) options." + }, + "FxSwap": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "farFxForward", + "instrumentType", + "nearFxForward" + ], + "type": "object", + "properties": { + "nearFxForward": { + "$ref": "#/components/schemas/FxForward" + }, + "farFxForward": { + "$ref": "#/components/schemas/FxForward" + }, + "notionalSymmetry": { + "type": "string", + "description": "The NotionalSymmetry allows for even and uneven FxSwaps to be supported.\r\nAn even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the\r\nlegs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the\r\ndomestic and foreign legs.\r\nBy default NotionalSymmetry will be set as even.\r\n\r\nSupported string (enumeration) values are: [Even, Uneven].", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an FX Swap. Composed of two FX Forwards." + }, + "FxVolSurfaceData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "instruments", + "marketDataType", + "quotes" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "Base date of the surface", + "format": "date-time" + }, + "instruments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "description": "The set of instruments that define the surface." + }, + "quotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MarketQuote" + }, + "description": "The set of market quotes that define the surface, in NormalVol or LogNormalVol terms." + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Market Data for an fx vol surface, represented by a list of fx options and corresponding market quotes" + }, "GetComplexMarketDataResponse": { "type": "object", "properties": { @@ -47848,6 +51097,108 @@ }, "additionalProperties": false }, + "IndexConvention": { + "required": [ + "currency", + "dayCountConvention", + "fixingReference", + "paymentTenor", + "publicationDayLag" + ], + "type": "object", + "properties": { + "fixingReference": { + "maxLength": 64, + "minLength": 0, + "type": "string", + "description": "The reference rate name for fixings." + }, + "publicationDayLag": { + "type": "integer", + "description": "Number of days between spot and publication of the rate.", + "format": "int32" + }, + "paymentTenor": { + "maxLength": 32, + "minLength": 0, + "type": "string", + "description": "The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year." + }, + "dayCountConvention": { + "maxLength": 32, + "minLength": 0, + "type": "string", + "description": "when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year\r\nand difference between them.\r\nFor more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798)\r\n \r\nSupported 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]." + }, + "currency": { + "type": "string", + "description": "Currency of the index convention." + }, + "indexName": { + "maxLength": 16, + "minLength": 0, + "type": "string", + "description": "The name of the index for which this represents the conventions of.\r\nFor instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc.\r\nDefaults to \"INDEX\" if not specified.", + "nullable": true + }, + "scope": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "The scope used when updating or inserting the convention.", + "nullable": true + }, + "code": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "The code of the convention.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A set of conventions that describe the conventions for calculation of payments made on rates interbank lending and similar.\r\nBased on ISDA 2006 conventions and similar documentation. Please see the knowledge base for further documentation." + }, + "IndexModelOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelOptions" + }, + { + "required": [ + "modelOptionsType", + "portfolioScaling" + ], + "type": "object", + "properties": { + "portfolioScaling": { + "enum": [ + "Sum", + "AbsoluteSum", + "Unity" + ], + "type": "string", + "description": "The available values are: Sum, AbsoluteSum, Unity" + }, + "modelOptionsType": { + "enum": [ + "Invalid", + "OpaqueModelOptions", + "EmptyModelOptions", + "IndexModelOptions", + "FxForwardModelOptions", + "FundingLegModelOptions", + "EquityModelOptions" + ], + "type": "string", + "description": "The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions" + } + } + } + ] + }, "IndustryClassifier": { "required": [ "classificationCode", @@ -47870,6 +51221,158 @@ "additionalProperties": false, "description": "Object describing a particular industry classifier,\r\nwhich comprises a classification code and the name of the classification system to which the code belongs." }, + "InflationLinkedBond": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "couponRate", + "domCcy", + "flowConventions", + "inflationIndexName", + "instrumentType", + "maturityDate", + "principal", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the bond.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "flowConventions": { + "$ref": "#/components/schemas/FlowConventions" + }, + "couponRate": { + "type": "number", + "description": "Simple coupon rate.", + "format": "double" + }, + "identifiers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "External market codes and identifiers for the bond, e.g. ISIN.", + "nullable": true + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "baseCPI": { + "type": "number", + "description": "BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate,\r\nIf that too is not present the StartDate will be used.\r\nNote that both BaseCPI and BaseCPIDate cannot be set.\r\nSome bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this\r\ncase the value should be provided here or with the BaseCPIDate.", + "format": "double", + "nullable": true + }, + "baseCPIDate": { + "type": "string", + "description": "BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property,\r\nif that too is not present than the StartDate will be used.\r\nIf present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate)\r\nso the Bond ObservationLag will be applied to this date when calculating the CPI.\r\nNote that both BaseCPI and BaseCPIDate cannot be set.\r\nSome bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this\r\ncase the value should be provided here or with the actual BaseCPI.", + "format": "date-time", + "nullable": true + }, + "calculationType": { + "type": "string", + "description": "The calculation type applied to the bond coupon and principal amount.\r\nThe default CalculationType is `Standard` and currently this is the only value supported.\r\n\r\nSupported string (enumeration) values are: [Standard, Quarterly, Ratio].", + "nullable": true + }, + "exDividendDays": { + "type": "integer", + "description": "Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend.\r\nThis is not common in inflation linked bonds but has been seen with (for example) bonds issued by\r\nthe Bank of Thailand.", + "format": "int32", + "nullable": true + }, + "indexPrecision": { + "type": "integer", + "description": "Number of decimal places used to round IndexRatio. This defaults to 5 if not set.", + "format": "int32" + }, + "inflationIndexName": { + "type": "string", + "description": "Name of the index, e.g. UKRPI." + }, + "inflationInterpolation": { + "type": "string", + "description": "Inflation Interpolation. This is optional and defaults to Linear if not set.\r\n\r\nSupported string (enumeration) values are: [Linear, Flat].", + "nullable": true + }, + "inflationRollDay": { + "type": "integer", + "description": "Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is\r\nthe typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th\r\nand some LatAm bonds which roll on the 15th).", + "format": "int32" + }, + "observationLag": { + "type": "string", + "description": "Observation lag. This is a Tenor that must have units of Month.\r\nThis field is typically 3 or 4 months, but can vary, older bonds have 8 months lag.\r\nFor Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid.", + "nullable": true + }, + "principal": { + "type": "number", + "description": "The face-value or principal for the bond at outset.", + "format": "double" + }, + "principalProtection": { + "type": "boolean", + "description": "If true then the principal is protected in that the redemption amount will be at least the face value (Principal).\r\nThis is typically set to true for inflation linked bonds issued by the United States and France (for example).\r\nThis is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005).\r\nFor other sovereigns this can vary from issue to issue.\r\nIf not set this property defaults to true.\r\nThis is sometimes referred to as Deflation protection or an inflation floor of 0%." + }, + "stubType": { + "type": "string", + "description": "StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases\r\nwith a long front stub LongFront should be selected.\r\nStubType Both is not supported for InflationLinkedBonds.\r\n\r\nSupported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both].", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "Inflation Linked Bond." + }, "InlineValuationRequest": { "required": [ "instruments", @@ -48071,6 +51574,30 @@ }, "additionalProperties": false }, + "InstrumentDefinitionFormat": { + "required": [ + "sourceSystem", + "vendor", + "version" + ], + "type": "object", + "properties": { + "sourceSystem": { + "type": "string", + "description": "which source system does the format originate from" + }, + "vendor": { + "type": "string", + "description": "An instrument will potentially have been created by any number of different organisations. Some will be understood completely (e.g. LUSID's), some won't.\r\n The provenance of an instrument indicates who \"owns\" the associated format." + }, + "version": { + "type": "string", + "description": "Version of the document. Would be preferable to avoid the need, but LUSID will not control other organisations' trade formats." + } + }, + "additionalProperties": false, + "description": "What is the provenance of an instrument. This defines who creates/owns it, what format it is in (e.g. a proprietary format or a common and known one)\r\n and what the version of that is." + }, "InstrumentIdTypeDescriptor": { "required": [ "identifierType", @@ -48113,6 +51640,287 @@ }, "additionalProperties": false }, + "InstrumentLeg": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "instrumentType" + ], + "type": "object", + "properties": { + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "Base class for representing instrument legs in LUSID.\r\nAn instrument leg describes a set of cashflows that are paid at a set of points in time according to some set of conventions.\r\nThis base class should not be directly instantiated; only its inheritors should be used.", + "discriminator": { + "propertyName": "instrumentType" + } + }, + "InterestRateSwap": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "instrumentType", + "legs", + "maturityDate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "isNonDeliverable": { + "type": "boolean", + "description": "Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between\r\nthe fixed and floating rates." + }, + "legs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstrumentLeg" + }, + "description": "The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg." + }, + "settlementCcy": { + "type": "string", + "description": "Settlement currency if IRS is non-deliverable.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an Interest Rate Swap, including:\r\n\r\n * Vanilla (single currency fixed-float non-amortising)\r\n * CrossCurrency (>1 currency is used by the swap legs)\r\n * Basis (single currency, floating-floating legs of different tenors)\r\n * Amortising (the swap has 1+ leg with amortised notional)" + }, + "InterestRateSwaption": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "deliveryMethod", + "instrumentType", + "payOrReceiveFixed", + "startDate", + "swap" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "payOrReceiveFixed": { + "type": "string", + "description": "True if on exercise the holder of the option enters the swap paying fixed, false if floating.\r\n\r\nSupported string (enumeration) values are: [Pay, Receive]." + }, + "premium": { + "$ref": "#/components/schemas/Premium" + }, + "deliveryMethod": { + "type": "string", + "description": "How does the option settle\r\n\r\nSupported string (enumeration) values are: [Cash, Physical]." + }, + "swap": { + "$ref": "#/components/schemas/InterestRateSwap" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of an Interest Rate Swaption." + }, + "IrVolCubeData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "instruments", + "marketDataType", + "quotes" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "Base date of the cube - this is the start date of the swaptions on the cube.", + "format": "date-time" + }, + "instruments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "description": "Retrieve the set of instruments that define the cube." + }, + "quotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MarketQuote" + }, + "description": "Access the set of quotes that define the cube." + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Market Data required to build a volatility cube for swaption pricing, represented by a list of instruments and corresponding market quotes" + }, "IsBusinessDayResponse": { "required": [ "isBusinessDay", @@ -48237,6 +52045,80 @@ "additionalProperties": false, "description": "Representation of Legal Entity on LUSID API" }, + "LegDefinition": { + "required": [ + "notionalExchangeType", + "payReceive", + "rateOrSpread", + "stubType" + ], + "type": "object", + "properties": { + "conventionName": { + "$ref": "#/components/schemas/FlowConventionName" + }, + "conventions": { + "$ref": "#/components/schemas/FlowConventions" + }, + "indexConvention": { + "$ref": "#/components/schemas/IndexConvention" + }, + "indexConventionName": { + "$ref": "#/components/schemas/FlowConventionName" + }, + "notionalExchangeType": { + "type": "string", + "description": "what type of notional exchange does the leg have\r\n\r\nSupported string (enumeration) values are: [None, Initial, Final, Both]." + }, + "payReceive": { + "type": "string", + "description": "Is the leg to be paid or received\r\n\r\nSupported string (enumeration) values are: [Pay, Receive]." + }, + "rateOrSpread": { + "type": "number", + "description": "Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg.", + "format": "double" + }, + "resetConvention": { + "type": "string", + "description": "Control how resets are generated relative to swap payment convention(s).\r\n\r\nSupported string (enumeration) values are: [InAdvance, InArrears].", + "nullable": true + }, + "stubType": { + "type": "string", + "description": "If a stub is required should it be at the front or back of the leg.\r\n\r\nSupported string (enumeration) values are: [None, ShortFront, ShortBack, LongBack, LongFront, Both]." + }, + "compounding": { + "$ref": "#/components/schemas/Compounding" + }, + "amortisation": { + "$ref": "#/components/schemas/StepSchedule" + } + }, + "additionalProperties": false, + "description": "Definition of the set of flow and index conventions along with other miscellaneous information required to generate an instrument leg." + }, + "LevelStep": { + "required": [ + "date", + "quantity" + ], + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "The date from which the level should apply.", + "format": "date-time" + }, + "quantity": { + "type": "number", + "description": "The quantity which is applied. This might be an absolute, percentage, fractional or other value.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "Item which is stepped in level/quantity." + }, "Link": { "required": [ "href", @@ -48790,6 +52672,39 @@ "additionalProperties": false, "description": "The set of options that control miscellaneous and default market resolution behaviour.\r\nThese are aimed at a 'crude' level of control for those who do not wish to fine tune the way that data is resolved.\r\nFor clients who wish to simply match instruments to prices this is quite possibly sufficient. For those wishing to control market data sources\r\naccording to requirements based on accuracy or timeliness it is not. In more advanced cases the options should largely be ignored and rules specified\r\nper source. Be aware that where no specified rule matches the final fallback is on to the logic implied here." }, + "MarketQuote": { + "required": [ + "quoteType", + "value" + ], + "type": "object", + "properties": { + "quoteType": { + "enum": [ + "Price", + "Spread", + "Rate", + "LogNormalVol", + "NormalVol", + "ParSpread", + "IsdaSpread", + "Upfront", + "Index", + "Ratio", + "Delta" + ], + "type": "string", + "description": "The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta" + }, + "value": { + "type": "number", + "description": "Numeric value of the quote", + "format": "double" + } + }, + "additionalProperties": false, + "description": "The market quote for an observable which will be used to calibrate the market data,\r\nincluding the format of the quote.\r\ne.g. a volatility quote for a specific strike and expiry\r\nthe par rate of a swap\r\n \r\nThis is a slimmed down version of a full Quote that can be stored in our QuoteStore to\r\nremove lineage, price source etc. for ease of use when creating complex market data." + }, "MetricValue": { "type": "object", "properties": { @@ -48901,6 +52816,99 @@ }, "additionalProperties": false }, + "OpaqueMarketData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "document", + "format", + "marketDataType", + "name" + ], + "type": "object", + "properties": { + "document": { + "type": "string", + "description": "The document as a string." + }, + "format": { + "type": "string", + "description": "What format is the document stored in, e.g. Xml.\r\nSupported string (enumeration) values are: [Unknown, Xml, Json, Csv]." + }, + "name": { + "type": "string", + "description": "Internal name of document. This is not used for search, it is simply a designator that helps identify the document\r\nand could be anything (filename, ftp address or similar)" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "A representation of an un-built piece of complex market data, to allow for passing through\r\nto the vendor library for building.\r\nThe market data will usually be in some standard form such as XML or Json, representing a curve or surface." + }, + "OpaqueModelOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelOptions" + }, + { + "required": [ + "data", + "modelOptionsType" + ], + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false + } + }, + "modelOptionsType": { + "enum": [ + "Invalid", + "OpaqueModelOptions", + "EmptyModelOptions", + "IndexModelOptions", + "FxForwardModelOptions", + "FundingLegModelOptions", + "EquityModelOptions" + ], + "type": "string", + "description": "The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions" + } + } + } + ] + }, "Order": { "required": [ "id", @@ -50548,6 +54556,79 @@ }, "additionalProperties": false }, + "PortfolioResultDataKeyRule": { + "allOf": [ + { + "$ref": "#/components/schemas/ResultKeyRule" + }, + { + "required": [ + "dataScope", + "documentCode", + "resultKeyRuleType", + "supplier" + ], + "type": "object", + "properties": { + "supplier": { + "maxLength": 32, + "minLength": 0, + "type": "string", + "description": "the result resource supplier (where the data comes from)" + }, + "dataScope": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "which is the scope in which the data should be found" + }, + "documentCode": { + "maxLength": 256, + "minLength": 1, + "type": "string", + "description": "document code that defines which document is desired" + }, + "quoteInterval": { + "maxLength": 16, + "minLength": 0, + "type": "string", + "description": "Shorthand for the time interval used to select result data. This must be a dot-separated string\r\n specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago).", + "nullable": true + }, + "asAt": { + "type": "string", + "description": "The AsAt predicate specification.", + "format": "date-time", + "nullable": true + }, + "portfolioCode": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "nullable": true + }, + "portfolioScope": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "nullable": true + }, + "resultKeyRuleType": { + "enum": [ + "Invalid", + "ResultDataKeyRule", + "PortfolioResultDataKeyRule" + ], + "type": "string", + "description": "The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule" + } + } + } + ] + }, "PortfolioSearchResult": { "required": [ "created", @@ -50647,6 +54728,32 @@ }, "additionalProperties": false }, + "Premium": { + "required": [ + "amount", + "currency", + "date" + ], + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Premium amount.", + "format": "double" + }, + "currency": { + "type": "string", + "description": "Premium currency." + }, + "date": { + "type": "string", + "description": "Date when premium paid.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "A class containing information for a given premium payment." + }, "PricingContext": { "type": "object", "properties": { @@ -51460,6 +55567,75 @@ }, "additionalProperties": false }, + "ReferenceInstrument": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "instrumentId", + "instrumentIdType", + "instrumentType", + "scope" + ], + "type": "object", + "properties": { + "instrumentId": { + "type": "string", + "description": "The Identifier code" + }, + "instrumentIdType": { + "type": "string", + "description": "the type of the instrument id e.g. LusidInstrument Id" + }, + "scope": { + "type": "string", + "description": "(optional) Scope for the instrument" + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a reference to another instrument that has already been loaded (e.g. a lookthrough to a portfolio)." + }, "ReferencePortfolioConstituent": { "required": [ "currency", @@ -51709,6 +55885,126 @@ }, "additionalProperties": false }, + "Repo": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "accrualBasis", + "domCcy", + "instrumentType", + "maturityDate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency of the instrument." + }, + "accrualBasis": { + "type": "string", + "description": "For calculation of interest, the accrual basis to be used.\r\nFor more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798)\r\n \r\nSupported 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]." + }, + "collateral": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "description": "The actual collateral in the Repo.\r\nThis property is for informational purposes only, Lusid pricing is not affected.", + "nullable": true + }, + "collateralValue": { + "type": "number", + "description": "The full market value of the collateral in domestic currency, before any margin or haircut is applied.", + "format": "double", + "nullable": true + }, + "haircut": { + "type": "number", + "description": "The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05.\r\nThis is defined as (CollateralValue - PurchasePrice) / CollateralValue.\r\nIf this property is specified, so too must CollateralValue.\r\nWhile this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified.", + "format": "double", + "nullable": true + }, + "margin": { + "type": "number", + "description": "The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0,\r\ni.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%).\r\nThis is defined as CollateralValue / PurchasePrice.\r\nIf this property is specified, so too must CollateralValue.\r\nWhile this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified.", + "format": "double", + "nullable": true + }, + "purchasePrice": { + "type": "number", + "description": "The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require\r\ncollateral value and a margin or haircut.\r\nWhile this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified.", + "format": "double", + "nullable": true + }, + "repoRate": { + "type": "number", + "description": "the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity.\r\nThis field is used to calculate the Repurchase price.\r\nWhile this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified.", + "format": "double", + "nullable": true + }, + "repurchasePrice": { + "type": "number", + "description": "The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated\r\nfrom the PurchasePrice and RepoRate.\r\nOne, and only one, of the RepoRate and RepurchasePrice must be specified.", + "format": "double", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a sale and repurchase agreement, supporting haircut, margin or repo rate methods." + }, "ResourceId": { "required": [ "code", @@ -52913,6 +57209,76 @@ "additionalProperties": false, "description": "Metadata related to an api response" }, + "ResultDataKeyRule": { + "allOf": [ + { + "$ref": "#/components/schemas/ResultKeyRule" + }, + { + "required": [ + "dataScope", + "documentCode", + "documentResultType", + "resourceKey", + "resultKeyRuleType", + "supplier" + ], + "type": "object", + "properties": { + "supplier": { + "maxLength": 32, + "minLength": 0, + "type": "string", + "description": "the result resource supplier (where the data comes from)" + }, + "dataScope": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+$", + "type": "string", + "description": "which is the scope in which the data should be found" + }, + "documentCode": { + "maxLength": 256, + "minLength": 1, + "type": "string", + "description": "document code that defines which document is desired" + }, + "quoteInterval": { + "maxLength": 16, + "minLength": 0, + "type": "string", + "description": "Shorthand for the time interval used to select result data. This must be a dot-separated string\r\n specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago).", + "nullable": true + }, + "asAt": { + "type": "string", + "description": "The AsAt predicate specification.", + "format": "date-time", + "nullable": true + }, + "resourceKey": { + "maxLength": 256, + "minLength": 0, + "type": "string", + "description": "The result data key that identifies the address pattern that this is a rule for" + }, + "documentResultType": { + "type": "string" + }, + "resultKeyRuleType": { + "enum": [ + "Invalid", + "ResultDataKeyRule", + "PortfolioResultDataKeyRule" + ], + "type": "string", + "description": "The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule" + } + } + } + ] + }, "ResultDataSchema": { "type": "object", "properties": { @@ -52955,6 +57321,31 @@ "propertyName": "resultKeyRuleType" } }, + "Schedule": { + "required": [ + "scheduleType" + ], + "type": "object", + "properties": { + "scheduleType": { + "enum": [ + "Fixed", + "Float", + "Optionality", + "Step", + "Exercise", + "Invalid" + ], + "type": "string", + "description": "The available values are: Fixed, Float, Optionality, Step, Exercise, Invalid" + } + }, + "additionalProperties": false, + "description": "Base class for representing schedules in LUSID.\r\nThis base class should not be directly instantiated; each supported ScheduleType has a corresponding inherited class.", + "discriminator": { + "propertyName": "scheduleType" + } + }, "ScopeDefinition": { "required": [ "scope" @@ -53104,6 +57495,130 @@ "additionalProperties": false, "description": "Configuration needed to define a side. Sides are referenced by Label. Beyond that, other properties\r\ncan be used to reference either transaction fields, or transaction properties." }, + "SimpleInstrument": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "assetClass", + "domCcy", + "instrumentType", + "simpleInstrumentType" + ], + "type": "object", + "properties": { + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "domCcy": { + "type": "string", + "description": "The domestic currency." + }, + "assetClass": { + "enum": [ + "InterestRates", + "FX", + "Inflation", + "Equities", + "Credit", + "Commodities", + "Money", + "Unknown" + ], + "type": "string", + "description": "The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown" + }, + "fgnCcys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of foreign currencies, if any (optional).", + "nullable": true + }, + "simpleInstrumentType": { + "type": "string", + "description": "The Instrument type of the simple instrument." + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Simple Instrument, used as a basic definition of a generic instrument.\r\nNo analytics can be obtained for this." + }, + "StepSchedule": { + "required": [ + "levelType", + "scheduleType", + "steps", + "stepScheduleType" + ], + "type": "object", + "properties": { + "levelType": { + "type": "string", + "description": "The type of shift or adjustment that the quantity represents.\r\n\r\nSupported string (enumeration) values are: [Absolute, AbsoluteShift, Percentage, AbsolutePercentage]." + }, + "scheduleType": { + "type": "string", + "description": "What type of schedule does this represent.\r\nSupported string (enumeration) values are: [Fixed, Float, Optionality, Step, Payment, Accrual]." + }, + "stepScheduleType": { + "type": "string", + "description": "The type of step that this schedule is for.\r\nSupported string (enumeration) values are: [Coupon, Notional, Spread]." + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LevelStep" + }, + "description": "The level steps which are applied." + } + }, + "additionalProperties": false, + "description": "Schedule that steps at known dated points in time.\r\nUsed in representation of a sinking bond, also called amortisation, steps in coupons for fixed bonds and spreads for floating bonds." + }, "Stream": { "type": "object", "properties": { @@ -53226,6 +57741,123 @@ }, "additionalProperties": false }, + "TermDeposit": { + "allOf": [ + { + "$ref": "#/components/schemas/LusidInstrument" + }, + { + "required": [ + "contractSize", + "flowConvention", + "instrumentType", + "maturityDate", + "rate", + "startDate" + ], + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "The start date of the instrument. This is normally synonymous with the trade-date.", + "format": "date-time" + }, + "maturityDate": { + "type": "string", + "description": "The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount.\r\nFor the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as\r\nConstant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.", + "format": "date-time" + }, + "contractSize": { + "type": "number", + "description": "With an OTC we have the problem of multiple ways of booking a quantity.\r\n e.g.\r\n If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8.\r\n When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and\r\n fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1.\r\n The logical effect of this is that\r\n instrument clean price = contract size * quoted unit price\r\n holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price\r\n In calculating accrued interest the same should hold.\r\n NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold.", + "format": "double" + }, + "flowConvention": { + "$ref": "#/components/schemas/FlowConventions" + }, + "rate": { + "type": "number", + "description": "The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest", + "format": "double" + }, + "domCcy": { + "type": "string", + "description": "DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention.", + "nullable": true + }, + "instrumentType": { + "enum": [ + "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" + ], + "type": "string", + "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" + } + } + } + ], + "description": "LUSID representation of a Term Deposit." + }, + "Touch": { + "required": [ + "direction", + "level", + "type" + ], + "type": "object", + "properties": { + "direction": { + "type": "string", + "description": "Supported string (enumeration) values are: [Down, Up]." + }, + "level": { + "type": "number", + "description": "Trigger level, which the underlying should (or should not) cross/touch.", + "format": "double" + }, + "monitoring": { + "type": "string", + "description": "Supported string (enumeration) values are: [European, Bermudan, American].", + "nullable": true + }, + "type": { + "type": "string", + "description": "Supported string (enumeration) values are: [Touch, Notouch]." + } + }, + "additionalProperties": false, + "description": "Touch class for exotic FxOption" + }, "Transaction": { "required": [ "instrumentUid", @@ -55169,6 +59801,87 @@ }, "additionalProperties": false, "description": "Specification for a holding or quantity of (weight for) an instrument on a given date." + }, + "WeightedInstruments": { + "required": [ + "instruments" + ], + "type": "object", + "properties": { + "instruments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeightedInstrument" + }, + "description": "The instruments that are held in the set." + } + }, + "additionalProperties": false, + "description": "Class that models a set of instruments of which each has some quantity and can be identified by a unique label." + }, + "YieldCurveData": { + "allOf": [ + { + "$ref": "#/components/schemas/ComplexMarketData" + }, + { + "required": [ + "baseDate", + "instruments", + "marketDataType", + "quotes" + ], + "type": "object", + "properties": { + "baseDate": { + "type": "string", + "description": "Base date", + "format": "date-time" + }, + "instruments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LusidInstrument" + }, + "description": "The set of instruments that define the curve." + }, + "quotes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MarketQuote" + }, + "description": "The market quotes corresponding to the the instruments used to define the curve" + }, + "lineage": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'.", + "nullable": true + }, + "marketDataType": { + "enum": [ + "DiscountFactorCurveData", + "EquityVolSurfaceData", + "FxVolSurfaceData", + "IrVolCubeData", + "OpaqueMarketData", + "YieldCurveData", + "FxForwardCurveData", + "FxForwardPipsCurveData", + "FxForwardTenorCurveData", + "FxForwardTenorPipsCurveData", + "FxForwardCurveByQuoteReference", + "CreditSpreadCurveData", + "EquityCurveByPricesData" + ], + "type": "string", + "description": "The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData" + } + } + } + ], + "description": "Market data for a yield curve, represented by a list of instruments and corresponding market quotes" } }, "securitySchemes": { @@ -55177,7 +59890,7 @@ "description": "OAuth2 Implicit Grant", "flows": { "implicit": { - "authorizationUrl": "https://dummyurl.lusid.com/", + "authorizationUrl": "https://lusid.okta.com/oauth2/default/v1/authorize", "scopes": {} } } diff --git a/sdk/README.md b/sdk/README.md index 1884ab24a21..78f06d9cfcb 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -53,10 +53,10 @@ import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -66,7 +66,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -88,7 +88,7 @@ with lusid.ApiClient(configuration) as api_client: ## Documentation for API Endpoints -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -299,19 +299,38 @@ Class | Method | HTTP request | Description - [AnnulQuotesResponse](docs/AnnulQuotesResponse.md) - [AnnulSingleStructuredDataResponse](docs/AnnulSingleStructuredDataResponse.md) - [AnnulStructuredDataResponse](docs/AnnulStructuredDataResponse.md) + - [Barrier](docs/Barrier.md) + - [Basket](docs/Basket.md) + - [BasketAllOf](docs/BasketAllOf.md) + - [BasketIdentifier](docs/BasketIdentifier.md) + - [Bond](docs/Bond.md) + - [BondAllOf](docs/BondAllOf.md) - [Calendar](docs/Calendar.md) - [CalendarDate](docs/CalendarDate.md) + - [CapFloor](docs/CapFloor.md) + - [CapFloorAllOf](docs/CapFloorAllOf.md) - [CashLadderRecord](docs/CashLadderRecord.md) + - [CashPerpetual](docs/CashPerpetual.md) + - [CashPerpetualAllOf](docs/CashPerpetualAllOf.md) + - [CdsFlowConventions](docs/CdsFlowConventions.md) + - [CdsIndex](docs/CdsIndex.md) + - [CdsIndexAllOf](docs/CdsIndexAllOf.md) + - [CdsProtectionDetailSpecification](docs/CdsProtectionDetailSpecification.md) - [Change](docs/Change.md) - [ChangeHistory](docs/ChangeHistory.md) - [ChangeItem](docs/ChangeItem.md) - [CompletePortfolio](docs/CompletePortfolio.md) - [CompleteRelationship](docs/CompleteRelationship.md) + - [ComplexBond](docs/ComplexBond.md) + - [ComplexBondAllOf](docs/ComplexBondAllOf.md) - [ComplexMarketData](docs/ComplexMarketData.md) - [ComplexMarketDataId](docs/ComplexMarketDataId.md) + - [Compounding](docs/Compounding.md) - [ConfigurationRecipe](docs/ConfigurationRecipe.md) - [ConfigurationRecipeSnippet](docs/ConfigurationRecipeSnippet.md) - [ConstituentsAdjustmentHeader](docs/ConstituentsAdjustmentHeader.md) + - [ContractForDifference](docs/ContractForDifference.md) + - [ContractForDifferenceAllOf](docs/ContractForDifferenceAllOf.md) - [CorporateAction](docs/CorporateAction.md) - [CorporateActionSource](docs/CorporateActionSource.md) - [CorporateActionTransition](docs/CorporateActionTransition.md) @@ -335,7 +354,11 @@ Class | Method | HTTP request | Description - [CreateSequenceRequest](docs/CreateSequenceRequest.md) - [CreateTransactionPortfolioRequest](docs/CreateTransactionPortfolioRequest.md) - [CreateUnitDefinition](docs/CreateUnitDefinition.md) + - [CreditDefaultSwap](docs/CreditDefaultSwap.md) + - [CreditDefaultSwapAllOf](docs/CreditDefaultSwapAllOf.md) - [CreditRating](docs/CreditRating.md) + - [CreditSpreadCurveData](docs/CreditSpreadCurveData.md) + - [CreditSpreadCurveDataAllOf](docs/CreditSpreadCurveDataAllOf.md) - [CurrencyAndAmount](docs/CurrencyAndAmount.md) - [CutLabelDefinition](docs/CutLabelDefinition.md) - [CutLocalTime](docs/CutLocalTime.md) @@ -348,16 +371,71 @@ Class | Method | HTTP request | Description - [DeleteRelationshipRequest](docs/DeleteRelationshipRequest.md) - [DeletedEntityResponse](docs/DeletedEntityResponse.md) - [DependencySourceFilter](docs/DependencySourceFilter.md) + - [DiscountFactorCurveData](docs/DiscountFactorCurveData.md) + - [DiscountFactorCurveDataAllOf](docs/DiscountFactorCurveDataAllOf.md) + - [EmptyModelOptions](docs/EmptyModelOptions.md) + - [EmptyModelOptionsAllOf](docs/EmptyModelOptionsAllOf.md) - [EntityIdentifier](docs/EntityIdentifier.md) + - [Equity](docs/Equity.md) + - [EquityAllOf](docs/EquityAllOf.md) + - [EquityAllOfIdentifiers](docs/EquityAllOfIdentifiers.md) + - [EquityCurveByPricesData](docs/EquityCurveByPricesData.md) + - [EquityCurveByPricesDataAllOf](docs/EquityCurveByPricesDataAllOf.md) + - [EquityModelOptions](docs/EquityModelOptions.md) + - [EquityModelOptionsAllOf](docs/EquityModelOptionsAllOf.md) + - [EquityOption](docs/EquityOption.md) + - [EquityOptionAllOf](docs/EquityOptionAllOf.md) + - [EquitySwap](docs/EquitySwap.md) + - [EquitySwapAllOf](docs/EquitySwapAllOf.md) + - [EquityVolSurfaceData](docs/EquityVolSurfaceData.md) + - [EquityVolSurfaceDataAllOf](docs/EquityVolSurfaceDataAllOf.md) - [ErrorDetail](docs/ErrorDetail.md) + - [ExchangeTradedOption](docs/ExchangeTradedOption.md) + - [ExchangeTradedOptionAllOf](docs/ExchangeTradedOptionAllOf.md) + - [ExchangeTradedOptionContractDetails](docs/ExchangeTradedOptionContractDetails.md) - [Execution](docs/Execution.md) - [ExecutionRequest](docs/ExecutionRequest.md) - [ExecutionSetRequest](docs/ExecutionSetRequest.md) + - [ExoticInstrument](docs/ExoticInstrument.md) + - [ExoticInstrumentAllOf](docs/ExoticInstrumentAllOf.md) - [ExpandedGroup](docs/ExpandedGroup.md) - [FieldDefinition](docs/FieldDefinition.md) - [FieldSchema](docs/FieldSchema.md) - [FieldValue](docs/FieldValue.md) - [FileResponse](docs/FileResponse.md) + - [FixedLeg](docs/FixedLeg.md) + - [FixedLegAllOf](docs/FixedLegAllOf.md) + - [FixedLegAllOfOverrides](docs/FixedLegAllOfOverrides.md) + - [FloatingLeg](docs/FloatingLeg.md) + - [FloatingLegAllOf](docs/FloatingLegAllOf.md) + - [FlowConventionName](docs/FlowConventionName.md) + - [FlowConventions](docs/FlowConventions.md) + - [ForwardRateAgreement](docs/ForwardRateAgreement.md) + - [ForwardRateAgreementAllOf](docs/ForwardRateAgreementAllOf.md) + - [FundingLeg](docs/FundingLeg.md) + - [FundingLegAllOf](docs/FundingLegAllOf.md) + - [Future](docs/Future.md) + - [FutureAllOf](docs/FutureAllOf.md) + - [FuturesContractDetails](docs/FuturesContractDetails.md) + - [FxForward](docs/FxForward.md) + - [FxForwardAllOf](docs/FxForwardAllOf.md) + - [FxForwardCurveByQuoteReference](docs/FxForwardCurveByQuoteReference.md) + - [FxForwardCurveByQuoteReferenceAllOf](docs/FxForwardCurveByQuoteReferenceAllOf.md) + - [FxForwardCurveData](docs/FxForwardCurveData.md) + - [FxForwardCurveDataAllOf](docs/FxForwardCurveDataAllOf.md) + - [FxForwardModelOptions](docs/FxForwardModelOptions.md) + - [FxForwardModelOptionsAllOf](docs/FxForwardModelOptionsAllOf.md) + - [FxForwardPipsCurveData](docs/FxForwardPipsCurveData.md) + - [FxForwardPipsCurveDataAllOf](docs/FxForwardPipsCurveDataAllOf.md) + - [FxForwardTenorCurveData](docs/FxForwardTenorCurveData.md) + - [FxForwardTenorCurveDataAllOf](docs/FxForwardTenorCurveDataAllOf.md) + - [FxForwardTenorPipsCurveData](docs/FxForwardTenorPipsCurveData.md) + - [FxForwardTenorPipsCurveDataAllOf](docs/FxForwardTenorPipsCurveDataAllOf.md) + - [FxOption](docs/FxOption.md) + - [FxOptionAllOf](docs/FxOptionAllOf.md) + - [FxSwap](docs/FxSwap.md) + - [FxSwapAllOf](docs/FxSwapAllOf.md) + - [FxVolSurfaceData](docs/FxVolSurfaceData.md) - [GetComplexMarketDataResponse](docs/GetComplexMarketDataResponse.md) - [GetInstrumentsResponse](docs/GetInstrumentsResponse.md) - [GetQuotesResponse](docs/GetQuotesResponse.md) @@ -370,15 +448,31 @@ Class | Method | HTTP request | Description - [IUnitDefinitionDto](docs/IUnitDefinitionDto.md) - [IdSelectorDefinition](docs/IdSelectorDefinition.md) - [IdentifierPartSchema](docs/IdentifierPartSchema.md) + - [IndexConvention](docs/IndexConvention.md) + - [IndexModelOptions](docs/IndexModelOptions.md) + - [IndexModelOptionsAllOf](docs/IndexModelOptionsAllOf.md) - [IndustryClassifier](docs/IndustryClassifier.md) + - [InflationLinkedBond](docs/InflationLinkedBond.md) + - [InflationLinkedBondAllOf](docs/InflationLinkedBondAllOf.md) - [InlineValuationRequest](docs/InlineValuationRequest.md) - [Instrument](docs/Instrument.md) - [InstrumentDefinition](docs/InstrumentDefinition.md) + - [InstrumentDefinitionFormat](docs/InstrumentDefinitionFormat.md) - [InstrumentIdTypeDescriptor](docs/InstrumentIdTypeDescriptor.md) - [InstrumentIdValue](docs/InstrumentIdValue.md) + - [InstrumentLeg](docs/InstrumentLeg.md) + - [InstrumentLegAllOf](docs/InstrumentLegAllOf.md) + - [InterestRateSwap](docs/InterestRateSwap.md) + - [InterestRateSwapAllOf](docs/InterestRateSwapAllOf.md) + - [InterestRateSwaption](docs/InterestRateSwaption.md) + - [InterestRateSwaptionAllOf](docs/InterestRateSwaptionAllOf.md) + - [IrVolCubeData](docs/IrVolCubeData.md) + - [IrVolCubeDataAllOf](docs/IrVolCubeDataAllOf.md) - [IsBusinessDayResponse](docs/IsBusinessDayResponse.md) - [LabelValueSet](docs/LabelValueSet.md) + - [LegDefinition](docs/LegDefinition.md) - [LegalEntity](docs/LegalEntity.md) + - [LevelStep](docs/LevelStep.md) - [Link](docs/Link.md) - [ListAggregationResponse](docs/ListAggregationResponse.md) - [LusidInstrument](docs/LusidInstrument.md) @@ -390,11 +484,16 @@ Class | Method | HTTP request | Description - [MarketDataKeyRule](docs/MarketDataKeyRule.md) - [MarketDataSpecificRule](docs/MarketDataSpecificRule.md) - [MarketOptions](docs/MarketOptions.md) + - [MarketQuote](docs/MarketQuote.md) - [MetricValue](docs/MetricValue.md) - [ModelOptions](docs/ModelOptions.md) - [ModelProperty](docs/ModelProperty.md) - [ModelSelection](docs/ModelSelection.md) - [NextValueInSequenceResponse](docs/NextValueInSequenceResponse.md) + - [OpaqueMarketData](docs/OpaqueMarketData.md) + - [OpaqueMarketDataAllOf](docs/OpaqueMarketDataAllOf.md) + - [OpaqueModelOptions](docs/OpaqueModelOptions.md) + - [OpaqueModelOptionsAllOf](docs/OpaqueModelOptionsAllOf.md) - [Order](docs/Order.md) - [OrderBySpec](docs/OrderBySpec.md) - [OrderRequest](docs/OrderRequest.md) @@ -429,8 +528,11 @@ Class | Method | HTTP request | Description - [PortfolioHolding](docs/PortfolioHolding.md) - [PortfolioProperties](docs/PortfolioProperties.md) - [PortfolioReconciliationRequest](docs/PortfolioReconciliationRequest.md) + - [PortfolioResultDataKeyRule](docs/PortfolioResultDataKeyRule.md) + - [PortfolioResultDataKeyRuleAllOf](docs/PortfolioResultDataKeyRuleAllOf.md) - [PortfolioSearchResult](docs/PortfolioSearchResult.md) - [PortfoliosReconciliationRequest](docs/PortfoliosReconciliationRequest.md) + - [Premium](docs/Premium.md) - [PricingContext](docs/PricingContext.md) - [PricingOptions](docs/PricingOptions.md) - [ProcessedCommand](docs/ProcessedCommand.md) @@ -445,11 +547,15 @@ Class | Method | HTTP request | Description - [RealisedGainLoss](docs/RealisedGainLoss.md) - [ReconciliationBreak](docs/ReconciliationBreak.md) - [ReferenceData](docs/ReferenceData.md) + - [ReferenceInstrument](docs/ReferenceInstrument.md) + - [ReferenceInstrumentAllOf](docs/ReferenceInstrumentAllOf.md) - [ReferencePortfolioConstituent](docs/ReferencePortfolioConstituent.md) - [ReferencePortfolioConstituentRequest](docs/ReferencePortfolioConstituentRequest.md) - [RelatedEntity](docs/RelatedEntity.md) - [Relationship](docs/Relationship.md) - [RelationshipDefinition](docs/RelationshipDefinition.md) + - [Repo](docs/Repo.md) + - [RepoAllOf](docs/RepoAllOf.md) - [ResourceId](docs/ResourceId.md) - [ResourceListOfAccessControlledResource](docs/ResourceListOfAccessControlledResource.md) - [ResourceListOfAccessMetadataValueOf](docs/ResourceListOfAccessMetadataValueOf.md) @@ -480,16 +586,25 @@ Class | Method | HTTP request | Description - [ResourceListOfRelationship](docs/ResourceListOfRelationship.md) - [ResourceListOfScopeDefinition](docs/ResourceListOfScopeDefinition.md) - [ResponseMetaData](docs/ResponseMetaData.md) + - [ResultDataKeyRule](docs/ResultDataKeyRule.md) + - [ResultDataKeyRuleAllOf](docs/ResultDataKeyRuleAllOf.md) - [ResultDataSchema](docs/ResultDataSchema.md) - [ResultKeyRule](docs/ResultKeyRule.md) + - [Schedule](docs/Schedule.md) - [ScopeDefinition](docs/ScopeDefinition.md) - [SequenceDefinition](docs/SequenceDefinition.md) - [SetLegalEntityIdentifiersRequest](docs/SetLegalEntityIdentifiersRequest.md) - [SetLegalEntityPropertiesRequest](docs/SetLegalEntityPropertiesRequest.md) - [SideConfigurationData](docs/SideConfigurationData.md) + - [SimpleInstrument](docs/SimpleInstrument.md) + - [SimpleInstrumentAllOf](docs/SimpleInstrumentAllOf.md) + - [StepSchedule](docs/StepSchedule.md) - [Stream](docs/Stream.md) - [TargetTaxLot](docs/TargetTaxLot.md) - [TargetTaxLotRequest](docs/TargetTaxLotRequest.md) + - [TermDeposit](docs/TermDeposit.md) + - [TermDepositAllOf](docs/TermDepositAllOf.md) + - [Touch](docs/Touch.md) - [Transaction](docs/Transaction.md) - [TransactionConfigurationData](docs/TransactionConfigurationData.md) - [TransactionConfigurationDataRequest](docs/TransactionConfigurationDataRequest.md) @@ -545,6 +660,9 @@ Class | Method | HTTP request | Description - [VersionedResourceListOfTransaction](docs/VersionedResourceListOfTransaction.md) - [WeekendMask](docs/WeekendMask.md) - [WeightedInstrument](docs/WeightedInstrument.md) + - [WeightedInstruments](docs/WeightedInstruments.md) + - [YieldCurveData](docs/YieldCurveData.md) + - [YieldCurveDataAllOf](docs/YieldCurveDataAllOf.md) ## Documentation For Authorization @@ -554,7 +672,7 @@ Class | Method | HTTP request | Description - **Type**: OAuth - **Flow**: implicit -- **Authorization URL**: https://dummyurl.lusid.com/ +- **Authorization URL**: https://lusid.okta.com/oauth2/default/v1/authorize - **Scopes**: N/A diff --git a/sdk/docs/AggregationApi.md b/sdk/docs/AggregationApi.md index 78cd3fce86e..d21dbb29445 100644 --- a/sdk/docs/AggregationApi.md +++ b/sdk/docs/AggregationApi.md @@ -1,6 +1,6 @@ # lusid.AggregationApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -24,10 +24,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -37,7 +37,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -99,10 +99,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -112,7 +112,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/AllocationsApi.md b/sdk/docs/AllocationsApi.md index 027919f0e19..3df0312fda0 100644 --- a/sdk/docs/AllocationsApi.md +++ b/sdk/docs/AllocationsApi.md @@ -1,6 +1,6 @@ # lusid.AllocationsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -184,10 +184,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -197,7 +197,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -271,10 +271,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -284,7 +284,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/ApplicationMetadataApi.md b/sdk/docs/ApplicationMetadataApi.md index f6a7bcded67..d1b10478378 100644 --- a/sdk/docs/ApplicationMetadataApi.md +++ b/sdk/docs/ApplicationMetadataApi.md @@ -1,6 +1,6 @@ # lusid.ApplicationMetadataApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -38,7 +38,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -100,10 +100,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -113,7 +113,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -170,10 +170,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -183,7 +183,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/Barrier.md b/sdk/docs/Barrier.md new file mode 100644 index 00000000000..c25bb41cfb4 --- /dev/null +++ b/sdk/docs/Barrier.md @@ -0,0 +1,15 @@ +# Barrier + +Barrier class for exotic FxOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | **str** | Supported string (enumeration) values are: [Down, Up]. | +**level** | **float** | Trigger level, which the underlying should (or should not) cross/touch. | +**monitoring** | **str** | Supported string (enumeration) values are: [European, Bermudan, American]. | [optional] +**type** | **str** | Supported string (enumeration) values are: [Knockin, Knockout]. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/Basket.md b/sdk/docs/Basket.md new file mode 100644 index 00000000000..8e862161f61 --- /dev/null +++ b/sdk/docs/Basket.md @@ -0,0 +1,15 @@ +# Basket + +LUSID representation of a basket of instruments. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**basket_name** | [**BasketIdentifier**](BasketIdentifier.md) | | +**basket_type** | **str** | What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. | +**weighted_instruments** | [**WeightedInstruments**](WeightedInstruments.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/BasketAllOf.md b/sdk/docs/BasketAllOf.md new file mode 100644 index 00000000000..65e93ee84ef --- /dev/null +++ b/sdk/docs/BasketAllOf.md @@ -0,0 +1,14 @@ +# BasketAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**basket_name** | [**BasketIdentifier**](BasketIdentifier.md) | | +**basket_type** | **str** | What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. | +**weighted_instruments** | [**WeightedInstruments**](WeightedInstruments.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/BasketIdentifier.md b/sdk/docs/BasketIdentifier.md new file mode 100644 index 00000000000..a7d644c36d2 --- /dev/null +++ b/sdk/docs/BasketIdentifier.md @@ -0,0 +1,15 @@ +# BasketIdentifier + +Descriptive information that describes a particular basket of instruments. Most commonly required with a CDS Index or similarly defined instrument. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **str** | Index set, e.g. iTraxx or CDX. | +**name** | **str** | The index name within the set, e.g. \"MAIN\" or \"Crossover\". | +**region** | **str** | Applicable geographic country or region. Typically something like \"Europe\", \"Asia ex-Japan\", \"Japan\" or \"Australia\". | +**series_id** | **int** | The series identifier. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/Bond.md b/sdk/docs/Bond.md new file mode 100644 index 00000000000..e88ba6ca96b --- /dev/null +++ b/sdk/docs/Bond.md @@ -0,0 +1,23 @@ +# Bond + +LUSID representation of a Vanilla Fixed Rate Bond. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the bond's first coupon start date or accrual state date (if settle days = 0) | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**flow_conventions** | [**FlowConventions**](FlowConventions.md) | | +**principal** | **float** | The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. | +**coupon_rate** | **float** | Simple coupon rate. | +**identifiers** | **dict(str, str)** | External market codes and identifiers for the bond, e.g. ISIN. | [optional] +**ex_dividend_days** | **int** | Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). | [optional] +**initial_coupon_date** | **datetime** | The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. | [optional] +**first_coupon_pay_date** | **datetime** | The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. | [optional] +**calculation_type** | **str** | The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/BondAllOf.md b/sdk/docs/BondAllOf.md new file mode 100644 index 00000000000..13d1e6eb17d --- /dev/null +++ b/sdk/docs/BondAllOf.md @@ -0,0 +1,22 @@ +# BondAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the bond's first coupon start date or accrual state date (if settle days = 0) | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**flow_conventions** | [**FlowConventions**](FlowConventions.md) | | +**principal** | **float** | The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. | +**coupon_rate** | **float** | Simple coupon rate. | +**identifiers** | **dict(str, str)** | External market codes and identifiers for the bond, e.g. ISIN. | [optional] +**ex_dividend_days** | **int** | Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). | [optional] +**initial_coupon_date** | **datetime** | The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. | [optional] +**first_coupon_pay_date** | **datetime** | The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. | [optional] +**calculation_type** | **str** | The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CalendarsApi.md b/sdk/docs/CalendarsApi.md index b03907079dc..8275b786ebc 100644 --- a/sdk/docs/CalendarsApi.md +++ b/sdk/docs/CalendarsApi.md @@ -1,6 +1,6 @@ # lusid.CalendarsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -34,10 +34,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -47,7 +47,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -111,10 +111,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -124,7 +124,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -190,10 +190,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -203,7 +203,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -265,10 +265,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -278,7 +278,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -342,10 +342,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -355,7 +355,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -421,10 +421,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -434,7 +434,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -500,10 +500,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -513,7 +513,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -579,10 +579,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -592,7 +592,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -664,10 +664,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -677,7 +677,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -745,10 +745,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -758,7 +758,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -826,10 +826,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -839,7 +839,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -911,10 +911,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -924,7 +924,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/CapFloor.md b/sdk/docs/CapFloor.md new file mode 100644 index 00000000000..4a520d3030c --- /dev/null +++ b/sdk/docs/CapFloor.md @@ -0,0 +1,17 @@ +# CapFloor + +LUSID representation of Cap, Floor, or Collar. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cap_floor_type** | **str** | Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. | +**cap_strike** | **float** | Strike rate of the Cap. | +**floor_strike** | **float** | Strike rate of the Floor. | +**include_first_caplet** | **bool** | Include first caplet flag. | +**underlying_floating_leg** | [**FloatingLeg**](FloatingLeg.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CapFloorAllOf.md b/sdk/docs/CapFloorAllOf.md new file mode 100644 index 00000000000..e9665b5ca06 --- /dev/null +++ b/sdk/docs/CapFloorAllOf.md @@ -0,0 +1,16 @@ +# CapFloorAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cap_floor_type** | **str** | Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. | +**cap_strike** | **float** | Strike rate of the Cap. | +**floor_strike** | **float** | Strike rate of the Floor. | +**include_first_caplet** | **bool** | Include first caplet flag. | +**underlying_floating_leg** | [**FloatingLeg**](FloatingLeg.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CashPerpetual.md b/sdk/docs/CashPerpetual.md new file mode 100644 index 00000000000..51aea6a5fc3 --- /dev/null +++ b/sdk/docs/CashPerpetual.md @@ -0,0 +1,15 @@ +# CashPerpetual + +LUSID representation of a Perpetual Cash Flow. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**principal** | **float** | The face-value or principal for the cash at outset. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CashPerpetualAllOf.md b/sdk/docs/CashPerpetualAllOf.md new file mode 100644 index 00000000000..51e44fa936c --- /dev/null +++ b/sdk/docs/CashPerpetualAllOf.md @@ -0,0 +1,14 @@ +# CashPerpetualAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**principal** | **float** | The face-value or principal for the cash at outset. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CdsFlowConventions.md b/sdk/docs/CdsFlowConventions.md new file mode 100644 index 00000000000..4e342869929 --- /dev/null +++ b/sdk/docs/CdsFlowConventions.md @@ -0,0 +1,21 @@ +# CdsFlowConventions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roll_frequency** | **str** | The frequency at which the reference bonds are updated, this defaults to 6M, but can be 3M, exp for historically issued products | [optional] +**currency** | **str** | Currency of the flow convention. | +**payment_frequency** | **str** | When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. | +**day_count_convention** | **str** | when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. | +**roll_convention** | **str** | When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, EndOfMonth, EOM, EndOfMonthPrevious, EOMP, EndOfMonthFollowing, EOMF, HalfMonthModifiedFollowing]. | +**payment_calendars** | **list[str]** | An array of strings denoting holiday calendars that apply to generation of payment schedules. | +**reset_calendars** | **list[str]** | An array of strings denoting holiday calendars that apply to generation of reset schedules. | +**settle_days** | **int** | Number of Good Business Days between the trade date and the effective or settlement date of the instrument. | +**reset_days** | **int** | The number of Good Business Days between determination and payment of reset. | +**scope** | **str** | The scope used when updating or inserting the convention. | [optional] +**code** | **str** | The code of the convention. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CdsIndex.md b/sdk/docs/CdsIndex.md new file mode 100644 index 00000000000..2a461ab9ca7 --- /dev/null +++ b/sdk/docs/CdsIndex.md @@ -0,0 +1,20 @@ +# CdsIndex + +LUSID representation of a Credit Default Swap Index (CDX). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**flow_conventions** | [**CdsFlowConventions**](CdsFlowConventions.md) | | [optional] +**coupon_rate** | **float** | The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. | +**identifiers** | **dict(str, str)** | external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. | +**basket** | [**Basket**](Basket.md) | | +**convention_name** | [**FlowConventionName**](FlowConventionName.md) | | [optional] +**notional** | **float** | The notional quantity that applies to both the premium and protection legs. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CdsIndexAllOf.md b/sdk/docs/CdsIndexAllOf.md new file mode 100644 index 00000000000..9a5c16fda80 --- /dev/null +++ b/sdk/docs/CdsIndexAllOf.md @@ -0,0 +1,19 @@ +# CdsIndexAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**flow_conventions** | [**CdsFlowConventions**](CdsFlowConventions.md) | | [optional] +**coupon_rate** | **float** | The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. | +**identifiers** | **dict(str, str)** | external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. | +**basket** | [**Basket**](Basket.md) | | +**convention_name** | [**FlowConventionName**](FlowConventionName.md) | | [optional] +**notional** | **float** | The notional quantity that applies to both the premium and protection legs. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CdsProtectionDetailSpecification.md b/sdk/docs/CdsProtectionDetailSpecification.md new file mode 100644 index 00000000000..4c52fb12217 --- /dev/null +++ b/sdk/docs/CdsProtectionDetailSpecification.md @@ -0,0 +1,15 @@ +# CdsProtectionDetailSpecification + +CDSs generally conform to fairly standard definitions, but can be tweaked in a number of different ways. This class gathers a number of common features which may deviate. These will default to the market standard when no overrides are provided. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**seniority** | **str** | The seniority level of the CDS. Supported string (enumeration) values are: [SNR, SUB, JRSUBUT2, PREFT1, SECDOM, SNRFOR, SUBLT2]. | +**restructuring_type** | **str** | The restructuring clause. Supported string (enumeration) values are: [CR, MR, MM, XR]. | +**protect_start_day** | **bool** | Does the protection leg pay out in the case of default on the start date. | +**pay_accrued_interest_on_default** | **bool** | Should accrued interest on the premium leg be paid if a credit event occurs. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ComplexBond.md b/sdk/docs/ComplexBond.md new file mode 100644 index 00000000000..92a1d3766da --- /dev/null +++ b/sdk/docs/ComplexBond.md @@ -0,0 +1,15 @@ +# ComplexBond + +LUSID representation of a Complex Bond. Including Floating, Callable, Puttable, Sinkable, and Fixed-to-float. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifiers** | **dict(str, str)** | external market codes and identifiers for the bond, e.g. ISIN. | [optional] +**calculation_type** | **str** | The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. | [optional] +**schedules** | [**list[Schedule]**](Schedule.md) | schedules. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ComplexBondAllOf.md b/sdk/docs/ComplexBondAllOf.md new file mode 100644 index 00000000000..d50144e4054 --- /dev/null +++ b/sdk/docs/ComplexBondAllOf.md @@ -0,0 +1,14 @@ +# ComplexBondAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifiers** | **dict(str, str)** | external market codes and identifiers for the bond, e.g. ISIN. | [optional] +**calculation_type** | **str** | The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. | [optional] +**schedules** | [**list[Schedule]**](Schedule.md) | schedules. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ComplexMarketDataApi.md b/sdk/docs/ComplexMarketDataApi.md index 68741773bf5..51837e0bc53 100644 --- a/sdk/docs/ComplexMarketDataApi.md +++ b/sdk/docs/ComplexMarketDataApi.md @@ -1,6 +1,6 @@ # lusid.ComplexMarketDataApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -38,7 +38,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -102,10 +102,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -115,7 +115,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -185,10 +185,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -198,7 +198,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/Compounding.md b/sdk/docs/Compounding.md new file mode 100644 index 00000000000..d5f98b7bbd0 --- /dev/null +++ b/sdk/docs/Compounding.md @@ -0,0 +1,16 @@ +# Compounding + +The compounding settings used on interest rate. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**calculation_shift_method** | **str** | Defines which resets and day counts are used for the rate calculation Supported string (enumeration) values are: [Lookback, NoShift, ObservationPeriodShift, Lockout]. | [optional] +**compounding_method** | **str** | If the interest rate is simple or compounded. Supported string (enumeration) values are: [Average, Compounded]. | +**reset_frequency** | **str** | The interest payment frequency. | +**shift** | **int** | Defines the number of days to lockout or shift observation period by - should be a non-negative integer | [optional] +**spread_compounding_method** | **str** | Defines how the computed leg spread is applied to compounded rate. It applies only when CompoundingMethod = ‘Compounded‘. Supported string (enumeration) values are: [Straight, IsdaCompounding, NoCompounding, SpreadExclusive, IsdaFlatCompounding, Flat, None]. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ConfigurationRecipeApi.md b/sdk/docs/ConfigurationRecipeApi.md index 4addf9cda8c..6397896ca61 100644 --- a/sdk/docs/ConfigurationRecipeApi.md +++ b/sdk/docs/ConfigurationRecipeApi.md @@ -1,6 +1,6 @@ # lusid.ConfigurationRecipeApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -182,10 +182,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -195,7 +195,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -259,10 +259,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -272,7 +272,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/ContractForDifference.md b/sdk/docs/ContractForDifference.md new file mode 100644 index 00000000000..d946b199fc0 --- /dev/null +++ b/sdk/docs/ContractForDifference.md @@ -0,0 +1,21 @@ +# ContractForDifference + +LUSID representation of a Contract for Difference. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the CFD. | +**maturity_date** | **datetime** | The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. | [optional] +**code** | **str** | The code of the underlying. | +**contract_size** | **float** | The size of the CFD contract, this should represent the total number of stocks that the CFD represents. | +**pay_ccy** | **str** | The currency that this CFD pays out, this can be different to the UnderlyingCcy. | +**reference_rate** | **float** | The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. | [optional] +**type** | **str** | The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. | +**underlying_ccy** | **str** | The currency of the underlying | +**underlying_identifier** | **str** | external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ContractForDifferenceAllOf.md b/sdk/docs/ContractForDifferenceAllOf.md new file mode 100644 index 00000000000..d64b027ef5a --- /dev/null +++ b/sdk/docs/ContractForDifferenceAllOf.md @@ -0,0 +1,20 @@ +# ContractForDifferenceAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the CFD. | +**maturity_date** | **datetime** | The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. | [optional] +**code** | **str** | The code of the underlying. | +**contract_size** | **float** | The size of the CFD contract, this should represent the total number of stocks that the CFD represents. | +**pay_ccy** | **str** | The currency that this CFD pays out, this can be different to the UnderlyingCcy. | +**reference_rate** | **float** | The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. | [optional] +**type** | **str** | The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. | +**underlying_ccy** | **str** | The currency of the underlying | +**underlying_identifier** | **str** | external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CorporateActionSourcesApi.md b/sdk/docs/CorporateActionSourcesApi.md index 9939c0e26a1..a6d573828e6 100644 --- a/sdk/docs/CorporateActionSourcesApi.md +++ b/sdk/docs/CorporateActionSourcesApi.md @@ -1,6 +1,6 @@ # lusid.CorporateActionSourcesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -105,10 +105,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -118,7 +118,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -180,10 +180,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -193,7 +193,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -269,10 +269,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -282,7 +282,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/CreditDefaultSwap.md b/sdk/docs/CreditDefaultSwap.md new file mode 100644 index 00000000000..ddc8e96f0a8 --- /dev/null +++ b/sdk/docs/CreditDefaultSwap.md @@ -0,0 +1,20 @@ +# CreditDefaultSwap + +LUSID representation of a Credit Default Swap (CDS). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ticker** | **str** | A ticker to uniquely specify then entity against which the cds is written. | +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**flow_conventions** | [**CdsFlowConventions**](CdsFlowConventions.md) | | [optional] +**coupon_rate** | **float** | The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. | +**convention_name** | [**FlowConventionName**](FlowConventionName.md) | | [optional] +**notional** | **float** | The notional protected by the Credit Default Swap | [optional] +**protection_detail_specification** | [**CdsProtectionDetailSpecification**](CdsProtectionDetailSpecification.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CreditDefaultSwapAllOf.md b/sdk/docs/CreditDefaultSwapAllOf.md new file mode 100644 index 00000000000..e4fc15c1987 --- /dev/null +++ b/sdk/docs/CreditDefaultSwapAllOf.md @@ -0,0 +1,19 @@ +# CreditDefaultSwapAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ticker** | **str** | A ticker to uniquely specify then entity against which the cds is written. | +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**flow_conventions** | [**CdsFlowConventions**](CdsFlowConventions.md) | | [optional] +**coupon_rate** | **float** | The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. | +**convention_name** | [**FlowConventionName**](FlowConventionName.md) | | [optional] +**notional** | **float** | The notional protected by the Credit Default Swap | [optional] +**protection_detail_specification** | [**CdsProtectionDetailSpecification**](CdsProtectionDetailSpecification.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CreditSpreadCurveData.md b/sdk/docs/CreditSpreadCurveData.md new file mode 100644 index 00000000000..8ff1d52830f --- /dev/null +++ b/sdk/docs/CreditSpreadCurveData.md @@ -0,0 +1,20 @@ +# CreditSpreadCurveData + +A credit spread curve matching tenors against par spread quotes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted rates | +**dom_ccy** | **str** | Domestic currency of the curve | +**tenors** | **list[str]** | The tenors for which the rates apply | +**spreads** | **list[float]** | Par spread quotes corresponding to the tenors. | +**recovery_rate** | **float** | The recovery rate in default. | +**reference_date** | **datetime** | If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. | [optional] +**maturities** | **list[datetime]** | The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. | [optional] +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CreditSpreadCurveDataAllOf.md b/sdk/docs/CreditSpreadCurveDataAllOf.md new file mode 100644 index 00000000000..1b66ca5a06a --- /dev/null +++ b/sdk/docs/CreditSpreadCurveDataAllOf.md @@ -0,0 +1,19 @@ +# CreditSpreadCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted rates | +**dom_ccy** | **str** | Domestic currency of the curve | +**tenors** | **list[str]** | The tenors for which the rates apply | +**spreads** | **list[float]** | Par spread quotes corresponding to the tenors. | +**recovery_rate** | **float** | The recovery rate in default. | +**reference_date** | **datetime** | If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. | [optional] +**maturities** | **list[datetime]** | The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. | [optional] +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/CutLabelDefinitionsApi.md b/sdk/docs/CutLabelDefinitionsApi.md index eddcfe30553..548eea4faf8 100644 --- a/sdk/docs/CutLabelDefinitionsApi.md +++ b/sdk/docs/CutLabelDefinitionsApi.md @@ -1,6 +1,6 @@ # lusid.CutLabelDefinitionsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -27,10 +27,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -40,7 +40,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -102,10 +102,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -115,7 +115,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -177,10 +177,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -190,7 +190,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -254,10 +254,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -267,7 +267,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -339,10 +339,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -352,7 +352,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/DataTypesApi.md b/sdk/docs/DataTypesApi.md index 72713fc55af..e70f4050e8d 100644 --- a/sdk/docs/DataTypesApi.md +++ b/sdk/docs/DataTypesApi.md @@ -1,6 +1,6 @@ # lusid.DataTypesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -29,10 +29,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -42,7 +42,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -104,10 +104,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -117,7 +117,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -183,10 +183,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -196,7 +196,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -266,10 +266,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -279,7 +279,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -351,10 +351,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -364,7 +364,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -438,10 +438,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -451,7 +451,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -517,10 +517,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -530,7 +530,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/DerivedTransactionPortfoliosApi.md b/sdk/docs/DerivedTransactionPortfoliosApi.md index e7b5027ae42..7ba403a3f01 100644 --- a/sdk/docs/DerivedTransactionPortfoliosApi.md +++ b/sdk/docs/DerivedTransactionPortfoliosApi.md @@ -1,6 +1,6 @@ # lusid.DerivedTransactionPortfoliosApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -24,10 +24,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -37,7 +37,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -101,10 +101,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -114,7 +114,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/DiscountFactorCurveData.md b/sdk/docs/DiscountFactorCurveData.md new file mode 100644 index 00000000000..90ac796210a --- /dev/null +++ b/sdk/docs/DiscountFactorCurveData.md @@ -0,0 +1,16 @@ +# DiscountFactorCurveData + +A curve containing discount factors and dates to which they apply + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | BaseDate for the Curve | +**dates** | **list[datetime]** | Dates for which the discount factors apply | +**discount_factors** | **list[float]** | Discount factors to be applied to cashflow on the specified dates | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/DiscountFactorCurveDataAllOf.md b/sdk/docs/DiscountFactorCurveDataAllOf.md new file mode 100644 index 00000000000..bd2f0149d8b --- /dev/null +++ b/sdk/docs/DiscountFactorCurveDataAllOf.md @@ -0,0 +1,15 @@ +# DiscountFactorCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | BaseDate for the Curve | +**dates** | **list[datetime]** | Dates for which the discount factors apply | +**discount_factors** | **list[float]** | Discount factors to be applied to cashflow on the specified dates | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EmptyModelOptions.md b/sdk/docs/EmptyModelOptions.md new file mode 100644 index 00000000000..c7a269c16ea --- /dev/null +++ b/sdk/docs/EmptyModelOptions.md @@ -0,0 +1,11 @@ +# EmptyModelOptions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EmptyModelOptionsAllOf.md b/sdk/docs/EmptyModelOptionsAllOf.md new file mode 100644 index 00000000000..861a9b7b846 --- /dev/null +++ b/sdk/docs/EmptyModelOptionsAllOf.md @@ -0,0 +1,11 @@ +# EmptyModelOptionsAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EntitiesApi.md b/sdk/docs/EntitiesApi.md index d2d8d5fd0ba..3ba0770ad7a 100644 --- a/sdk/docs/EntitiesApi.md +++ b/sdk/docs/EntitiesApi.md @@ -1,6 +1,6 @@ # lusid.EntitiesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,10 +23,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -36,7 +36,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/Equity.md b/sdk/docs/Equity.md new file mode 100644 index 00000000000..a4e562bc61a --- /dev/null +++ b/sdk/docs/Equity.md @@ -0,0 +1,14 @@ +# Equity + +LUSID representation of an Equity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifiers** | [**EquityAllOfIdentifiers**](EquityAllOfIdentifiers.md) | | [optional] +**dom_ccy** | **str** | The domestic currency of the instrument. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityAllOf.md b/sdk/docs/EquityAllOf.md new file mode 100644 index 00000000000..e86a67c4859 --- /dev/null +++ b/sdk/docs/EquityAllOf.md @@ -0,0 +1,13 @@ +# EquityAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifiers** | [**EquityAllOfIdentifiers**](EquityAllOfIdentifiers.md) | | [optional] +**dom_ccy** | **str** | The domestic currency of the instrument. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityAllOfIdentifiers.md b/sdk/docs/EquityAllOfIdentifiers.md new file mode 100644 index 00000000000..dc98d1453b2 --- /dev/null +++ b/sdk/docs/EquityAllOfIdentifiers.md @@ -0,0 +1,22 @@ +# EquityAllOfIdentifiers + +external market codes and identifiers for the equity, e.g. IBM + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lusid_instrument_id** | **str** | | [optional] +**isin** | **str** | | [optional] +**sedol** | **str** | | [optional] +**cusip** | **str** | | [optional] +**client_internal** | **str** | | [optional] +**figi** | **str** | | [optional] +**ric** | **str** | | [optional] +**quote_perm_id** | **str** | | [optional] +**red_code** | **str** | | [optional] +**bbgid** | **str** | | [optional] +**ice_code** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityCurveByPricesData.md b/sdk/docs/EquityCurveByPricesData.md new file mode 100644 index 00000000000..f548bafab23 --- /dev/null +++ b/sdk/docs/EquityCurveByPricesData.md @@ -0,0 +1,16 @@ +# EquityCurveByPricesData + +Contains data (i.e. dates and prices + metadata) for building Equity curves + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the provided prices | +**dates** | **list[datetime]** | Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**prices** | **list[float]** | Prices provided for the forward price of the Equity at the corresponding date in Dates. | +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityCurveByPricesDataAllOf.md b/sdk/docs/EquityCurveByPricesDataAllOf.md new file mode 100644 index 00000000000..f07d6641751 --- /dev/null +++ b/sdk/docs/EquityCurveByPricesDataAllOf.md @@ -0,0 +1,15 @@ +# EquityCurveByPricesDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the provided prices | +**dates** | **list[datetime]** | Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**prices** | **list[float]** | Prices provided for the forward price of the Equity at the corresponding date in Dates. | +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityModelOptions.md b/sdk/docs/EquityModelOptions.md new file mode 100644 index 00000000000..655b7448943 --- /dev/null +++ b/sdk/docs/EquityModelOptions.md @@ -0,0 +1,13 @@ +# EquityModelOptions + +Model options for equity related pricing. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**equity_forward_projection_type** | **str** | Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityModelOptionsAllOf.md b/sdk/docs/EquityModelOptionsAllOf.md new file mode 100644 index 00000000000..e238ea6168b --- /dev/null +++ b/sdk/docs/EquityModelOptionsAllOf.md @@ -0,0 +1,12 @@ +# EquityModelOptionsAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**equity_forward_projection_type** | **str** | Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityOption.md b/sdk/docs/EquityOption.md new file mode 100644 index 00000000000..eb8b77cf04c --- /dev/null +++ b/sdk/docs/EquityOption.md @@ -0,0 +1,24 @@ +# EquityOption + +LUSID representation of a plain vanilla OTC Equity Option. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**option_maturity_date** | **datetime** | The maturity date of the option. | +**option_settlement_date** | **datetime** | The settlement date of the option. | +**delivery_type** | **str** | is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. | +**option_type** | **str** | Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. | +**strike** | **float** | The strike of the option. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**underlying_identifier** | **str** | The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. | +**code** | **str** | The identifying code for the equity underlying, e.g. 'IBM.N'. | +**equity_option_type** | **str** | Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. | [optional] +**number_of_shares** | **float** | The amount of shares to exchange if the option is exercised. | [optional] +**premium** | [**Premium**](Premium.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityOptionAllOf.md b/sdk/docs/EquityOptionAllOf.md new file mode 100644 index 00000000000..32f644d5acf --- /dev/null +++ b/sdk/docs/EquityOptionAllOf.md @@ -0,0 +1,23 @@ +# EquityOptionAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**option_maturity_date** | **datetime** | The maturity date of the option. | +**option_settlement_date** | **datetime** | The settlement date of the option. | +**delivery_type** | **str** | is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. | +**option_type** | **str** | Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. | +**strike** | **float** | The strike of the option. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**underlying_identifier** | **str** | The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. | +**code** | **str** | The identifying code for the equity underlying, e.g. 'IBM.N'. | +**equity_option_type** | **str** | Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. | [optional] +**number_of_shares** | **float** | The amount of shares to exchange if the option is exercised. | [optional] +**premium** | [**Premium**](Premium.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquitySwap.md b/sdk/docs/EquitySwap.md new file mode 100644 index 00000000000..3e836527c26 --- /dev/null +++ b/sdk/docs/EquitySwap.md @@ -0,0 +1,23 @@ +# EquitySwap + +LUSID representation of an Equity Swap. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the EquitySwap. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**code** | **str** | The code of the underlying. | +**equity_flow_conventions** | [**FlowConventions**](FlowConventions.md) | | +**funding_leg** | [**InstrumentLeg**](InstrumentLeg.md) | | +**include_dividends** | **bool** | Dividend inclusion flag, if true dividends are included in the equity leg (total return). | +**initial_price** | **float** | The initial equity price of the Equity Swap. | +**notional_reset** | **bool** | Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). | +**quantity** | **float** | The quantity or number of shares in the Equity Swap. | +**underlying_identifier** | **str** | external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. | +**equity_swap_dividend_payment_timing** | **str** | Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquitySwapAllOf.md b/sdk/docs/EquitySwapAllOf.md new file mode 100644 index 00000000000..629e07a89df --- /dev/null +++ b/sdk/docs/EquitySwapAllOf.md @@ -0,0 +1,22 @@ +# EquitySwapAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the EquitySwap. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**code** | **str** | The code of the underlying. | +**equity_flow_conventions** | [**FlowConventions**](FlowConventions.md) | | +**funding_leg** | [**InstrumentLeg**](InstrumentLeg.md) | | +**include_dividends** | **bool** | Dividend inclusion flag, if true dividends are included in the equity leg (total return). | +**initial_price** | **float** | The initial equity price of the Equity Swap. | +**notional_reset** | **bool** | Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). | +**quantity** | **float** | The quantity or number of shares in the Equity Swap. | +**underlying_identifier** | **str** | external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. | +**equity_swap_dividend_payment_timing** | **str** | Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityVolSurfaceData.md b/sdk/docs/EquityVolSurfaceData.md new file mode 100644 index 00000000000..2a865e6046c --- /dev/null +++ b/sdk/docs/EquityVolSurfaceData.md @@ -0,0 +1,16 @@ +# EquityVolSurfaceData + +Market Data for an equity vol surface, represented by a list of instruments and corresponding market quotes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date of the surface | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | The set of instruments that define the surface. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/EquityVolSurfaceDataAllOf.md b/sdk/docs/EquityVolSurfaceDataAllOf.md new file mode 100644 index 00000000000..6e1e1e93396 --- /dev/null +++ b/sdk/docs/EquityVolSurfaceDataAllOf.md @@ -0,0 +1,15 @@ +# EquityVolSurfaceDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date of the surface | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | The set of instruments that define the surface. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ExchangeTradedOption.md b/sdk/docs/ExchangeTradedOption.md new file mode 100644 index 00000000000..a71afe6b9d0 --- /dev/null +++ b/sdk/docs/ExchangeTradedOption.md @@ -0,0 +1,16 @@ +# ExchangeTradedOption + +LUSID representation of an Exchange Traded Option. Including, but not limited to, Equity Options, Bond Options, Index Options, Future Options, and Interest Rate Options. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**contract_details** | [**ExchangeTradedOptionContractDetails**](ExchangeTradedOptionContractDetails.md) | | +**contracts** | **float** | The number of contracts held. | +**ref_spot_price** | **float** | The reference spot price for the option at which the contract was entered into. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ExchangeTradedOptionAllOf.md b/sdk/docs/ExchangeTradedOptionAllOf.md new file mode 100644 index 00000000000..a19f98f4057 --- /dev/null +++ b/sdk/docs/ExchangeTradedOptionAllOf.md @@ -0,0 +1,15 @@ +# ExchangeTradedOptionAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**contract_details** | [**ExchangeTradedOptionContractDetails**](ExchangeTradedOptionContractDetails.md) | | +**contracts** | **float** | The number of contracts held. | +**ref_spot_price** | **float** | The reference spot price for the option at which the contract was entered into. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ExchangeTradedOptionContractDetails.md b/sdk/docs/ExchangeTradedOptionContractDetails.md new file mode 100644 index 00000000000..3830d0286e0 --- /dev/null +++ b/sdk/docs/ExchangeTradedOptionContractDetails.md @@ -0,0 +1,24 @@ +# ExchangeTradedOptionContractDetails + +Most, if not all, information about contracts is standardised. See, e.g. https://www.cmegroup.com/ for common codes and similar data. This appears to be in common use by well known market information providers, e.g. Bloomberg and Refinitiv. There is a lot of overlap with this and FuturesContractDetails but as that is an established DTO we must duplicate a number of fields here + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dom_ccy** | **str** | Currency in which the contract is paid. | +**strike** | **float** | The option strike, this can be negative for some options. | +**contract_size** | **float** | Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. | +**country** | **str** | Country (code) for the exchange. | +**delivery_type** | **str** | The delivery type, cash or physical. An option on a future is physically settled if upon exercising the holder receives a future. Supported string (enumeration) values are: [Cash, Physical]. | +**description** | **str** | Description of contract | +**exchange_code** | **str** | Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. | +**exercise_date** | **datetime** | Exercise Date. | +**exercise_type** | **str** | The exercise type, European, American or Bermudan. Supported string (enumeration) values are: [European, Bermudan, American]. | +**option_code** | **str** | Option Contract Code, typically one or two letters, e.g. OG => Option on Gold. | +**option_type** | **str** | The option type, Call or Put. Supported string (enumeration) values are: [Call, Put]. | +**underlying** | [**LusidInstrument**](LusidInstrument.md) | | +**underlying_code** | **str** | Code of the underlying, for an option on futures this should be the futures code. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ExecutionsApi.md b/sdk/docs/ExecutionsApi.md index 2c069b098ae..eae7d5bf3db 100644 --- a/sdk/docs/ExecutionsApi.md +++ b/sdk/docs/ExecutionsApi.md @@ -1,6 +1,6 @@ # lusid.ExecutionsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -184,10 +184,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -197,7 +197,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -269,10 +269,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -282,7 +282,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/ExoticInstrument.md b/sdk/docs/ExoticInstrument.md new file mode 100644 index 00000000000..f368e774176 --- /dev/null +++ b/sdk/docs/ExoticInstrument.md @@ -0,0 +1,14 @@ +# ExoticInstrument + +LUSID representation of a generic OTC Exotic Instrument that is not fully defined within other LUSID models. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instrument_format** | [**InstrumentDefinitionFormat**](InstrumentDefinitionFormat.md) | | +**content** | **str** | 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. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ExoticInstrumentAllOf.md b/sdk/docs/ExoticInstrumentAllOf.md new file mode 100644 index 00000000000..4d4be98b536 --- /dev/null +++ b/sdk/docs/ExoticInstrumentAllOf.md @@ -0,0 +1,13 @@ +# ExoticInstrumentAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instrument_format** | [**InstrumentDefinitionFormat**](InstrumentDefinitionFormat.md) | | +**content** | **str** | 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. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FixedLeg.md b/sdk/docs/FixedLeg.md new file mode 100644 index 00000000000..9cb0312df4d --- /dev/null +++ b/sdk/docs/FixedLeg.md @@ -0,0 +1,17 @@ +# FixedLeg + +LUSID representation of a Fixed Rate Leg. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**leg_definition** | [**LegDefinition**](LegDefinition.md) | | +**notional** | **float** | | +**overrides** | [**FixedLegAllOfOverrides**](FixedLegAllOfOverrides.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FixedLegAllOf.md b/sdk/docs/FixedLegAllOf.md new file mode 100644 index 00000000000..33e7edb40fd --- /dev/null +++ b/sdk/docs/FixedLegAllOf.md @@ -0,0 +1,16 @@ +# FixedLegAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**leg_definition** | [**LegDefinition**](LegDefinition.md) | | +**notional** | **float** | | +**overrides** | [**FixedLegAllOfOverrides**](FixedLegAllOfOverrides.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FixedLegAllOfOverrides.md b/sdk/docs/FixedLegAllOfOverrides.md new file mode 100644 index 00000000000..94b027af0b2 --- /dev/null +++ b/sdk/docs/FixedLegAllOfOverrides.md @@ -0,0 +1,13 @@ +# FixedLegAllOfOverrides + +Any overriding data for notionals, spreads or rates that would affect generation of a leg. This supports the case where an amortisation schedule is given but otherwise generation is allowed as usual. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amortization** | **list[float]** | | [optional] +**spreads** | **list[float]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FloatingLeg.md b/sdk/docs/FloatingLeg.md new file mode 100644 index 00000000000..cb38628ea9e --- /dev/null +++ b/sdk/docs/FloatingLeg.md @@ -0,0 +1,17 @@ +# FloatingLeg + +LUSID representation of a Floating Rate Leg. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**leg_definition** | [**LegDefinition**](LegDefinition.md) | | +**notional** | **float** | Scaling factor to apply to leg quantities. | +**overrides** | [**FixedLegAllOfOverrides**](FixedLegAllOfOverrides.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FloatingLegAllOf.md b/sdk/docs/FloatingLegAllOf.md new file mode 100644 index 00000000000..cfba9ec23f3 --- /dev/null +++ b/sdk/docs/FloatingLegAllOf.md @@ -0,0 +1,16 @@ +# FloatingLegAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**leg_definition** | [**LegDefinition**](LegDefinition.md) | | +**notional** | **float** | Scaling factor to apply to leg quantities. | +**overrides** | [**FixedLegAllOfOverrides**](FixedLegAllOfOverrides.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FlowConventionName.md b/sdk/docs/FlowConventionName.md new file mode 100644 index 00000000000..7ca02e353b5 --- /dev/null +++ b/sdk/docs/FlowConventionName.md @@ -0,0 +1,14 @@ +# FlowConventionName + +Representation of an abstract definition of a flow convention set consisting of currency, tenor and an index name (arbitrary string but likely something like \"IBOR\"). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency of the flow convention name. | +**index_name** | **str** | The index, if present, that is required. e.g. \"IBOR\", \"OIS\" or \"SONIA\". | [optional] +**tenor** | **str** | Tenor for the convention name. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FlowConventions.md b/sdk/docs/FlowConventions.md new file mode 100644 index 00000000000..d6000aadf83 --- /dev/null +++ b/sdk/docs/FlowConventions.md @@ -0,0 +1,22 @@ +# FlowConventions + +A flow convention defines the specification for generation of the date schedule for a leg or set of cashflows. It determines the tenor of these and, how to map the unadjusted set of dates to dates which are 'good business days'. For example, if an unadjusted date falls on a Saturday or a bank holiday, should it be rolled forward or backward to obtain the adjusted date. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Currency of the flow convention. | +**payment_frequency** | **str** | When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. | +**day_count_convention** | **str** | when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. | +**roll_convention** | **str** | When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing]. | +**payment_calendars** | **list[str]** | An array of strings denoting holiday calendars that apply to generation of payment schedules. | +**reset_calendars** | **list[str]** | An array of strings denoting holiday calendars that apply to generation of reset schedules. | +**settle_days** | **int** | Number of Good Business Days between the trade date and the effective or settlement date of the instrument. | +**reset_days** | **int** | The number of Good Business Days between determination and payment of reset. | +**leap_days_included** | **bool** | If this flag is set to true, the 29th of February is included in the date schedule when the business roll convention is applied. If this flag is set to false, the business roll convention ignores February 29 for date schedules, cash flow payments etc. This flag defaults to true if not specified, i.e., leap days are included in a date schedule generation. | [optional] +**scope** | **str** | The scope used when updating or inserting the convention. | [optional] +**code** | **str** | The code of the convention. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ForwardRateAgreement.md b/sdk/docs/ForwardRateAgreement.md new file mode 100644 index 00000000000..24178fbf8e5 --- /dev/null +++ b/sdk/docs/ForwardRateAgreement.md @@ -0,0 +1,19 @@ +# ForwardRateAgreement + +LUSID representation of a Forward Rate Agreement. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The settlement date of the FRA | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**fixing_date** | **datetime** | The date at which the rate to be paid, the reference rate, is confirmed/observed. | +**fra_rate** | **float** | The rate at which the FRA is traded. | +**notional** | **float** | The amount for which the FRA is traded. | +**index_convention** | [**IndexConvention**](IndexConvention.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ForwardRateAgreementAllOf.md b/sdk/docs/ForwardRateAgreementAllOf.md new file mode 100644 index 00000000000..c4cb8a53d6b --- /dev/null +++ b/sdk/docs/ForwardRateAgreementAllOf.md @@ -0,0 +1,18 @@ +# ForwardRateAgreementAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The settlement date of the FRA | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**fixing_date** | **datetime** | The date at which the rate to be paid, the reference rate, is confirmed/observed. | +**fra_rate** | **float** | The rate at which the FRA is traded. | +**notional** | **float** | The amount for which the FRA is traded. | +**index_convention** | [**IndexConvention**](IndexConvention.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FundingLeg.md b/sdk/docs/FundingLeg.md new file mode 100644 index 00000000000..414d6becae3 --- /dev/null +++ b/sdk/docs/FundingLeg.md @@ -0,0 +1,16 @@ +# FundingLeg + +LUSID representation of a Funding Leg with variable notional. This Funding Leg is a hybrid between a single leg swap and a loan facility; the notional is not fixed and can vary within a reset period. The model can be used to represent the funding leg of a basket of instruments (e.g. equities) where the contents of the basket can change over time. The actual notional history is stored in the FundingLegHistory object. The actual notional history is stored in the FundingLegHistory object. The main analytic calculated for this instrument is Accrual rather than PV. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. | +**leg_definition** | [**LegDefinition**](LegDefinition.md) | | +**notional** | **float** | The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FundingLegAllOf.md b/sdk/docs/FundingLegAllOf.md new file mode 100644 index 00000000000..beba5025510 --- /dev/null +++ b/sdk/docs/FundingLegAllOf.md @@ -0,0 +1,15 @@ +# FundingLegAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. | +**leg_definition** | [**LegDefinition**](LegDefinition.md) | | +**notional** | **float** | The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/Future.md b/sdk/docs/Future.md new file mode 100644 index 00000000000..3df431f877d --- /dev/null +++ b/sdk/docs/Future.md @@ -0,0 +1,19 @@ +# Future + +LUSID representation of a Future. Including, but not limited to, Equity Futures, Bond Futures, Index Futures, Currency Futures, and Interest Rate Futures. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**identifiers** | **dict(str, str)** | External market codes and identifiers for the bond, e.g. ISIN. | +**contract_details** | [**FuturesContractDetails**](FuturesContractDetails.md) | | +**contracts** | **float** | The number of contracts held. | [optional] +**ref_spot_price** | **float** | The reference spot price for the future at which the contract was entered into. | [optional] +**underlying** | [**LusidInstrument**](LusidInstrument.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FutureAllOf.md b/sdk/docs/FutureAllOf.md new file mode 100644 index 00000000000..0cb50b8e49a --- /dev/null +++ b/sdk/docs/FutureAllOf.md @@ -0,0 +1,18 @@ +# FutureAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**identifiers** | **dict(str, str)** | External market codes and identifiers for the bond, e.g. ISIN. | +**contract_details** | [**FuturesContractDetails**](FuturesContractDetails.md) | | +**contracts** | **float** | The number of contracts held. | [optional] +**ref_spot_price** | **float** | The reference spot price for the future at which the contract was entered into. | [optional] +**underlying** | [**LusidInstrument**](LusidInstrument.md) | | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FuturesContractDetails.md b/sdk/docs/FuturesContractDetails.md new file mode 100644 index 00000000000..6e2bda5afeb --- /dev/null +++ b/sdk/docs/FuturesContractDetails.md @@ -0,0 +1,24 @@ +# FuturesContractDetails + +Most, if not all, information about contracts is standardized. See, e.g. https://www.cmegroup.com/ for common codes and similar data. This appears to be in common use by well known market information providers, e.g. Bloomberg and Refinitiv. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dom_ccy** | **str** | Currency in which the contract is paid. | +**fgn_ccy** | **str** | Currency of the underlying, for use with FX Futures | [optional] +**asset_class** | **str** | The asset class of the underlying. Optional and will default to Unknown if not set. Supported string (enumeration) values are: [InterestRates, FX, Inflation, Equities, Credit, Commodities, Money]. | [optional] +**contract_code** | **str** | The contract code used by the exchange, e.g. “CL” for Crude Oil, “ES” for E-mini SP 500, “FGBL” for Bund Futures, etc. | +**contract_month** | **str** | Which month does the contract trade for. Supported string (enumeration) values are: [F, G, H, J, K, M, N, Q, U, V, X, Z]. | +**contract_size** | **float** | Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. | +**convention** | **str** | If appropriate, the day count convention method used in pricing (rates futures). For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. | +**country** | **str** | Country (code) for the exchange. | +**description** | **str** | Description of contract. | +**exchange_code** | **str** | Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. | +**exchange_name** | **str** | Exchange name (for when code is not automatically recognised). | +**ticker_step** | **float** | Minimal step size change in ticker. | +**unit_value** | **float** | The value in the currency of a 1 unit change in the contract price. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForward.md b/sdk/docs/FxForward.md new file mode 100644 index 00000000000..34580546953 --- /dev/null +++ b/sdk/docs/FxForward.md @@ -0,0 +1,22 @@ +# FxForward + +LUSID representation of an FX Forward. Including FX Spot and Non-Deliverable Forwards. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**dom_amount** | **float** | The amount that is to be paid in the domestic currency on the maturity date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**fgn_amount** | **float** | The amount that is to be paid in the foreign currency on the maturity date. | +**fgn_ccy** | **str** | The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. | +**ref_spot_rate** | **float** | The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). | [optional] +**is_ndf** | **bool** | Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. | [optional] +**fixing_date** | **datetime** | The fixing date. | [optional] +**settlement_ccy** | **str** | The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardAllOf.md b/sdk/docs/FxForwardAllOf.md new file mode 100644 index 00000000000..a1f02dd32db --- /dev/null +++ b/sdk/docs/FxForwardAllOf.md @@ -0,0 +1,21 @@ +# FxForwardAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**dom_amount** | **float** | The amount that is to be paid in the domestic currency on the maturity date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**fgn_amount** | **float** | The amount that is to be paid in the foreign currency on the maturity date. | +**fgn_ccy** | **str** | The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. | +**ref_spot_rate** | **float** | The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). | [optional] +**is_ndf** | **bool** | Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. | [optional] +**fixing_date** | **datetime** | The fixing date. | [optional] +**settlement_ccy** | **str** | The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardCurveByQuoteReference.md b/sdk/docs/FxForwardCurveByQuoteReference.md new file mode 100644 index 00000000000..6027aea1a39 --- /dev/null +++ b/sdk/docs/FxForwardCurveByQuoteReference.md @@ -0,0 +1,17 @@ +# FxForwardCurveByQuoteReference + +Contains data (i.e. tenors and rates + metadata) for building fx forward curves (when combined with a date to build on) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**tenors** | **list[str]** | Tenors for which the forward rates apply | +**quote_references** | **list[dict(str, str)]** | For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardCurveByQuoteReferenceAllOf.md b/sdk/docs/FxForwardCurveByQuoteReferenceAllOf.md new file mode 100644 index 00000000000..3a1fbe6c711 --- /dev/null +++ b/sdk/docs/FxForwardCurveByQuoteReferenceAllOf.md @@ -0,0 +1,16 @@ +# FxForwardCurveByQuoteReferenceAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**tenors** | **list[str]** | Tenors for which the forward rates apply | +**quote_references** | **list[dict(str, str)]** | For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardCurveData.md b/sdk/docs/FxForwardCurveData.md new file mode 100644 index 00000000000..15db75bc6b8 --- /dev/null +++ b/sdk/docs/FxForwardCurveData.md @@ -0,0 +1,18 @@ +# FxForwardCurveData + +Contains data (i.e. dates and rates + metadata) for building fx forward curves + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**dates** | **list[datetime]** | Dates for which the forward rates apply | +**rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardCurveDataAllOf.md b/sdk/docs/FxForwardCurveDataAllOf.md new file mode 100644 index 00000000000..287e74a90a5 --- /dev/null +++ b/sdk/docs/FxForwardCurveDataAllOf.md @@ -0,0 +1,17 @@ +# FxForwardCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**dates** | **list[datetime]** | Dates for which the forward rates apply | +**rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardModelOptions.md b/sdk/docs/FxForwardModelOptions.md new file mode 100644 index 00000000000..80b2c01af13 --- /dev/null +++ b/sdk/docs/FxForwardModelOptions.md @@ -0,0 +1,14 @@ +# FxForwardModelOptions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**forward_rate_observable_type** | **str** | The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid | +**discounting_method** | **str** | The available values are: Standard, ConstantTimeValueOfMoney, Invalid | +**convert_to_report_ccy** | **bool** | Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardModelOptionsAllOf.md b/sdk/docs/FxForwardModelOptionsAllOf.md new file mode 100644 index 00000000000..d82d19b9437 --- /dev/null +++ b/sdk/docs/FxForwardModelOptionsAllOf.md @@ -0,0 +1,14 @@ +# FxForwardModelOptionsAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**forward_rate_observable_type** | **str** | The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid | +**discounting_method** | **str** | The available values are: Standard, ConstantTimeValueOfMoney, Invalid | +**convert_to_report_ccy** | **bool** | Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardPipsCurveData.md b/sdk/docs/FxForwardPipsCurveData.md new file mode 100644 index 00000000000..7dc90096322 --- /dev/null +++ b/sdk/docs/FxForwardPipsCurveData.md @@ -0,0 +1,18 @@ +# FxForwardPipsCurveData + +Contains data (i.e. dates and pips + metadata) for building fx forward curves (when combined with a spot rate to build on) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted pip rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**dates** | **list[datetime]** | Dates for which the forward rates apply | +**pip_rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardPipsCurveDataAllOf.md b/sdk/docs/FxForwardPipsCurveDataAllOf.md new file mode 100644 index 00000000000..5e95fe87552 --- /dev/null +++ b/sdk/docs/FxForwardPipsCurveDataAllOf.md @@ -0,0 +1,17 @@ +# FxForwardPipsCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted pip rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**dates** | **list[datetime]** | Dates for which the forward rates apply | +**pip_rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardTenorCurveData.md b/sdk/docs/FxForwardTenorCurveData.md new file mode 100644 index 00000000000..831534b41e9 --- /dev/null +++ b/sdk/docs/FxForwardTenorCurveData.md @@ -0,0 +1,18 @@ +# FxForwardTenorCurveData + +Contains data (i.e. tenors and rates + metadata) for building fx forward curves (when combined with a date to build on) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**tenors** | **list[str]** | Tenors for which the forward rates apply | +**rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardTenorCurveDataAllOf.md b/sdk/docs/FxForwardTenorCurveDataAllOf.md new file mode 100644 index 00000000000..6989c32606f --- /dev/null +++ b/sdk/docs/FxForwardTenorCurveDataAllOf.md @@ -0,0 +1,17 @@ +# FxForwardTenorCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**tenors** | **list[str]** | Tenors for which the forward rates apply | +**rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardTenorPipsCurveData.md b/sdk/docs/FxForwardTenorPipsCurveData.md new file mode 100644 index 00000000000..2bfeee52b56 --- /dev/null +++ b/sdk/docs/FxForwardTenorPipsCurveData.md @@ -0,0 +1,18 @@ +# FxForwardTenorPipsCurveData + +Contains data (i.e. tenors and pips + metadata) for building fx forward curves (when combined with a spot rate and a date to build on) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted pip rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**tenors** | **list[str]** | Tenors for which the forward rates apply | +**pip_rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxForwardTenorPipsCurveDataAllOf.md b/sdk/docs/FxForwardTenorPipsCurveDataAllOf.md new file mode 100644 index 00000000000..397d1e48f88 --- /dev/null +++ b/sdk/docs/FxForwardTenorPipsCurveDataAllOf.md @@ -0,0 +1,17 @@ +# FxForwardTenorPipsCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | EffectiveAt date of the quoted pip rates | +**dom_ccy** | **str** | Domestic currency of the fx forward | +**fgn_ccy** | **str** | Foreign currency of the fx forward | +**tenors** | **list[str]** | Tenors for which the forward rates apply | +**pip_rates** | **list[float]** | Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxOption.md b/sdk/docs/FxOption.md new file mode 100644 index 00000000000..31d3b8e5287 --- /dev/null +++ b/sdk/docs/FxOption.md @@ -0,0 +1,28 @@ +# FxOption + +LUSID representation of an FX Option. Including Vanilla, American, European, and Digital (Binary) options. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**dom_amount** | **float** | The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. | [optional] +**fgn_ccy** | **str** | The foreign currency of the FX. | +**fgn_amount** | **float** | For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. | [optional] +**strike** | **float** | The strike of the option. | [optional] +**barriers** | [**list[Barrier]**](Barrier.md) | For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. | [optional] +**exercise_type** | **str** | Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. | [optional] +**is_call_not_put** | **bool** | True if the option is a call, false if the option is a put. | +**is_delivery_not_cash** | **bool** | True if the option is settled in cash, false if delivery. | +**is_payoff_digital** | **bool** | By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). | [optional] +**option_maturity_date** | **datetime** | The maturity date of the option. | +**option_settlement_date** | **datetime** | The settlement date of the option. | +**payout_style** | **str** | PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. | [optional] +**premium** | [**Premium**](Premium.md) | | [optional] +**touches** | [**list[Touch]**](Touch.md) | For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxOptionAllOf.md b/sdk/docs/FxOptionAllOf.md new file mode 100644 index 00000000000..6259dc0aae7 --- /dev/null +++ b/sdk/docs/FxOptionAllOf.md @@ -0,0 +1,27 @@ +# FxOptionAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**dom_amount** | **float** | The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. | [optional] +**fgn_ccy** | **str** | The foreign currency of the FX. | +**fgn_amount** | **float** | For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. | [optional] +**strike** | **float** | The strike of the option. | [optional] +**barriers** | [**list[Barrier]**](Barrier.md) | For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. | [optional] +**exercise_type** | **str** | Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. | [optional] +**is_call_not_put** | **bool** | True if the option is a call, false if the option is a put. | +**is_delivery_not_cash** | **bool** | True if the option is settled in cash, false if delivery. | +**is_payoff_digital** | **bool** | By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). | [optional] +**option_maturity_date** | **datetime** | The maturity date of the option. | +**option_settlement_date** | **datetime** | The settlement date of the option. | +**payout_style** | **str** | PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. | [optional] +**premium** | [**Premium**](Premium.md) | | [optional] +**touches** | [**list[Touch]**](Touch.md) | For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxSwap.md b/sdk/docs/FxSwap.md new file mode 100644 index 00000000000..8f24b988658 --- /dev/null +++ b/sdk/docs/FxSwap.md @@ -0,0 +1,15 @@ +# FxSwap + +LUSID representation of an FX Swap. Composed of two FX Forwards. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**near_fx_forward** | [**FxForward**](FxForward.md) | | +**far_fx_forward** | [**FxForward**](FxForward.md) | | +**notional_symmetry** | **str** | The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxSwapAllOf.md b/sdk/docs/FxSwapAllOf.md new file mode 100644 index 00000000000..e4c2d87709c --- /dev/null +++ b/sdk/docs/FxSwapAllOf.md @@ -0,0 +1,14 @@ +# FxSwapAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**near_fx_forward** | [**FxForward**](FxForward.md) | | +**far_fx_forward** | [**FxForward**](FxForward.md) | | +**notional_symmetry** | **str** | The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/FxVolSurfaceData.md b/sdk/docs/FxVolSurfaceData.md new file mode 100644 index 00000000000..ffc869ce331 --- /dev/null +++ b/sdk/docs/FxVolSurfaceData.md @@ -0,0 +1,16 @@ +# FxVolSurfaceData + +Market Data for an fx vol surface, represented by a list of fx options and corresponding market quotes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date of the surface | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | The set of instruments that define the surface. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/IndexConvention.md b/sdk/docs/IndexConvention.md new file mode 100644 index 00000000000..d08e6f0d14c --- /dev/null +++ b/sdk/docs/IndexConvention.md @@ -0,0 +1,19 @@ +# IndexConvention + +A set of conventions that describe the conventions for calculation of payments made on rates interbank lending and similar. Based on ISDA 2006 conventions and similar documentation. Please see the knowledge base for further documentation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fixing_reference** | **str** | The reference rate name for fixings. | +**publication_day_lag** | **int** | Number of days between spot and publication of the rate. | +**payment_tenor** | **str** | The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year. | +**day_count_convention** | **str** | when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. | +**currency** | **str** | Currency of the index convention. | +**index_name** | **str** | The name of the index for which this represents the conventions of. For instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc. Defaults to \"INDEX\" if not specified. | [optional] +**scope** | **str** | The scope used when updating or inserting the convention. | [optional] +**code** | **str** | The code of the convention. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/IndexModelOptions.md b/sdk/docs/IndexModelOptions.md new file mode 100644 index 00000000000..5090deaea1c --- /dev/null +++ b/sdk/docs/IndexModelOptions.md @@ -0,0 +1,12 @@ +# IndexModelOptions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**portfolio_scaling** | **str** | The available values are: Sum, AbsoluteSum, Unity | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/IndexModelOptionsAllOf.md b/sdk/docs/IndexModelOptionsAllOf.md new file mode 100644 index 00000000000..2badb3fe888 --- /dev/null +++ b/sdk/docs/IndexModelOptionsAllOf.md @@ -0,0 +1,12 @@ +# IndexModelOptionsAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**portfolio_scaling** | **str** | The available values are: Sum, AbsoluteSum, Unity | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InflationLinkedBond.md b/sdk/docs/InflationLinkedBond.md new file mode 100644 index 00000000000..a54639bba1a --- /dev/null +++ b/sdk/docs/InflationLinkedBond.md @@ -0,0 +1,30 @@ +# InflationLinkedBond + +Inflation Linked Bond. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the bond. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**flow_conventions** | [**FlowConventions**](FlowConventions.md) | | +**coupon_rate** | **float** | Simple coupon rate. | +**identifiers** | **dict(str, str)** | External market codes and identifiers for the bond, e.g. ISIN. | [optional] +**dom_ccy** | **str** | The domestic currency of the instrument. | +**base_cpi** | **float** | BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. | [optional] +**base_cpi_date** | **datetime** | BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. | [optional] +**calculation_type** | **str** | The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. | [optional] +**ex_dividend_days** | **int** | Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. | [optional] +**index_precision** | **int** | Number of decimal places used to round IndexRatio. This defaults to 5 if not set. | [optional] +**inflation_index_name** | **str** | Name of the index, e.g. UKRPI. | +**inflation_interpolation** | **str** | Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. | [optional] +**inflation_roll_day** | **int** | Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). | [optional] +**observation_lag** | **str** | Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. | [optional] +**principal** | **float** | The face-value or principal for the bond at outset. | +**principal_protection** | **bool** | If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. | [optional] +**stub_type** | **str** | StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InflationLinkedBondAllOf.md b/sdk/docs/InflationLinkedBondAllOf.md new file mode 100644 index 00000000000..7896756c966 --- /dev/null +++ b/sdk/docs/InflationLinkedBondAllOf.md @@ -0,0 +1,29 @@ +# InflationLinkedBondAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the bond. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**flow_conventions** | [**FlowConventions**](FlowConventions.md) | | +**coupon_rate** | **float** | Simple coupon rate. | +**identifiers** | **dict(str, str)** | External market codes and identifiers for the bond, e.g. ISIN. | [optional] +**dom_ccy** | **str** | The domestic currency of the instrument. | +**base_cpi** | **float** | BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. | [optional] +**base_cpi_date** | **datetime** | BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. | [optional] +**calculation_type** | **str** | The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. | [optional] +**ex_dividend_days** | **int** | Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. | [optional] +**index_precision** | **int** | Number of decimal places used to round IndexRatio. This defaults to 5 if not set. | [optional] +**inflation_index_name** | **str** | Name of the index, e.g. UKRPI. | +**inflation_interpolation** | **str** | Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. | [optional] +**inflation_roll_day** | **int** | Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). | [optional] +**observation_lag** | **str** | Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. | [optional] +**principal** | **float** | The face-value or principal for the bond at outset. | +**principal_protection** | **bool** | If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. | [optional] +**stub_type** | **str** | StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InstrumentDefinitionFormat.md b/sdk/docs/InstrumentDefinitionFormat.md new file mode 100644 index 00000000000..060ca59a037 --- /dev/null +++ b/sdk/docs/InstrumentDefinitionFormat.md @@ -0,0 +1,14 @@ +# InstrumentDefinitionFormat + +What is the provenance of an instrument. This defines who creates/owns it, what format it is in (e.g. a proprietary format or a common and known one) and what the version of that is. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_system** | **str** | which source system does the format originate from | +**vendor** | **str** | An instrument will potentially have been created by any number of different organisations. Some will be understood completely (e.g. LUSID's), some won't. The provenance of an instrument indicates who \"owns\" the associated format. | +**version** | **str** | Version of the document. Would be preferable to avoid the need, but LUSID will not control other organisations' trade formats. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InstrumentLeg.md b/sdk/docs/InstrumentLeg.md new file mode 100644 index 00000000000..047213921e8 --- /dev/null +++ b/sdk/docs/InstrumentLeg.md @@ -0,0 +1,12 @@ +# InstrumentLeg + +Base class for representing instrument legs in LUSID. An instrument leg describes a set of cashflows that are paid at a set of points in time according to some set of conventions. This base class should not be directly instantiated; only its inheritors should be used. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InstrumentLegAllOf.md b/sdk/docs/InstrumentLegAllOf.md new file mode 100644 index 00000000000..20413052bc6 --- /dev/null +++ b/sdk/docs/InstrumentLegAllOf.md @@ -0,0 +1,11 @@ +# InstrumentLegAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InstrumentsApi.md b/sdk/docs/InstrumentsApi.md index ea5e7268788..694c6bc10ee 100644 --- a/sdk/docs/InstrumentsApi.md +++ b/sdk/docs/InstrumentsApi.md @@ -1,6 +1,6 @@ # lusid.InstrumentsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -32,10 +32,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -45,7 +45,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -111,10 +111,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -124,7 +124,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -196,10 +196,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -209,7 +209,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -266,10 +266,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -279,7 +279,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -357,10 +357,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -370,7 +370,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -444,10 +444,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -457,7 +457,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -529,10 +529,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -542,7 +542,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -620,10 +620,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -633,7 +633,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -701,10 +701,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -714,7 +714,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -778,10 +778,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -791,7 +791,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/InterestRateSwap.md b/sdk/docs/InterestRateSwap.md new file mode 100644 index 00000000000..d5408c37b0e --- /dev/null +++ b/sdk/docs/InterestRateSwap.md @@ -0,0 +1,17 @@ +# InterestRateSwap + +LUSID representation of an Interest Rate Swap, including: * Vanilla (single currency fixed-float non-amortising) * CrossCurrency (>1 currency is used by the swap legs) * Basis (single currency, floating-floating legs of different tenors) * Amortising (the swap has 1+ leg with amortised notional) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**is_non_deliverable** | **bool** | Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. | [optional] +**legs** | [**list[InstrumentLeg]**](InstrumentLeg.md) | The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. | +**settlement_ccy** | **str** | Settlement currency if IRS is non-deliverable. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InterestRateSwapAllOf.md b/sdk/docs/InterestRateSwapAllOf.md new file mode 100644 index 00000000000..a317c5d4704 --- /dev/null +++ b/sdk/docs/InterestRateSwapAllOf.md @@ -0,0 +1,16 @@ +# InterestRateSwapAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**is_non_deliverable** | **bool** | Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. | [optional] +**legs** | [**list[InstrumentLeg]**](InstrumentLeg.md) | The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. | +**settlement_ccy** | **str** | Settlement currency if IRS is non-deliverable. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InterestRateSwaption.md b/sdk/docs/InterestRateSwaption.md new file mode 100644 index 00000000000..740792695b0 --- /dev/null +++ b/sdk/docs/InterestRateSwaption.md @@ -0,0 +1,17 @@ +# InterestRateSwaption + +LUSID representation of an Interest Rate Swaption. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**pay_or_receive_fixed** | **str** | True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. | +**premium** | [**Premium**](Premium.md) | | [optional] +**delivery_method** | **str** | How does the option settle Supported string (enumeration) values are: [Cash, Physical]. | +**swap** | [**InterestRateSwap**](InterestRateSwap.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/InterestRateSwaptionAllOf.md b/sdk/docs/InterestRateSwaptionAllOf.md new file mode 100644 index 00000000000..9fdd0605319 --- /dev/null +++ b/sdk/docs/InterestRateSwaptionAllOf.md @@ -0,0 +1,16 @@ +# InterestRateSwaptionAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**pay_or_receive_fixed** | **str** | True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. | +**premium** | [**Premium**](Premium.md) | | [optional] +**delivery_method** | **str** | How does the option settle Supported string (enumeration) values are: [Cash, Physical]. | +**swap** | [**InterestRateSwap**](InterestRateSwap.md) | | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/IrVolCubeData.md b/sdk/docs/IrVolCubeData.md new file mode 100644 index 00000000000..c26630b71d2 --- /dev/null +++ b/sdk/docs/IrVolCubeData.md @@ -0,0 +1,16 @@ +# IrVolCubeData + +Market Data required to build a volatility cube for swaption pricing, represented by a list of instruments and corresponding market quotes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date of the cube - this is the start date of the swaptions on the cube. | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | Retrieve the set of instruments that define the cube. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | Access the set of quotes that define the cube. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/IrVolCubeDataAllOf.md b/sdk/docs/IrVolCubeDataAllOf.md new file mode 100644 index 00000000000..903e2a797d6 --- /dev/null +++ b/sdk/docs/IrVolCubeDataAllOf.md @@ -0,0 +1,15 @@ +# IrVolCubeDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date of the cube - this is the start date of the swaptions on the cube. | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | Retrieve the set of instruments that define the cube. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | Access the set of quotes that define the cube. | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/LegDefinition.md b/sdk/docs/LegDefinition.md new file mode 100644 index 00000000000..393c6b71062 --- /dev/null +++ b/sdk/docs/LegDefinition.md @@ -0,0 +1,22 @@ +# LegDefinition + +Definition of the set of flow and index conventions along with other miscellaneous information required to generate an instrument leg. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**convention_name** | [**FlowConventionName**](FlowConventionName.md) | | [optional] +**conventions** | [**FlowConventions**](FlowConventions.md) | | [optional] +**index_convention** | [**IndexConvention**](IndexConvention.md) | | [optional] +**index_convention_name** | [**FlowConventionName**](FlowConventionName.md) | | [optional] +**notional_exchange_type** | **str** | what type of notional exchange does the leg have Supported string (enumeration) values are: [None, Initial, Final, Both]. | +**pay_receive** | **str** | Is the leg to be paid or received Supported string (enumeration) values are: [Pay, Receive]. | +**rate_or_spread** | **float** | Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg. | +**reset_convention** | **str** | Control how resets are generated relative to swap payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears]. | [optional] +**stub_type** | **str** | If a stub is required should it be at the front or back of the leg. Supported string (enumeration) values are: [None, ShortFront, ShortBack, LongBack, LongFront, Both]. | +**compounding** | [**Compounding**](Compounding.md) | | [optional] +**amortisation** | [**StepSchedule**](StepSchedule.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/LegalEntitiesApi.md b/sdk/docs/LegalEntitiesApi.md index b8782b73c6d..b9ad194c3e4 100644 --- a/sdk/docs/LegalEntitiesApi.md +++ b/sdk/docs/LegalEntitiesApi.md @@ -1,6 +1,6 @@ # lusid.LegalEntitiesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -35,10 +35,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -48,7 +48,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -114,10 +114,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -127,7 +127,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -199,10 +199,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -212,7 +212,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -282,10 +282,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -295,7 +295,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -365,10 +365,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -378,7 +378,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -450,10 +450,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -463,7 +463,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -535,10 +535,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -548,7 +548,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -622,10 +622,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -635,7 +635,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -707,10 +707,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -720,7 +720,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -796,10 +796,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -809,7 +809,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -877,10 +877,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -890,7 +890,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -958,10 +958,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -971,7 +971,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1033,10 +1033,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1046,7 +1046,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/LevelStep.md b/sdk/docs/LevelStep.md new file mode 100644 index 00000000000..e1585439a4c --- /dev/null +++ b/sdk/docs/LevelStep.md @@ -0,0 +1,13 @@ +# LevelStep + +Item which is stepped in level/quantity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **datetime** | The date from which the level should apply. | +**quantity** | **float** | The quantity which is applied. This might be an absolute, percentage, fractional or other value. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/MarketQuote.md b/sdk/docs/MarketQuote.md new file mode 100644 index 00000000000..7bb5749332f --- /dev/null +++ b/sdk/docs/MarketQuote.md @@ -0,0 +1,13 @@ +# MarketQuote + +The market quote for an observable which will be used to calibrate the market data, including the format of the quote. e.g. a volatility quote for a specific strike and expiry the par rate of a swap This is a slimmed down version of a full Quote that can be stored in our QuoteStore to remove lineage, price source etc. for ease of use when creating complex market data. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_type** | **str** | The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta | +**value** | **float** | Numeric value of the quote | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/OpaqueMarketData.md b/sdk/docs/OpaqueMarketData.md new file mode 100644 index 00000000000..d7a13ac650a --- /dev/null +++ b/sdk/docs/OpaqueMarketData.md @@ -0,0 +1,16 @@ +# OpaqueMarketData + +A representation of an un-built piece of complex market data, to allow for passing through to the vendor library for building. The market data will usually be in some standard form such as XML or Json, representing a curve or surface. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**document** | **str** | The document as a string. | +**format** | **str** | What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. | +**name** | **str** | Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/OpaqueMarketDataAllOf.md b/sdk/docs/OpaqueMarketDataAllOf.md new file mode 100644 index 00000000000..31f8c78a3c3 --- /dev/null +++ b/sdk/docs/OpaqueMarketDataAllOf.md @@ -0,0 +1,15 @@ +# OpaqueMarketDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**document** | **str** | The document as a string. | +**format** | **str** | What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. | +**name** | **str** | Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/OpaqueModelOptions.md b/sdk/docs/OpaqueModelOptions.md new file mode 100644 index 00000000000..f1b439b8fa4 --- /dev/null +++ b/sdk/docs/OpaqueModelOptions.md @@ -0,0 +1,12 @@ +# OpaqueModelOptions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **dict(str, object)** | | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/OpaqueModelOptionsAllOf.md b/sdk/docs/OpaqueModelOptionsAllOf.md new file mode 100644 index 00000000000..71d0893b218 --- /dev/null +++ b/sdk/docs/OpaqueModelOptionsAllOf.md @@ -0,0 +1,12 @@ +# OpaqueModelOptionsAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **dict(str, object)** | | +**model_options_type** | **str** | The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/OrdersApi.md b/sdk/docs/OrdersApi.md index 5e27ccf6aad..bdab13da978 100644 --- a/sdk/docs/OrdersApi.md +++ b/sdk/docs/OrdersApi.md @@ -1,6 +1,6 @@ # lusid.OrdersApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -184,10 +184,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -197,7 +197,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -271,10 +271,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -284,7 +284,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/PersonsApi.md b/sdk/docs/PersonsApi.md index 48e145c448c..df05504f554 100644 --- a/sdk/docs/PersonsApi.md +++ b/sdk/docs/PersonsApi.md @@ -1,6 +1,6 @@ # lusid.PersonsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -27,10 +27,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -40,7 +40,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -112,10 +112,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -125,7 +125,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -195,10 +195,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -208,7 +208,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -280,10 +280,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -293,7 +293,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -367,10 +367,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -380,7 +380,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/PortfolioGroupsApi.md b/sdk/docs/PortfolioGroupsApi.md index 626ed95f9f2..b4ce126747a 100644 --- a/sdk/docs/PortfolioGroupsApi.md +++ b/sdk/docs/PortfolioGroupsApi.md @@ -1,6 +1,6 @@ # lusid.PortfolioGroupsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -45,10 +45,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -58,7 +58,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -126,10 +126,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -139,7 +139,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -207,10 +207,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -220,7 +220,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -296,10 +296,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -309,7 +309,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -373,10 +373,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -386,7 +386,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -454,10 +454,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -467,7 +467,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -537,10 +537,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -550,7 +550,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -620,10 +620,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -633,7 +633,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -697,10 +697,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -710,7 +710,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -780,10 +780,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -793,7 +793,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -861,10 +861,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -874,7 +874,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -948,10 +948,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -961,7 +961,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1029,10 +1029,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1042,7 +1042,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1112,10 +1112,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1125,7 +1125,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1195,10 +1195,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1208,7 +1208,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1278,10 +1278,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1291,7 +1291,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1359,10 +1359,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1372,7 +1372,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1448,10 +1448,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1461,7 +1461,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1533,10 +1533,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1546,7 +1546,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1626,10 +1626,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1639,7 +1639,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1707,10 +1707,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1720,7 +1720,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1788,10 +1788,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1801,7 +1801,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1867,10 +1867,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1880,7 +1880,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/PortfolioResultDataKeyRule.md b/sdk/docs/PortfolioResultDataKeyRule.md new file mode 100644 index 00000000000..9f9c969a48e --- /dev/null +++ b/sdk/docs/PortfolioResultDataKeyRule.md @@ -0,0 +1,18 @@ +# PortfolioResultDataKeyRule + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supplier** | **str** | the result resource supplier (where the data comes from) | +**data_scope** | **str** | which is the scope in which the data should be found | +**document_code** | **str** | document code that defines which document is desired | +**quote_interval** | **str** | Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). | [optional] +**as_at** | **datetime** | The AsAt predicate specification. | [optional] +**portfolio_code** | **str** | | [optional] +**portfolio_scope** | **str** | | [optional] +**result_key_rule_type** | **str** | The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/PortfolioResultDataKeyRuleAllOf.md b/sdk/docs/PortfolioResultDataKeyRuleAllOf.md new file mode 100644 index 00000000000..3b7d2885ef4 --- /dev/null +++ b/sdk/docs/PortfolioResultDataKeyRuleAllOf.md @@ -0,0 +1,18 @@ +# PortfolioResultDataKeyRuleAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supplier** | **str** | the result resource supplier (where the data comes from) | +**data_scope** | **str** | which is the scope in which the data should be found | +**document_code** | **str** | document code that defines which document is desired | +**quote_interval** | **str** | Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). | [optional] +**as_at** | **datetime** | The AsAt predicate specification. | [optional] +**portfolio_code** | **str** | | [optional] +**portfolio_scope** | **str** | | [optional] +**result_key_rule_type** | **str** | The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/PortfoliosApi.md b/sdk/docs/PortfoliosApi.md index 62b1807daf8..81c3a5685f6 100644 --- a/sdk/docs/PortfoliosApi.md +++ b/sdk/docs/PortfoliosApi.md @@ -1,6 +1,6 @@ # lusid.PortfoliosApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -40,10 +40,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -53,7 +53,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -123,10 +123,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -136,7 +136,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -200,10 +200,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -213,7 +213,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -281,10 +281,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -294,7 +294,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -368,10 +368,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -381,7 +381,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -451,10 +451,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -464,7 +464,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -536,10 +536,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -549,7 +549,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -623,10 +623,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -636,7 +636,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -704,10 +704,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -717,7 +717,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -785,10 +785,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -798,7 +798,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -870,10 +870,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -883,7 +883,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -959,10 +959,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -972,7 +972,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1042,10 +1042,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1055,7 +1055,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1131,10 +1131,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1144,7 +1144,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1220,10 +1220,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1233,7 +1233,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1301,10 +1301,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1314,7 +1314,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1386,10 +1386,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1399,7 +1399,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1465,10 +1465,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1478,7 +1478,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/Premium.md b/sdk/docs/Premium.md new file mode 100644 index 00000000000..fa8e2f8c2dc --- /dev/null +++ b/sdk/docs/Premium.md @@ -0,0 +1,14 @@ +# Premium + +A class containing information for a given premium payment. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **float** | Premium amount. | +**currency** | **str** | Premium currency. | +**date** | **datetime** | Date when premium paid. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/PropertyDefinitionsApi.md b/sdk/docs/PropertyDefinitionsApi.md index d4618a4cfbf..7cfc228efb8 100644 --- a/sdk/docs/PropertyDefinitionsApi.md +++ b/sdk/docs/PropertyDefinitionsApi.md @@ -1,6 +1,6 @@ # lusid.PropertyDefinitionsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -28,10 +28,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -41,7 +41,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -178,10 +178,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -191,7 +191,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -257,10 +257,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -270,7 +270,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -336,10 +336,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -349,7 +349,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -417,10 +417,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -430,7 +430,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/QuotesApi.md b/sdk/docs/QuotesApi.md index f76d2a38b3b..421c8cd0450 100644 --- a/sdk/docs/QuotesApi.md +++ b/sdk/docs/QuotesApi.md @@ -1,6 +1,6 @@ # lusid.QuotesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -27,10 +27,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -40,7 +40,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -104,10 +104,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -117,7 +117,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -187,10 +187,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -200,7 +200,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -272,10 +272,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -285,7 +285,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -357,10 +357,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -370,7 +370,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/ReconciliationsApi.md b/sdk/docs/ReconciliationsApi.md index 5a27b3e33af..bedf02ce6bd 100644 --- a/sdk/docs/ReconciliationsApi.md +++ b/sdk/docs/ReconciliationsApi.md @@ -1,6 +1,6 @@ # lusid.ReconciliationsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,10 +23,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -36,7 +36,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/ReferenceInstrument.md b/sdk/docs/ReferenceInstrument.md new file mode 100644 index 00000000000..49b9c725d75 --- /dev/null +++ b/sdk/docs/ReferenceInstrument.md @@ -0,0 +1,15 @@ +# ReferenceInstrument + +LUSID representation of a reference to another instrument that has already been loaded (e.g. a lookthrough to a portfolio). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instrument_id** | **str** | The Identifier code | +**instrument_id_type** | **str** | the type of the instrument id e.g. LusidInstrument Id | +**scope** | **str** | (optional) Scope for the instrument | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ReferenceInstrumentAllOf.md b/sdk/docs/ReferenceInstrumentAllOf.md new file mode 100644 index 00000000000..e283e62df7a --- /dev/null +++ b/sdk/docs/ReferenceInstrumentAllOf.md @@ -0,0 +1,14 @@ +# ReferenceInstrumentAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instrument_id** | **str** | The Identifier code | +**instrument_id_type** | **str** | the type of the instrument id e.g. LusidInstrument Id | +**scope** | **str** | (optional) Scope for the instrument | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ReferencePortfolioApi.md b/sdk/docs/ReferencePortfolioApi.md index 184a6588de7..f9fdb89ec35 100644 --- a/sdk/docs/ReferencePortfolioApi.md +++ b/sdk/docs/ReferencePortfolioApi.md @@ -1,6 +1,6 @@ # lusid.ReferencePortfolioApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -186,10 +186,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -199,7 +199,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -269,10 +269,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -282,7 +282,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/RelationshipDefinitionsApi.md b/sdk/docs/RelationshipDefinitionsApi.md index 67a0dc5d1f0..5a09c27e5f2 100644 --- a/sdk/docs/RelationshipDefinitionsApi.md +++ b/sdk/docs/RelationshipDefinitionsApi.md @@ -1,6 +1,6 @@ # lusid.RelationshipDefinitionsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -27,10 +27,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -40,7 +40,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -102,10 +102,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -115,7 +115,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -179,10 +179,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -192,7 +192,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -258,10 +258,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -271,7 +271,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -339,10 +339,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -352,7 +352,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/RelationshipsApi.md b/sdk/docs/RelationshipsApi.md index 933d71d5478..1ffb8253fc9 100644 --- a/sdk/docs/RelationshipsApi.md +++ b/sdk/docs/RelationshipsApi.md @@ -1,6 +1,6 @@ # lusid.RelationshipsApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -24,10 +24,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -37,7 +37,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/Repo.md b/sdk/docs/Repo.md new file mode 100644 index 00000000000..6de230e3e45 --- /dev/null +++ b/sdk/docs/Repo.md @@ -0,0 +1,23 @@ +# Repo + +LUSID representation of a sale and repurchase agreement, supporting haircut, margin or repo rate methods. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**accrual_basis** | **str** | For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. | +**collateral** | [**list[LusidInstrument]**](LusidInstrument.md) | The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. | [optional] +**collateral_value** | **float** | The full market value of the collateral in domestic currency, before any margin or haircut is applied. | [optional] +**haircut** | **float** | The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. | [optional] +**margin** | **float** | The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. | [optional] +**purchase_price** | **float** | The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. | [optional] +**repo_rate** | **float** | the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. | [optional] +**repurchase_price** | **float** | The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/RepoAllOf.md b/sdk/docs/RepoAllOf.md new file mode 100644 index 00000000000..bbb2bdc5198 --- /dev/null +++ b/sdk/docs/RepoAllOf.md @@ -0,0 +1,22 @@ +# RepoAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**dom_ccy** | **str** | The domestic currency of the instrument. | +**accrual_basis** | **str** | For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. | +**collateral** | [**list[LusidInstrument]**](LusidInstrument.md) | The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. | [optional] +**collateral_value** | **float** | The full market value of the collateral in domestic currency, before any margin or haircut is applied. | [optional] +**haircut** | **float** | The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. | [optional] +**margin** | **float** | The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. | [optional] +**purchase_price** | **float** | The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. | [optional] +**repo_rate** | **float** | the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. | [optional] +**repurchase_price** | **float** | The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ResultDataKeyRule.md b/sdk/docs/ResultDataKeyRule.md index 6245ec5fe5a..ae38b594c3b 100644 --- a/sdk/docs/ResultDataKeyRule.md +++ b/sdk/docs/ResultDataKeyRule.md @@ -1,16 +1,17 @@ # ResultDataKeyRule -A rule that describes how we resolve (unit) result data. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**resource_key** | **str** | The result data key that identifies the address pattern that this is a rule for | **supplier** | **str** | the result resource supplier (where the data comes from) | **data_scope** | **str** | which is the scope in which the data should be found | **document_code** | **str** | document code that defines which document is desired | **quote_interval** | **str** | Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). | [optional] **as_at** | **datetime** | The AsAt predicate specification. | [optional] +**resource_key** | **str** | The result data key that identifies the address pattern that this is a rule for | +**document_result_type** | **str** | | +**result_key_rule_type** | **str** | The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/docs/ResultDataKeyRuleAllOf.md b/sdk/docs/ResultDataKeyRuleAllOf.md new file mode 100644 index 00000000000..54f25238ef9 --- /dev/null +++ b/sdk/docs/ResultDataKeyRuleAllOf.md @@ -0,0 +1,18 @@ +# ResultDataKeyRuleAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supplier** | **str** | the result resource supplier (where the data comes from) | +**data_scope** | **str** | which is the scope in which the data should be found | +**document_code** | **str** | document code that defines which document is desired | +**quote_interval** | **str** | Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). | [optional] +**as_at** | **datetime** | The AsAt predicate specification. | [optional] +**resource_key** | **str** | The result data key that identifies the address pattern that this is a rule for | +**document_result_type** | **str** | | +**result_key_rule_type** | **str** | The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/Schedule.md b/sdk/docs/Schedule.md new file mode 100644 index 00000000000..704c871e26d --- /dev/null +++ b/sdk/docs/Schedule.md @@ -0,0 +1,12 @@ +# Schedule + +Base class for representing schedules in LUSID. This base class should not be directly instantiated; each supported ScheduleType has a corresponding inherited class. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**schedule_type** | **str** | The available values are: Fixed, Float, Optionality, Step, Exercise, Invalid | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/ScopesApi.md b/sdk/docs/ScopesApi.md index dcab2ff887b..a3cf8bb201f 100644 --- a/sdk/docs/ScopesApi.md +++ b/sdk/docs/ScopesApi.md @@ -1,6 +1,6 @@ # lusid.ScopesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -23,10 +23,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -36,7 +36,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/SearchApi.md b/sdk/docs/SearchApi.md index 22b85332fa7..c408d518774 100644 --- a/sdk/docs/SearchApi.md +++ b/sdk/docs/SearchApi.md @@ -1,6 +1,6 @@ # lusid.SearchApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -25,10 +25,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -38,7 +38,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -108,10 +108,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -121,7 +121,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -191,10 +191,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -204,7 +204,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/SequencesApi.md b/sdk/docs/SequencesApi.md index d9bf9ead33d..cfa6cc87e05 100644 --- a/sdk/docs/SequencesApi.md +++ b/sdk/docs/SequencesApi.md @@ -1,6 +1,6 @@ # lusid.SequencesApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -26,10 +26,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -39,7 +39,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -103,10 +103,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -116,7 +116,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -180,10 +180,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -193,7 +193,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -259,10 +259,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -272,7 +272,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/SimpleInstrument.md b/sdk/docs/SimpleInstrument.md new file mode 100644 index 00000000000..508cb8df815 --- /dev/null +++ b/sdk/docs/SimpleInstrument.md @@ -0,0 +1,17 @@ +# SimpleInstrument + +LUSID representation of a Simple Instrument, used as a basic definition of a generic instrument. No analytics can be obtained for this. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | [optional] +**dom_ccy** | **str** | The domestic currency. | +**asset_class** | **str** | The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown | +**fgn_ccys** | **list[str]** | The set of foreign currencies, if any (optional). | [optional] +**simple_instrument_type** | **str** | The Instrument type of the simple instrument. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/SimpleInstrumentAllOf.md b/sdk/docs/SimpleInstrumentAllOf.md new file mode 100644 index 00000000000..8fe4957c1af --- /dev/null +++ b/sdk/docs/SimpleInstrumentAllOf.md @@ -0,0 +1,16 @@ +# SimpleInstrumentAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | [optional] +**dom_ccy** | **str** | The domestic currency. | +**asset_class** | **str** | The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown | +**fgn_ccys** | **list[str]** | The set of foreign currencies, if any (optional). | [optional] +**simple_instrument_type** | **str** | The Instrument type of the simple instrument. | +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/StepSchedule.md b/sdk/docs/StepSchedule.md new file mode 100644 index 00000000000..376efec6e98 --- /dev/null +++ b/sdk/docs/StepSchedule.md @@ -0,0 +1,15 @@ +# StepSchedule + +Schedule that steps at known dated points in time. Used in representation of a sinking bond, also called amortisation, steps in coupons for fixed bonds and spreads for floating bonds. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**level_type** | **str** | The type of shift or adjustment that the quantity represents. Supported string (enumeration) values are: [Absolute, AbsoluteShift, Percentage, AbsolutePercentage]. | +**schedule_type** | **str** | What type of schedule does this represent. Supported string (enumeration) values are: [Fixed, Float, Optionality, Step, Payment, Accrual]. | +**step_schedule_type** | **str** | The type of step that this schedule is for. Supported string (enumeration) values are: [Coupon, Notional, Spread]. | +**steps** | [**list[LevelStep]**](LevelStep.md) | The level steps which are applied. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/SystemConfigurationApi.md b/sdk/docs/SystemConfigurationApi.md index e0531721111..fd0c1498808 100644 --- a/sdk/docs/SystemConfigurationApi.md +++ b/sdk/docs/SystemConfigurationApi.md @@ -1,6 +1,6 @@ # lusid.SystemConfigurationApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -24,10 +24,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -37,7 +37,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -99,10 +99,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -112,7 +112,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/TermDeposit.md b/sdk/docs/TermDeposit.md new file mode 100644 index 00000000000..f20d317080e --- /dev/null +++ b/sdk/docs/TermDeposit.md @@ -0,0 +1,18 @@ +# TermDeposit + +LUSID representation of a Term Deposit. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**contract_size** | **float** | With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. | +**flow_convention** | [**FlowConventions**](FlowConventions.md) | | +**rate** | **float** | The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest | +**dom_ccy** | **str** | DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/TermDepositAllOf.md b/sdk/docs/TermDepositAllOf.md new file mode 100644 index 00000000000..2ed237deabf --- /dev/null +++ b/sdk/docs/TermDepositAllOf.md @@ -0,0 +1,17 @@ +# TermDepositAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_date** | **datetime** | The start date of the instrument. This is normally synonymous with the trade-date. | +**maturity_date** | **datetime** | The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. | +**contract_size** | **float** | With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. | +**flow_convention** | [**FlowConventions**](FlowConventions.md) | | +**rate** | **float** | The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest | +**dom_ccy** | **str** | DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. | [optional] +**instrument_type** | **str** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/Touch.md b/sdk/docs/Touch.md new file mode 100644 index 00000000000..59dfc8c3114 --- /dev/null +++ b/sdk/docs/Touch.md @@ -0,0 +1,15 @@ +# Touch + +Touch class for exotic FxOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | **str** | Supported string (enumeration) values are: [Down, Up]. | +**level** | **float** | Trigger level, which the underlying should (or should not) cross/touch. | +**monitoring** | **str** | Supported string (enumeration) values are: [European, Bermudan, American]. | [optional] +**type** | **str** | Supported string (enumeration) values are: [Touch, Notouch]. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/TransactionPortfoliosApi.md b/sdk/docs/TransactionPortfoliosApi.md index b78bd695d33..a707e73f2e5 100644 --- a/sdk/docs/TransactionPortfoliosApi.md +++ b/sdk/docs/TransactionPortfoliosApi.md @@ -1,6 +1,6 @@ # lusid.TransactionPortfoliosApi -All URIs are relative to *https://www.lusid.com/api* +All URIs are relative to *https://fbn-ci.lusid.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -43,10 +43,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -56,7 +56,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -126,10 +126,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -139,7 +139,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -215,10 +215,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -228,7 +228,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -294,10 +294,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -307,7 +307,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -373,10 +373,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -386,7 +386,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -450,10 +450,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -463,7 +463,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -531,10 +531,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -544,7 +544,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -622,10 +622,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -635,7 +635,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -713,10 +713,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -726,7 +726,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -794,10 +794,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -807,7 +807,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -881,10 +881,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -894,7 +894,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -906,7 +906,7 @@ with lusid.ApiClient(configuration) as api_client: code = 'code_example' # str | The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. effective_at = 'effective_at_example' # str | The effective datetime or cut label of the holdings adjustment. as_at = '2013-10-20T19:20:30+01:00' # datetime | The asAt datetime at which to retrieve the holdings adjustment. Defaults to the return the latest version of the holdings adjustment if not specified. (optional) -property_keys = ['property_keys_example'] # list[str] | A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. (optional) +property_keys = ['property_keys_example'] # list[str] | A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. (optional) try: # GetHoldingsAdjustment: Get holdings adjustment @@ -924,7 +924,7 @@ Name | Type | Description | Notes **code** | **str**| The code of the transaction portfolio. Together with the scope this uniquely identifies the transaction portfolio. | **effective_at** | **str**| The effective datetime or cut label of the holdings adjustment. | **as_at** | **datetime**| The asAt datetime at which to retrieve the holdings adjustment. Defaults to the return the latest version of the holdings adjustment if not specified. | [optional] - **property_keys** | [**list[str]**](str.md)| A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. | [optional] + **property_keys** | [**list[str]**](str.md)| A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. | [optional] ### Return type @@ -964,10 +964,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -977,7 +977,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1055,10 +1055,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1068,7 +1068,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1144,10 +1144,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1157,7 +1157,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1225,10 +1225,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1238,7 +1238,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1318,10 +1318,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1331,7 +1331,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1401,10 +1401,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1414,7 +1414,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1488,10 +1488,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1501,7 +1501,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1571,10 +1571,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1584,7 +1584,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1652,10 +1652,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1665,7 +1665,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' @@ -1733,10 +1733,10 @@ import time import lusid from lusid.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://www.lusid.com/api +# Defining the host is optional and defaults to https://fbn-ci.lusid.com/api # See configuration.py for a list of all supported configuration parameters. configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) # The client must configure the authentication and authorization parameters @@ -1746,7 +1746,7 @@ configuration = lusid.Configuration( # Configure OAuth2 access token for authorization: oauth2 configuration = lusid.Configuration( - host = "https://www.lusid.com/api" + host = "https://fbn-ci.lusid.com/api" ) configuration.access_token = 'YOUR_ACCESS_TOKEN' diff --git a/sdk/docs/WeightedInstruments.md b/sdk/docs/WeightedInstruments.md new file mode 100644 index 00000000000..6607dcf6079 --- /dev/null +++ b/sdk/docs/WeightedInstruments.md @@ -0,0 +1,12 @@ +# WeightedInstruments + +Class that models a set of instruments of which each has some quantity and can be identified by a unique label. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instruments** | [**list[WeightedInstrument]**](WeightedInstrument.md) | The instruments that are held in the set. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/YieldCurveData.md b/sdk/docs/YieldCurveData.md new file mode 100644 index 00000000000..0e5e91fee8a --- /dev/null +++ b/sdk/docs/YieldCurveData.md @@ -0,0 +1,16 @@ +# YieldCurveData + +Market data for a yield curve, represented by a list of instruments and corresponding market quotes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | The set of instruments that define the curve. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | The market quotes corresponding to the the instruments used to define the curve | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/docs/YieldCurveDataAllOf.md b/sdk/docs/YieldCurveDataAllOf.md new file mode 100644 index 00000000000..4888cf0d082 --- /dev/null +++ b/sdk/docs/YieldCurveDataAllOf.md @@ -0,0 +1,15 @@ +# YieldCurveDataAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_date** | **datetime** | Base date | +**instruments** | [**list[LusidInstrument]**](LusidInstrument.md) | The set of instruments that define the curve. | +**quotes** | [**list[MarketQuote]**](MarketQuote.md) | The market quotes corresponding to the the instruments used to define the curve | +**lineage** | **str** | Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. | [optional] +**market_data_type** | **str** | The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/lusid/__init__.py b/sdk/lusid/__init__.py index c3eff7c6d03..01d4e2691f6 100644 --- a/sdk/lusid/__init__.py +++ b/sdk/lusid/__init__.py @@ -82,19 +82,38 @@ from lusid.models.annul_quotes_response import AnnulQuotesResponse from lusid.models.annul_single_structured_data_response import AnnulSingleStructuredDataResponse from lusid.models.annul_structured_data_response import AnnulStructuredDataResponse +from lusid.models.barrier import Barrier +from lusid.models.basket import Basket +from lusid.models.basket_all_of import BasketAllOf +from lusid.models.basket_identifier import BasketIdentifier +from lusid.models.bond import Bond +from lusid.models.bond_all_of import BondAllOf from lusid.models.calendar import Calendar from lusid.models.calendar_date import CalendarDate +from lusid.models.cap_floor import CapFloor +from lusid.models.cap_floor_all_of import CapFloorAllOf from lusid.models.cash_ladder_record import CashLadderRecord +from lusid.models.cash_perpetual import CashPerpetual +from lusid.models.cash_perpetual_all_of import CashPerpetualAllOf +from lusid.models.cds_flow_conventions import CdsFlowConventions +from lusid.models.cds_index import CdsIndex +from lusid.models.cds_index_all_of import CdsIndexAllOf +from lusid.models.cds_protection_detail_specification import CdsProtectionDetailSpecification from lusid.models.change import Change from lusid.models.change_history import ChangeHistory from lusid.models.change_item import ChangeItem from lusid.models.complete_portfolio import CompletePortfolio from lusid.models.complete_relationship import CompleteRelationship +from lusid.models.complex_bond import ComplexBond +from lusid.models.complex_bond_all_of import ComplexBondAllOf from lusid.models.complex_market_data import ComplexMarketData from lusid.models.complex_market_data_id import ComplexMarketDataId +from lusid.models.compounding import Compounding from lusid.models.configuration_recipe import ConfigurationRecipe from lusid.models.configuration_recipe_snippet import ConfigurationRecipeSnippet from lusid.models.constituents_adjustment_header import ConstituentsAdjustmentHeader +from lusid.models.contract_for_difference import ContractForDifference +from lusid.models.contract_for_difference_all_of import ContractForDifferenceAllOf from lusid.models.corporate_action import CorporateAction from lusid.models.corporate_action_source import CorporateActionSource from lusid.models.corporate_action_transition import CorporateActionTransition @@ -118,7 +137,11 @@ from lusid.models.create_sequence_request import CreateSequenceRequest from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest from lusid.models.create_unit_definition import CreateUnitDefinition +from lusid.models.credit_default_swap import CreditDefaultSwap +from lusid.models.credit_default_swap_all_of import CreditDefaultSwapAllOf from lusid.models.credit_rating import CreditRating +from lusid.models.credit_spread_curve_data import CreditSpreadCurveData +from lusid.models.credit_spread_curve_data_all_of import CreditSpreadCurveDataAllOf from lusid.models.currency_and_amount import CurrencyAndAmount from lusid.models.cut_label_definition import CutLabelDefinition from lusid.models.cut_local_time import CutLocalTime @@ -131,16 +154,71 @@ from lusid.models.delete_relationship_request import DeleteRelationshipRequest from lusid.models.deleted_entity_response import DeletedEntityResponse from lusid.models.dependency_source_filter import DependencySourceFilter +from lusid.models.discount_factor_curve_data import DiscountFactorCurveData +from lusid.models.discount_factor_curve_data_all_of import DiscountFactorCurveDataAllOf +from lusid.models.empty_model_options import EmptyModelOptions +from lusid.models.empty_model_options_all_of import EmptyModelOptionsAllOf from lusid.models.entity_identifier import EntityIdentifier +from lusid.models.equity import Equity +from lusid.models.equity_all_of import EquityAllOf +from lusid.models.equity_all_of_identifiers import EquityAllOfIdentifiers +from lusid.models.equity_curve_by_prices_data import EquityCurveByPricesData +from lusid.models.equity_curve_by_prices_data_all_of import EquityCurveByPricesDataAllOf +from lusid.models.equity_model_options import EquityModelOptions +from lusid.models.equity_model_options_all_of import EquityModelOptionsAllOf +from lusid.models.equity_option import EquityOption +from lusid.models.equity_option_all_of import EquityOptionAllOf +from lusid.models.equity_swap import EquitySwap +from lusid.models.equity_swap_all_of import EquitySwapAllOf +from lusid.models.equity_vol_surface_data import EquityVolSurfaceData +from lusid.models.equity_vol_surface_data_all_of import EquityVolSurfaceDataAllOf from lusid.models.error_detail import ErrorDetail +from lusid.models.exchange_traded_option import ExchangeTradedOption +from lusid.models.exchange_traded_option_all_of import ExchangeTradedOptionAllOf +from lusid.models.exchange_traded_option_contract_details import ExchangeTradedOptionContractDetails from lusid.models.execution import Execution from lusid.models.execution_request import ExecutionRequest from lusid.models.execution_set_request import ExecutionSetRequest +from lusid.models.exotic_instrument import ExoticInstrument +from lusid.models.exotic_instrument_all_of import ExoticInstrumentAllOf from lusid.models.expanded_group import ExpandedGroup from lusid.models.field_definition import FieldDefinition from lusid.models.field_schema import FieldSchema from lusid.models.field_value import FieldValue from lusid.models.file_response import FileResponse +from lusid.models.fixed_leg import FixedLeg +from lusid.models.fixed_leg_all_of import FixedLegAllOf +from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides +from lusid.models.floating_leg import FloatingLeg +from lusid.models.floating_leg_all_of import FloatingLegAllOf +from lusid.models.flow_convention_name import FlowConventionName +from lusid.models.flow_conventions import FlowConventions +from lusid.models.forward_rate_agreement import ForwardRateAgreement +from lusid.models.forward_rate_agreement_all_of import ForwardRateAgreementAllOf +from lusid.models.funding_leg import FundingLeg +from lusid.models.funding_leg_all_of import FundingLegAllOf +from lusid.models.future import Future +from lusid.models.future_all_of import FutureAllOf +from lusid.models.futures_contract_details import FuturesContractDetails +from lusid.models.fx_forward import FxForward +from lusid.models.fx_forward_all_of import FxForwardAllOf +from lusid.models.fx_forward_curve_by_quote_reference import FxForwardCurveByQuoteReference +from lusid.models.fx_forward_curve_by_quote_reference_all_of import FxForwardCurveByQuoteReferenceAllOf +from lusid.models.fx_forward_curve_data import FxForwardCurveData +from lusid.models.fx_forward_curve_data_all_of import FxForwardCurveDataAllOf +from lusid.models.fx_forward_model_options import FxForwardModelOptions +from lusid.models.fx_forward_model_options_all_of import FxForwardModelOptionsAllOf +from lusid.models.fx_forward_pips_curve_data import FxForwardPipsCurveData +from lusid.models.fx_forward_pips_curve_data_all_of import FxForwardPipsCurveDataAllOf +from lusid.models.fx_forward_tenor_curve_data import FxForwardTenorCurveData +from lusid.models.fx_forward_tenor_curve_data_all_of import FxForwardTenorCurveDataAllOf +from lusid.models.fx_forward_tenor_pips_curve_data import FxForwardTenorPipsCurveData +from lusid.models.fx_forward_tenor_pips_curve_data_all_of import FxForwardTenorPipsCurveDataAllOf +from lusid.models.fx_option import FxOption +from lusid.models.fx_option_all_of import FxOptionAllOf +from lusid.models.fx_swap import FxSwap +from lusid.models.fx_swap_all_of import FxSwapAllOf +from lusid.models.fx_vol_surface_data import FxVolSurfaceData from lusid.models.get_complex_market_data_response import GetComplexMarketDataResponse from lusid.models.get_instruments_response import GetInstrumentsResponse from lusid.models.get_quotes_response import GetQuotesResponse @@ -153,15 +231,31 @@ from lusid.models.i_unit_definition_dto import IUnitDefinitionDto from lusid.models.id_selector_definition import IdSelectorDefinition from lusid.models.identifier_part_schema import IdentifierPartSchema +from lusid.models.index_convention import IndexConvention +from lusid.models.index_model_options import IndexModelOptions +from lusid.models.index_model_options_all_of import IndexModelOptionsAllOf from lusid.models.industry_classifier import IndustryClassifier +from lusid.models.inflation_linked_bond import InflationLinkedBond +from lusid.models.inflation_linked_bond_all_of import InflationLinkedBondAllOf from lusid.models.inline_valuation_request import InlineValuationRequest from lusid.models.instrument import Instrument from lusid.models.instrument_definition import InstrumentDefinition +from lusid.models.instrument_definition_format import InstrumentDefinitionFormat from lusid.models.instrument_id_type_descriptor import InstrumentIdTypeDescriptor from lusid.models.instrument_id_value import InstrumentIdValue +from lusid.models.instrument_leg import InstrumentLeg +from lusid.models.instrument_leg_all_of import InstrumentLegAllOf +from lusid.models.interest_rate_swap import InterestRateSwap +from lusid.models.interest_rate_swap_all_of import InterestRateSwapAllOf +from lusid.models.interest_rate_swaption import InterestRateSwaption +from lusid.models.interest_rate_swaption_all_of import InterestRateSwaptionAllOf +from lusid.models.ir_vol_cube_data import IrVolCubeData +from lusid.models.ir_vol_cube_data_all_of import IrVolCubeDataAllOf from lusid.models.is_business_day_response import IsBusinessDayResponse from lusid.models.label_value_set import LabelValueSet +from lusid.models.leg_definition import LegDefinition from lusid.models.legal_entity import LegalEntity +from lusid.models.level_step import LevelStep from lusid.models.link import Link from lusid.models.list_aggregation_response import ListAggregationResponse from lusid.models.lusid_instrument import LusidInstrument @@ -173,11 +267,16 @@ from lusid.models.market_data_key_rule import MarketDataKeyRule from lusid.models.market_data_specific_rule import MarketDataSpecificRule from lusid.models.market_options import MarketOptions +from lusid.models.market_quote import MarketQuote from lusid.models.metric_value import MetricValue from lusid.models.model_options import ModelOptions from lusid.models.model_property import ModelProperty from lusid.models.model_selection import ModelSelection from lusid.models.next_value_in_sequence_response import NextValueInSequenceResponse +from lusid.models.opaque_market_data import OpaqueMarketData +from lusid.models.opaque_market_data_all_of import OpaqueMarketDataAllOf +from lusid.models.opaque_model_options import OpaqueModelOptions +from lusid.models.opaque_model_options_all_of import OpaqueModelOptionsAllOf from lusid.models.order import Order from lusid.models.order_by_spec import OrderBySpec from lusid.models.order_request import OrderRequest @@ -212,8 +311,11 @@ from lusid.models.portfolio_holding import PortfolioHolding from lusid.models.portfolio_properties import PortfolioProperties from lusid.models.portfolio_reconciliation_request import PortfolioReconciliationRequest +from lusid.models.portfolio_result_data_key_rule import PortfolioResultDataKeyRule +from lusid.models.portfolio_result_data_key_rule_all_of import PortfolioResultDataKeyRuleAllOf from lusid.models.portfolio_search_result import PortfolioSearchResult from lusid.models.portfolios_reconciliation_request import PortfoliosReconciliationRequest +from lusid.models.premium import Premium from lusid.models.pricing_context import PricingContext from lusid.models.pricing_options import PricingOptions from lusid.models.processed_command import ProcessedCommand @@ -228,11 +330,15 @@ from lusid.models.realised_gain_loss import RealisedGainLoss from lusid.models.reconciliation_break import ReconciliationBreak from lusid.models.reference_data import ReferenceData +from lusid.models.reference_instrument import ReferenceInstrument +from lusid.models.reference_instrument_all_of import ReferenceInstrumentAllOf from lusid.models.reference_portfolio_constituent import ReferencePortfolioConstituent from lusid.models.reference_portfolio_constituent_request import ReferencePortfolioConstituentRequest from lusid.models.related_entity import RelatedEntity from lusid.models.relationship import Relationship from lusid.models.relationship_definition import RelationshipDefinition +from lusid.models.repo import Repo +from lusid.models.repo_all_of import RepoAllOf from lusid.models.resource_id import ResourceId from lusid.models.resource_list_of_access_controlled_resource import ResourceListOfAccessControlledResource from lusid.models.resource_list_of_access_metadata_value_of import ResourceListOfAccessMetadataValueOf @@ -263,16 +369,25 @@ from lusid.models.resource_list_of_relationship import ResourceListOfRelationship from lusid.models.resource_list_of_scope_definition import ResourceListOfScopeDefinition from lusid.models.response_meta_data import ResponseMetaData +from lusid.models.result_data_key_rule import ResultDataKeyRule +from lusid.models.result_data_key_rule_all_of import ResultDataKeyRuleAllOf from lusid.models.result_data_schema import ResultDataSchema from lusid.models.result_key_rule import ResultKeyRule +from lusid.models.schedule import Schedule from lusid.models.scope_definition import ScopeDefinition from lusid.models.sequence_definition import SequenceDefinition from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest from lusid.models.set_legal_entity_properties_request import SetLegalEntityPropertiesRequest from lusid.models.side_configuration_data import SideConfigurationData +from lusid.models.simple_instrument import SimpleInstrument +from lusid.models.simple_instrument_all_of import SimpleInstrumentAllOf +from lusid.models.step_schedule import StepSchedule from lusid.models.stream import Stream from lusid.models.target_tax_lot import TargetTaxLot from lusid.models.target_tax_lot_request import TargetTaxLotRequest +from lusid.models.term_deposit import TermDeposit +from lusid.models.term_deposit_all_of import TermDepositAllOf +from lusid.models.touch import Touch from lusid.models.transaction import Transaction from lusid.models.transaction_configuration_data import TransactionConfigurationData from lusid.models.transaction_configuration_data_request import TransactionConfigurationDataRequest @@ -328,12 +443,15 @@ from lusid.models.versioned_resource_list_of_transaction import VersionedResourceListOfTransaction from lusid.models.weekend_mask import WeekendMask from lusid.models.weighted_instrument import WeightedInstrument +from lusid.models.weighted_instruments import WeightedInstruments +from lusid.models.yield_curve_data import YieldCurveData +from lusid.models.yield_curve_data_all_of import YieldCurveDataAllOf # import utilities into sdk package -from lusid.utilities.api_client_builder import ApiClientBuilder -from lusid.utilities.api_configuration import ApiConfiguration -from lusid.utilities.api_configuration_loader import ApiConfigurationLoader -from lusid.utilities.refreshing_token import RefreshingToken +from fbnsdkutilities.utilities.api_client_builder import ApiClientBuilder +from fbnsdkutilities.utilities.api_configuration import ApiConfiguration +from fbnsdkutilities.utilities.api_configuration_loader import ApiConfigurationLoader +from fbnsdkutilities.utilities.refreshing_token import RefreshingToken # import tcp utilities -from lusid.tcp.tcp_keep_alive_probes import TCPKeepAlivePoolManager, TCPKeepAliveProxyManager \ No newline at end of file +from fbnsdkutilities.tcp.tcp_keep_alive_probes import TCPKeepAlivePoolManager, TCPKeepAliveProxyManager \ No newline at end of file diff --git a/sdk/lusid/api/transaction_portfolios_api.py b/sdk/lusid/api/transaction_portfolios_api.py index 748a24a592a..67105d4594a 100644 --- a/sdk/lusid/api/transaction_portfolios_api.py +++ b/sdk/lusid/api/transaction_portfolios_api.py @@ -2039,7 +2039,7 @@ def get_holdings_adjustment(self, scope, code, effective_at, **kwargs): # noqa: :type effective_at: str :param as_at: The asAt datetime at which to retrieve the holdings adjustment. Defaults to the return the latest version of the holdings adjustment if not specified. :type as_at: datetime - :param property_keys: A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. + :param property_keys: A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. :type property_keys: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -2077,7 +2077,7 @@ def get_holdings_adjustment_with_http_info(self, scope, code, effective_at, **kw :type effective_at: str :param as_at: The asAt datetime at which to retrieve the holdings adjustment. Defaults to the return the latest version of the holdings adjustment if not specified. :type as_at: datetime - :param property_keys: A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. + :param property_keys: A list of property keys from the ‘Instrument' domain to decorate onto holdings adjustments. These must have the format {domain}/{scope}/{code}, for example 'Instrument/system/Name'. Note that properties from the 'Holding’ domain are automatically returned. :type property_keys: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/sdk/lusid/configuration.py b/sdk/lusid/configuration.py index 45a1f77414f..fe7b0d1af51 100644 --- a/sdk/lusid/configuration.py +++ b/sdk/lusid/configuration.py @@ -99,7 +99,7 @@ def __init__(self, host=None, ): """Constructor """ - self._base_path = "https://www.lusid.com/api" if host is None else host + self._base_path = "https://fbn-ci.lusid.com/api" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -407,7 +407,7 @@ def get_host_settings(self): """ return [ { - 'url': "https://www.lusid.com/api", + 'url': "https://fbn-ci.lusid.com/api", 'description': "No description provided", } ] diff --git a/sdk/lusid/models/__init__.py b/sdk/lusid/models/__init__.py index 37ac3359651..c4bd13cd09c 100644 --- a/sdk/lusid/models/__init__.py +++ b/sdk/lusid/models/__init__.py @@ -40,19 +40,38 @@ from lusid.models.annul_quotes_response import AnnulQuotesResponse from lusid.models.annul_single_structured_data_response import AnnulSingleStructuredDataResponse from lusid.models.annul_structured_data_response import AnnulStructuredDataResponse +from lusid.models.barrier import Barrier +from lusid.models.basket import Basket +from lusid.models.basket_all_of import BasketAllOf +from lusid.models.basket_identifier import BasketIdentifier +from lusid.models.bond import Bond +from lusid.models.bond_all_of import BondAllOf from lusid.models.calendar import Calendar from lusid.models.calendar_date import CalendarDate +from lusid.models.cap_floor import CapFloor +from lusid.models.cap_floor_all_of import CapFloorAllOf from lusid.models.cash_ladder_record import CashLadderRecord +from lusid.models.cash_perpetual import CashPerpetual +from lusid.models.cash_perpetual_all_of import CashPerpetualAllOf +from lusid.models.cds_flow_conventions import CdsFlowConventions +from lusid.models.cds_index import CdsIndex +from lusid.models.cds_index_all_of import CdsIndexAllOf +from lusid.models.cds_protection_detail_specification import CdsProtectionDetailSpecification from lusid.models.change import Change from lusid.models.change_history import ChangeHistory from lusid.models.change_item import ChangeItem from lusid.models.complete_portfolio import CompletePortfolio from lusid.models.complete_relationship import CompleteRelationship +from lusid.models.complex_bond import ComplexBond +from lusid.models.complex_bond_all_of import ComplexBondAllOf from lusid.models.complex_market_data import ComplexMarketData from lusid.models.complex_market_data_id import ComplexMarketDataId +from lusid.models.compounding import Compounding from lusid.models.configuration_recipe import ConfigurationRecipe from lusid.models.configuration_recipe_snippet import ConfigurationRecipeSnippet from lusid.models.constituents_adjustment_header import ConstituentsAdjustmentHeader +from lusid.models.contract_for_difference import ContractForDifference +from lusid.models.contract_for_difference_all_of import ContractForDifferenceAllOf from lusid.models.corporate_action import CorporateAction from lusid.models.corporate_action_source import CorporateActionSource from lusid.models.corporate_action_transition import CorporateActionTransition @@ -76,7 +95,11 @@ from lusid.models.create_sequence_request import CreateSequenceRequest from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest from lusid.models.create_unit_definition import CreateUnitDefinition +from lusid.models.credit_default_swap import CreditDefaultSwap +from lusid.models.credit_default_swap_all_of import CreditDefaultSwapAllOf from lusid.models.credit_rating import CreditRating +from lusid.models.credit_spread_curve_data import CreditSpreadCurveData +from lusid.models.credit_spread_curve_data_all_of import CreditSpreadCurveDataAllOf from lusid.models.currency_and_amount import CurrencyAndAmount from lusid.models.cut_label_definition import CutLabelDefinition from lusid.models.cut_local_time import CutLocalTime @@ -89,16 +112,71 @@ from lusid.models.delete_relationship_request import DeleteRelationshipRequest from lusid.models.deleted_entity_response import DeletedEntityResponse from lusid.models.dependency_source_filter import DependencySourceFilter +from lusid.models.discount_factor_curve_data import DiscountFactorCurveData +from lusid.models.discount_factor_curve_data_all_of import DiscountFactorCurveDataAllOf +from lusid.models.empty_model_options import EmptyModelOptions +from lusid.models.empty_model_options_all_of import EmptyModelOptionsAllOf from lusid.models.entity_identifier import EntityIdentifier +from lusid.models.equity import Equity +from lusid.models.equity_all_of import EquityAllOf +from lusid.models.equity_all_of_identifiers import EquityAllOfIdentifiers +from lusid.models.equity_curve_by_prices_data import EquityCurveByPricesData +from lusid.models.equity_curve_by_prices_data_all_of import EquityCurveByPricesDataAllOf +from lusid.models.equity_model_options import EquityModelOptions +from lusid.models.equity_model_options_all_of import EquityModelOptionsAllOf +from lusid.models.equity_option import EquityOption +from lusid.models.equity_option_all_of import EquityOptionAllOf +from lusid.models.equity_swap import EquitySwap +from lusid.models.equity_swap_all_of import EquitySwapAllOf +from lusid.models.equity_vol_surface_data import EquityVolSurfaceData +from lusid.models.equity_vol_surface_data_all_of import EquityVolSurfaceDataAllOf from lusid.models.error_detail import ErrorDetail +from lusid.models.exchange_traded_option import ExchangeTradedOption +from lusid.models.exchange_traded_option_all_of import ExchangeTradedOptionAllOf +from lusid.models.exchange_traded_option_contract_details import ExchangeTradedOptionContractDetails from lusid.models.execution import Execution from lusid.models.execution_request import ExecutionRequest from lusid.models.execution_set_request import ExecutionSetRequest +from lusid.models.exotic_instrument import ExoticInstrument +from lusid.models.exotic_instrument_all_of import ExoticInstrumentAllOf from lusid.models.expanded_group import ExpandedGroup from lusid.models.field_definition import FieldDefinition from lusid.models.field_schema import FieldSchema from lusid.models.field_value import FieldValue from lusid.models.file_response import FileResponse +from lusid.models.fixed_leg import FixedLeg +from lusid.models.fixed_leg_all_of import FixedLegAllOf +from lusid.models.fixed_leg_all_of_overrides import FixedLegAllOfOverrides +from lusid.models.floating_leg import FloatingLeg +from lusid.models.floating_leg_all_of import FloatingLegAllOf +from lusid.models.flow_convention_name import FlowConventionName +from lusid.models.flow_conventions import FlowConventions +from lusid.models.forward_rate_agreement import ForwardRateAgreement +from lusid.models.forward_rate_agreement_all_of import ForwardRateAgreementAllOf +from lusid.models.funding_leg import FundingLeg +from lusid.models.funding_leg_all_of import FundingLegAllOf +from lusid.models.future import Future +from lusid.models.future_all_of import FutureAllOf +from lusid.models.futures_contract_details import FuturesContractDetails +from lusid.models.fx_forward import FxForward +from lusid.models.fx_forward_all_of import FxForwardAllOf +from lusid.models.fx_forward_curve_by_quote_reference import FxForwardCurveByQuoteReference +from lusid.models.fx_forward_curve_by_quote_reference_all_of import FxForwardCurveByQuoteReferenceAllOf +from lusid.models.fx_forward_curve_data import FxForwardCurveData +from lusid.models.fx_forward_curve_data_all_of import FxForwardCurveDataAllOf +from lusid.models.fx_forward_model_options import FxForwardModelOptions +from lusid.models.fx_forward_model_options_all_of import FxForwardModelOptionsAllOf +from lusid.models.fx_forward_pips_curve_data import FxForwardPipsCurveData +from lusid.models.fx_forward_pips_curve_data_all_of import FxForwardPipsCurveDataAllOf +from lusid.models.fx_forward_tenor_curve_data import FxForwardTenorCurveData +from lusid.models.fx_forward_tenor_curve_data_all_of import FxForwardTenorCurveDataAllOf +from lusid.models.fx_forward_tenor_pips_curve_data import FxForwardTenorPipsCurveData +from lusid.models.fx_forward_tenor_pips_curve_data_all_of import FxForwardTenorPipsCurveDataAllOf +from lusid.models.fx_option import FxOption +from lusid.models.fx_option_all_of import FxOptionAllOf +from lusid.models.fx_swap import FxSwap +from lusid.models.fx_swap_all_of import FxSwapAllOf +from lusid.models.fx_vol_surface_data import FxVolSurfaceData from lusid.models.get_complex_market_data_response import GetComplexMarketDataResponse from lusid.models.get_instruments_response import GetInstrumentsResponse from lusid.models.get_quotes_response import GetQuotesResponse @@ -111,15 +189,31 @@ from lusid.models.i_unit_definition_dto import IUnitDefinitionDto from lusid.models.id_selector_definition import IdSelectorDefinition from lusid.models.identifier_part_schema import IdentifierPartSchema +from lusid.models.index_convention import IndexConvention +from lusid.models.index_model_options import IndexModelOptions +from lusid.models.index_model_options_all_of import IndexModelOptionsAllOf from lusid.models.industry_classifier import IndustryClassifier +from lusid.models.inflation_linked_bond import InflationLinkedBond +from lusid.models.inflation_linked_bond_all_of import InflationLinkedBondAllOf from lusid.models.inline_valuation_request import InlineValuationRequest from lusid.models.instrument import Instrument from lusid.models.instrument_definition import InstrumentDefinition +from lusid.models.instrument_definition_format import InstrumentDefinitionFormat from lusid.models.instrument_id_type_descriptor import InstrumentIdTypeDescriptor from lusid.models.instrument_id_value import InstrumentIdValue +from lusid.models.instrument_leg import InstrumentLeg +from lusid.models.instrument_leg_all_of import InstrumentLegAllOf +from lusid.models.interest_rate_swap import InterestRateSwap +from lusid.models.interest_rate_swap_all_of import InterestRateSwapAllOf +from lusid.models.interest_rate_swaption import InterestRateSwaption +from lusid.models.interest_rate_swaption_all_of import InterestRateSwaptionAllOf +from lusid.models.ir_vol_cube_data import IrVolCubeData +from lusid.models.ir_vol_cube_data_all_of import IrVolCubeDataAllOf from lusid.models.is_business_day_response import IsBusinessDayResponse from lusid.models.label_value_set import LabelValueSet +from lusid.models.leg_definition import LegDefinition from lusid.models.legal_entity import LegalEntity +from lusid.models.level_step import LevelStep from lusid.models.link import Link from lusid.models.list_aggregation_response import ListAggregationResponse from lusid.models.lusid_instrument import LusidInstrument @@ -131,11 +225,16 @@ from lusid.models.market_data_key_rule import MarketDataKeyRule from lusid.models.market_data_specific_rule import MarketDataSpecificRule from lusid.models.market_options import MarketOptions +from lusid.models.market_quote import MarketQuote from lusid.models.metric_value import MetricValue from lusid.models.model_options import ModelOptions from lusid.models.model_property import ModelProperty from lusid.models.model_selection import ModelSelection from lusid.models.next_value_in_sequence_response import NextValueInSequenceResponse +from lusid.models.opaque_market_data import OpaqueMarketData +from lusid.models.opaque_market_data_all_of import OpaqueMarketDataAllOf +from lusid.models.opaque_model_options import OpaqueModelOptions +from lusid.models.opaque_model_options_all_of import OpaqueModelOptionsAllOf from lusid.models.order import Order from lusid.models.order_by_spec import OrderBySpec from lusid.models.order_request import OrderRequest @@ -170,8 +269,11 @@ from lusid.models.portfolio_holding import PortfolioHolding from lusid.models.portfolio_properties import PortfolioProperties from lusid.models.portfolio_reconciliation_request import PortfolioReconciliationRequest +from lusid.models.portfolio_result_data_key_rule import PortfolioResultDataKeyRule +from lusid.models.portfolio_result_data_key_rule_all_of import PortfolioResultDataKeyRuleAllOf from lusid.models.portfolio_search_result import PortfolioSearchResult from lusid.models.portfolios_reconciliation_request import PortfoliosReconciliationRequest +from lusid.models.premium import Premium from lusid.models.pricing_context import PricingContext from lusid.models.pricing_options import PricingOptions from lusid.models.processed_command import ProcessedCommand @@ -186,11 +288,15 @@ from lusid.models.realised_gain_loss import RealisedGainLoss from lusid.models.reconciliation_break import ReconciliationBreak from lusid.models.reference_data import ReferenceData +from lusid.models.reference_instrument import ReferenceInstrument +from lusid.models.reference_instrument_all_of import ReferenceInstrumentAllOf from lusid.models.reference_portfolio_constituent import ReferencePortfolioConstituent from lusid.models.reference_portfolio_constituent_request import ReferencePortfolioConstituentRequest from lusid.models.related_entity import RelatedEntity from lusid.models.relationship import Relationship from lusid.models.relationship_definition import RelationshipDefinition +from lusid.models.repo import Repo +from lusid.models.repo_all_of import RepoAllOf from lusid.models.resource_id import ResourceId from lusid.models.resource_list_of_access_controlled_resource import ResourceListOfAccessControlledResource from lusid.models.resource_list_of_access_metadata_value_of import ResourceListOfAccessMetadataValueOf @@ -221,16 +327,25 @@ from lusid.models.resource_list_of_relationship import ResourceListOfRelationship from lusid.models.resource_list_of_scope_definition import ResourceListOfScopeDefinition from lusid.models.response_meta_data import ResponseMetaData +from lusid.models.result_data_key_rule import ResultDataKeyRule +from lusid.models.result_data_key_rule_all_of import ResultDataKeyRuleAllOf from lusid.models.result_data_schema import ResultDataSchema from lusid.models.result_key_rule import ResultKeyRule +from lusid.models.schedule import Schedule from lusid.models.scope_definition import ScopeDefinition from lusid.models.sequence_definition import SequenceDefinition from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest from lusid.models.set_legal_entity_properties_request import SetLegalEntityPropertiesRequest from lusid.models.side_configuration_data import SideConfigurationData +from lusid.models.simple_instrument import SimpleInstrument +from lusid.models.simple_instrument_all_of import SimpleInstrumentAllOf +from lusid.models.step_schedule import StepSchedule from lusid.models.stream import Stream from lusid.models.target_tax_lot import TargetTaxLot from lusid.models.target_tax_lot_request import TargetTaxLotRequest +from lusid.models.term_deposit import TermDeposit +from lusid.models.term_deposit_all_of import TermDepositAllOf +from lusid.models.touch import Touch from lusid.models.transaction import Transaction from lusid.models.transaction_configuration_data import TransactionConfigurationData from lusid.models.transaction_configuration_data_request import TransactionConfigurationDataRequest @@ -286,3 +401,6 @@ from lusid.models.versioned_resource_list_of_transaction import VersionedResourceListOfTransaction from lusid.models.weekend_mask import WeekendMask from lusid.models.weighted_instrument import WeightedInstrument +from lusid.models.weighted_instruments import WeightedInstruments +from lusid.models.yield_curve_data import YieldCurveData +from lusid.models.yield_curve_data_all_of import YieldCurveDataAllOf diff --git a/sdk/lusid/models/barrier.py b/sdk/lusid/models/barrier.py new file mode 100644 index 00000000000..0ff87b08aec --- /dev/null +++ b/sdk/lusid/models/barrier.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Barrier(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'direction': 'str', + 'level': 'float', + 'monitoring': 'str', + 'type': 'str' + } + + attribute_map = { + 'direction': 'direction', + 'level': 'level', + 'monitoring': 'monitoring', + 'type': 'type' + } + + required_map = { + 'direction': 'required', + 'level': 'required', + 'monitoring': 'optional', + 'type': 'required' + } + + def __init__(self, direction=None, level=None, monitoring=None, type=None, local_vars_configuration=None): # noqa: E501 + """Barrier - a model defined in OpenAPI" + + :param direction: Supported string (enumeration) values are: [Down, Up]. (required) + :type direction: str + :param level: Trigger level, which the underlying should (or should not) cross/touch. (required) + :type level: float + :param monitoring: Supported string (enumeration) values are: [European, Bermudan, American]. + :type monitoring: str + :param type: Supported string (enumeration) values are: [Knockin, Knockout]. (required) + :type type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._direction = None + self._level = None + self._monitoring = None + self._type = None + self.discriminator = None + + self.direction = direction + self.level = level + self.monitoring = monitoring + self.type = type + + @property + def direction(self): + """Gets the direction of this Barrier. # noqa: E501 + + Supported string (enumeration) values are: [Down, Up]. # noqa: E501 + + :return: The direction of this Barrier. # noqa: E501 + :rtype: str + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this Barrier. + + Supported string (enumeration) values are: [Down, Up]. # noqa: E501 + + :param direction: The direction of this Barrier. # noqa: E501 + :type direction: str + """ + if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 + raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 + + self._direction = direction + + @property + def level(self): + """Gets the level of this Barrier. # noqa: E501 + + Trigger level, which the underlying should (or should not) cross/touch. # noqa: E501 + + :return: The level of this Barrier. # noqa: E501 + :rtype: float + """ + return self._level + + @level.setter + def level(self, level): + """Sets the level of this Barrier. + + Trigger level, which the underlying should (or should not) cross/touch. # noqa: E501 + + :param level: The level of this Barrier. # noqa: E501 + :type level: float + """ + if self.local_vars_configuration.client_side_validation and level is None: # noqa: E501 + raise ValueError("Invalid value for `level`, must not be `None`") # noqa: E501 + + self._level = level + + @property + def monitoring(self): + """Gets the monitoring of this Barrier. # noqa: E501 + + Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :return: The monitoring of this Barrier. # noqa: E501 + :rtype: str + """ + return self._monitoring + + @monitoring.setter + def monitoring(self, monitoring): + """Sets the monitoring of this Barrier. + + Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :param monitoring: The monitoring of this Barrier. # noqa: E501 + :type monitoring: str + """ + + self._monitoring = monitoring + + @property + def type(self): + """Gets the type of this Barrier. # noqa: E501 + + Supported string (enumeration) values are: [Knockin, Knockout]. # noqa: E501 + + :return: The type of this Barrier. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Barrier. + + Supported string (enumeration) values are: [Knockin, Knockout]. # noqa: E501 + + :param type: The type of this Barrier. # noqa: E501 + :type type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Barrier): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Barrier): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/basket.py b/sdk/lusid/models/basket.py new file mode 100644 index 00000000000..3b9b2692cfa --- /dev/null +++ b/sdk/lusid/models/basket.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Basket(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'basket_name': 'BasketIdentifier', + 'basket_type': 'str', + 'weighted_instruments': 'WeightedInstruments', + 'instrument_type': 'str' + } + + attribute_map = { + 'basket_name': 'basketName', + 'basket_type': 'basketType', + 'weighted_instruments': 'weightedInstruments', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'basket_name': 'required', + 'basket_type': 'required', + 'weighted_instruments': 'required', + 'instrument_type': 'required' + } + + def __init__(self, basket_name=None, basket_type=None, weighted_instruments=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """Basket - a model defined in OpenAPI" + + :param basket_name: (required) + :type basket_name: lusid.BasketIdentifier + :param basket_type: What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. (required) + :type basket_type: str + :param weighted_instruments: (required) + :type weighted_instruments: lusid.WeightedInstruments + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._basket_name = None + self._basket_type = None + self._weighted_instruments = None + self._instrument_type = None + self.discriminator = None + + self.basket_name = basket_name + self.basket_type = basket_type + self.weighted_instruments = weighted_instruments + self.instrument_type = instrument_type + + @property + def basket_name(self): + """Gets the basket_name of this Basket. # noqa: E501 + + + :return: The basket_name of this Basket. # noqa: E501 + :rtype: lusid.BasketIdentifier + """ + return self._basket_name + + @basket_name.setter + def basket_name(self, basket_name): + """Sets the basket_name of this Basket. + + + :param basket_name: The basket_name of this Basket. # noqa: E501 + :type basket_name: lusid.BasketIdentifier + """ + if self.local_vars_configuration.client_side_validation and basket_name is None: # noqa: E501 + raise ValueError("Invalid value for `basket_name`, must not be `None`") # noqa: E501 + + self._basket_name = basket_name + + @property + def basket_type(self): + """Gets the basket_type of this Basket. # noqa: E501 + + What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. # noqa: E501 + + :return: The basket_type of this Basket. # noqa: E501 + :rtype: str + """ + return self._basket_type + + @basket_type.setter + def basket_type(self, basket_type): + """Sets the basket_type of this Basket. + + What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. # noqa: E501 + + :param basket_type: The basket_type of this Basket. # noqa: E501 + :type basket_type: str + """ + if self.local_vars_configuration.client_side_validation and basket_type is None: # noqa: E501 + raise ValueError("Invalid value for `basket_type`, must not be `None`") # noqa: E501 + + self._basket_type = basket_type + + @property + def weighted_instruments(self): + """Gets the weighted_instruments of this Basket. # noqa: E501 + + + :return: The weighted_instruments of this Basket. # noqa: E501 + :rtype: lusid.WeightedInstruments + """ + return self._weighted_instruments + + @weighted_instruments.setter + def weighted_instruments(self, weighted_instruments): + """Sets the weighted_instruments of this Basket. + + + :param weighted_instruments: The weighted_instruments of this Basket. # noqa: E501 + :type weighted_instruments: lusid.WeightedInstruments + """ + if self.local_vars_configuration.client_side_validation and weighted_instruments is None: # noqa: E501 + raise ValueError("Invalid value for `weighted_instruments`, must not be `None`") # noqa: E501 + + self._weighted_instruments = weighted_instruments + + @property + def instrument_type(self): + """Gets the instrument_type of this Basket. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this Basket. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this Basket. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this Basket. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Basket): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Basket): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/basket_all_of.py b/sdk/lusid/models/basket_all_of.py new file mode 100644 index 00000000000..c2c4f08bd91 --- /dev/null +++ b/sdk/lusid/models/basket_all_of.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class BasketAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'basket_name': 'BasketIdentifier', + 'basket_type': 'str', + 'weighted_instruments': 'WeightedInstruments', + 'instrument_type': 'str' + } + + attribute_map = { + 'basket_name': 'basketName', + 'basket_type': 'basketType', + 'weighted_instruments': 'weightedInstruments', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'basket_name': 'required', + 'basket_type': 'required', + 'weighted_instruments': 'required', + 'instrument_type': 'required' + } + + def __init__(self, basket_name=None, basket_type=None, weighted_instruments=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """BasketAllOf - a model defined in OpenAPI" + + :param basket_name: (required) + :type basket_name: lusid.BasketIdentifier + :param basket_type: What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. (required) + :type basket_type: str + :param weighted_instruments: (required) + :type weighted_instruments: lusid.WeightedInstruments + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._basket_name = None + self._basket_type = None + self._weighted_instruments = None + self._instrument_type = None + self.discriminator = None + + self.basket_name = basket_name + self.basket_type = basket_type + self.weighted_instruments = weighted_instruments + self.instrument_type = instrument_type + + @property + def basket_name(self): + """Gets the basket_name of this BasketAllOf. # noqa: E501 + + + :return: The basket_name of this BasketAllOf. # noqa: E501 + :rtype: lusid.BasketIdentifier + """ + return self._basket_name + + @basket_name.setter + def basket_name(self, basket_name): + """Sets the basket_name of this BasketAllOf. + + + :param basket_name: The basket_name of this BasketAllOf. # noqa: E501 + :type basket_name: lusid.BasketIdentifier + """ + if self.local_vars_configuration.client_side_validation and basket_name is None: # noqa: E501 + raise ValueError("Invalid value for `basket_name`, must not be `None`") # noqa: E501 + + self._basket_name = basket_name + + @property + def basket_type(self): + """Gets the basket_type of this BasketAllOf. # noqa: E501 + + What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. # noqa: E501 + + :return: The basket_type of this BasketAllOf. # noqa: E501 + :rtype: str + """ + return self._basket_type + + @basket_type.setter + def basket_type(self, basket_type): + """Sets the basket_type of this BasketAllOf. + + What contents does the basket have. The validation will check that the instrument types contained match those expected. Supported string (enumeration) values are: [Bonds, Credits, Equities, EquitySwap]. # noqa: E501 + + :param basket_type: The basket_type of this BasketAllOf. # noqa: E501 + :type basket_type: str + """ + if self.local_vars_configuration.client_side_validation and basket_type is None: # noqa: E501 + raise ValueError("Invalid value for `basket_type`, must not be `None`") # noqa: E501 + + self._basket_type = basket_type + + @property + def weighted_instruments(self): + """Gets the weighted_instruments of this BasketAllOf. # noqa: E501 + + + :return: The weighted_instruments of this BasketAllOf. # noqa: E501 + :rtype: lusid.WeightedInstruments + """ + return self._weighted_instruments + + @weighted_instruments.setter + def weighted_instruments(self, weighted_instruments): + """Sets the weighted_instruments of this BasketAllOf. + + + :param weighted_instruments: The weighted_instruments of this BasketAllOf. # noqa: E501 + :type weighted_instruments: lusid.WeightedInstruments + """ + if self.local_vars_configuration.client_side_validation and weighted_instruments is None: # noqa: E501 + raise ValueError("Invalid value for `weighted_instruments`, must not be `None`") # noqa: E501 + + self._weighted_instruments = weighted_instruments + + @property + def instrument_type(self): + """Gets the instrument_type of this BasketAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this BasketAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this BasketAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this BasketAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BasketAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BasketAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/basket_identifier.py b/sdk/lusid/models/basket_identifier.py new file mode 100644 index 00000000000..9400b4240c1 --- /dev/null +++ b/sdk/lusid/models/basket_identifier.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class BasketIdentifier(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'index': 'str', + 'name': 'str', + 'region': 'str', + 'series_id': 'int' + } + + attribute_map = { + 'index': 'index', + 'name': 'name', + 'region': 'region', + 'series_id': 'seriesId' + } + + required_map = { + 'index': 'required', + 'name': 'required', + 'region': 'required', + 'series_id': 'required' + } + + def __init__(self, index=None, name=None, region=None, series_id=None, local_vars_configuration=None): # noqa: E501 + """BasketIdentifier - a model defined in OpenAPI" + + :param index: Index set, e.g. iTraxx or CDX. (required) + :type index: str + :param name: The index name within the set, e.g. \"MAIN\" or \"Crossover\". (required) + :type name: str + :param region: Applicable geographic country or region. Typically something like \"Europe\", \"Asia ex-Japan\", \"Japan\" or \"Australia\". (required) + :type region: str + :param series_id: The series identifier. (required) + :type series_id: int + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._index = None + self._name = None + self._region = None + self._series_id = None + self.discriminator = None + + self.index = index + self.name = name + self.region = region + self.series_id = series_id + + @property + def index(self): + """Gets the index of this BasketIdentifier. # noqa: E501 + + Index set, e.g. iTraxx or CDX. # noqa: E501 + + :return: The index of this BasketIdentifier. # noqa: E501 + :rtype: str + """ + return self._index + + @index.setter + def index(self, index): + """Sets the index of this BasketIdentifier. + + Index set, e.g. iTraxx or CDX. # noqa: E501 + + :param index: The index of this BasketIdentifier. # noqa: E501 + :type index: str + """ + if self.local_vars_configuration.client_side_validation and index is None: # noqa: E501 + raise ValueError("Invalid value for `index`, must not be `None`") # noqa: E501 + + self._index = index + + @property + def name(self): + """Gets the name of this BasketIdentifier. # noqa: E501 + + The index name within the set, e.g. \"MAIN\" or \"Crossover\". # noqa: E501 + + :return: The name of this BasketIdentifier. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this BasketIdentifier. + + The index name within the set, e.g. \"MAIN\" or \"Crossover\". # noqa: E501 + + :param name: The name of this BasketIdentifier. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def region(self): + """Gets the region of this BasketIdentifier. # noqa: E501 + + Applicable geographic country or region. Typically something like \"Europe\", \"Asia ex-Japan\", \"Japan\" or \"Australia\". # noqa: E501 + + :return: The region of this BasketIdentifier. # noqa: E501 + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """Sets the region of this BasketIdentifier. + + Applicable geographic country or region. Typically something like \"Europe\", \"Asia ex-Japan\", \"Japan\" or \"Australia\". # noqa: E501 + + :param region: The region of this BasketIdentifier. # noqa: E501 + :type region: str + """ + if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501 + raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501 + + self._region = region + + @property + def series_id(self): + """Gets the series_id of this BasketIdentifier. # noqa: E501 + + The series identifier. # noqa: E501 + + :return: The series_id of this BasketIdentifier. # noqa: E501 + :rtype: int + """ + return self._series_id + + @series_id.setter + def series_id(self, series_id): + """Sets the series_id of this BasketIdentifier. + + The series identifier. # noqa: E501 + + :param series_id: The series_id of this BasketIdentifier. # noqa: E501 + :type series_id: int + """ + if self.local_vars_configuration.client_side_validation and series_id is None: # noqa: E501 + raise ValueError("Invalid value for `series_id`, must not be `None`") # noqa: E501 + + self._series_id = series_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BasketIdentifier): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BasketIdentifier): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/bond.py b/sdk/lusid/models/bond.py new file mode 100644 index 00000000000..c829f8b6c26 --- /dev/null +++ b/sdk/lusid/models/bond.py @@ -0,0 +1,492 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Bond(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'flow_conventions': 'FlowConventions', + 'principal': 'float', + 'coupon_rate': 'float', + 'identifiers': 'dict(str, str)', + 'ex_dividend_days': 'int', + 'initial_coupon_date': 'datetime', + 'first_coupon_pay_date': 'datetime', + 'calculation_type': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'flow_conventions': 'flowConventions', + 'principal': 'principal', + 'coupon_rate': 'couponRate', + 'identifiers': 'identifiers', + 'ex_dividend_days': 'exDividendDays', + 'initial_coupon_date': 'initialCouponDate', + 'first_coupon_pay_date': 'firstCouponPayDate', + 'calculation_type': 'calculationType', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_ccy': 'required', + 'flow_conventions': 'required', + 'principal': 'required', + 'coupon_rate': 'required', + 'identifiers': 'optional', + 'ex_dividend_days': 'optional', + 'initial_coupon_date': 'optional', + 'first_coupon_pay_date': 'optional', + 'calculation_type': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_ccy=None, flow_conventions=None, principal=None, coupon_rate=None, identifiers=None, ex_dividend_days=None, initial_coupon_date=None, first_coupon_pay_date=None, calculation_type=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """Bond - a model defined in OpenAPI" + + :param start_date: The start date of the bond's first coupon start date or accrual state date (if settle days = 0) (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param flow_conventions: (required) + :type flow_conventions: lusid.FlowConventions + :param principal: The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. (required) + :type principal: float + :param coupon_rate: Simple coupon rate. (required) + :type coupon_rate: float + :param identifiers: External market codes and identifiers for the bond, e.g. ISIN. + :type identifiers: dict(str, str) + :param ex_dividend_days: Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). + :type ex_dividend_days: int + :param initial_coupon_date: The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. + :type initial_coupon_date: datetime + :param first_coupon_pay_date: The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. + :type first_coupon_pay_date: datetime + :param calculation_type: The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. + :type calculation_type: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_ccy = None + self._flow_conventions = None + self._principal = None + self._coupon_rate = None + self._identifiers = None + self._ex_dividend_days = None + self._initial_coupon_date = None + self._first_coupon_pay_date = None + self._calculation_type = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.flow_conventions = flow_conventions + self.principal = principal + self.coupon_rate = coupon_rate + self.identifiers = identifiers + self.ex_dividend_days = ex_dividend_days + self.initial_coupon_date = initial_coupon_date + self.first_coupon_pay_date = first_coupon_pay_date + self.calculation_type = calculation_type + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this Bond. # noqa: E501 + + The start date of the bond's first coupon start date or accrual state date (if settle days = 0) # noqa: E501 + + :return: The start_date of this Bond. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this Bond. + + The start date of the bond's first coupon start date or accrual state date (if settle days = 0) # noqa: E501 + + :param start_date: The start_date of this Bond. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this Bond. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this Bond. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this Bond. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this Bond. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this Bond. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this Bond. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this Bond. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this Bond. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def flow_conventions(self): + """Gets the flow_conventions of this Bond. # noqa: E501 + + + :return: The flow_conventions of this Bond. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this Bond. + + + :param flow_conventions: The flow_conventions of this Bond. # noqa: E501 + :type flow_conventions: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and flow_conventions is None: # noqa: E501 + raise ValueError("Invalid value for `flow_conventions`, must not be `None`") # noqa: E501 + + self._flow_conventions = flow_conventions + + @property + def principal(self): + """Gets the principal of this Bond. # noqa: E501 + + The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. # noqa: E501 + + :return: The principal of this Bond. # noqa: E501 + :rtype: float + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this Bond. + + The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. # noqa: E501 + + :param principal: The principal of this Bond. # noqa: E501 + :type principal: float + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def coupon_rate(self): + """Gets the coupon_rate of this Bond. # noqa: E501 + + Simple coupon rate. # noqa: E501 + + :return: The coupon_rate of this Bond. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this Bond. + + Simple coupon rate. # noqa: E501 + + :param coupon_rate: The coupon_rate of this Bond. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def identifiers(self): + """Gets the identifiers of this Bond. # noqa: E501 + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this Bond. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this Bond. + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this Bond. # noqa: E501 + :type identifiers: dict(str, str) + """ + + self._identifiers = identifiers + + @property + def ex_dividend_days(self): + """Gets the ex_dividend_days of this Bond. # noqa: E501 + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). # noqa: E501 + + :return: The ex_dividend_days of this Bond. # noqa: E501 + :rtype: int + """ + return self._ex_dividend_days + + @ex_dividend_days.setter + def ex_dividend_days(self, ex_dividend_days): + """Sets the ex_dividend_days of this Bond. + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). # noqa: E501 + + :param ex_dividend_days: The ex_dividend_days of this Bond. # noqa: E501 + :type ex_dividend_days: int + """ + + self._ex_dividend_days = ex_dividend_days + + @property + def initial_coupon_date(self): + """Gets the initial_coupon_date of this Bond. # noqa: E501 + + The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. # noqa: E501 + + :return: The initial_coupon_date of this Bond. # noqa: E501 + :rtype: datetime + """ + return self._initial_coupon_date + + @initial_coupon_date.setter + def initial_coupon_date(self, initial_coupon_date): + """Sets the initial_coupon_date of this Bond. + + The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. # noqa: E501 + + :param initial_coupon_date: The initial_coupon_date of this Bond. # noqa: E501 + :type initial_coupon_date: datetime + """ + + self._initial_coupon_date = initial_coupon_date + + @property + def first_coupon_pay_date(self): + """Gets the first_coupon_pay_date of this Bond. # noqa: E501 + + The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. # noqa: E501 + + :return: The first_coupon_pay_date of this Bond. # noqa: E501 + :rtype: datetime + """ + return self._first_coupon_pay_date + + @first_coupon_pay_date.setter + def first_coupon_pay_date(self, first_coupon_pay_date): + """Sets the first_coupon_pay_date of this Bond. + + The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. # noqa: E501 + + :param first_coupon_pay_date: The first_coupon_pay_date of this Bond. # noqa: E501 + :type first_coupon_pay_date: datetime + """ + + self._first_coupon_pay_date = first_coupon_pay_date + + @property + def calculation_type(self): + """Gets the calculation_type of this Bond. # noqa: E501 + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :return: The calculation_type of this Bond. # noqa: E501 + :rtype: str + """ + return self._calculation_type + + @calculation_type.setter + def calculation_type(self, calculation_type): + """Sets the calculation_type of this Bond. + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :param calculation_type: The calculation_type of this Bond. # noqa: E501 + :type calculation_type: str + """ + + self._calculation_type = calculation_type + + @property + def instrument_type(self): + """Gets the instrument_type of this Bond. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this Bond. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this Bond. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this Bond. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Bond): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Bond): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/bond_all_of.py b/sdk/lusid/models/bond_all_of.py new file mode 100644 index 00000000000..32316b22eed --- /dev/null +++ b/sdk/lusid/models/bond_all_of.py @@ -0,0 +1,492 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class BondAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'flow_conventions': 'FlowConventions', + 'principal': 'float', + 'coupon_rate': 'float', + 'identifiers': 'dict(str, str)', + 'ex_dividend_days': 'int', + 'initial_coupon_date': 'datetime', + 'first_coupon_pay_date': 'datetime', + 'calculation_type': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'flow_conventions': 'flowConventions', + 'principal': 'principal', + 'coupon_rate': 'couponRate', + 'identifiers': 'identifiers', + 'ex_dividend_days': 'exDividendDays', + 'initial_coupon_date': 'initialCouponDate', + 'first_coupon_pay_date': 'firstCouponPayDate', + 'calculation_type': 'calculationType', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_ccy': 'required', + 'flow_conventions': 'required', + 'principal': 'required', + 'coupon_rate': 'required', + 'identifiers': 'optional', + 'ex_dividend_days': 'optional', + 'initial_coupon_date': 'optional', + 'first_coupon_pay_date': 'optional', + 'calculation_type': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_ccy=None, flow_conventions=None, principal=None, coupon_rate=None, identifiers=None, ex_dividend_days=None, initial_coupon_date=None, first_coupon_pay_date=None, calculation_type=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """BondAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the bond's first coupon start date or accrual state date (if settle days = 0) (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param flow_conventions: (required) + :type flow_conventions: lusid.FlowConventions + :param principal: The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. (required) + :type principal: float + :param coupon_rate: Simple coupon rate. (required) + :type coupon_rate: float + :param identifiers: External market codes and identifiers for the bond, e.g. ISIN. + :type identifiers: dict(str, str) + :param ex_dividend_days: Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). + :type ex_dividend_days: int + :param initial_coupon_date: The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. + :type initial_coupon_date: datetime + :param first_coupon_pay_date: The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. + :type first_coupon_pay_date: datetime + :param calculation_type: The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. + :type calculation_type: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_ccy = None + self._flow_conventions = None + self._principal = None + self._coupon_rate = None + self._identifiers = None + self._ex_dividend_days = None + self._initial_coupon_date = None + self._first_coupon_pay_date = None + self._calculation_type = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.flow_conventions = flow_conventions + self.principal = principal + self.coupon_rate = coupon_rate + self.identifiers = identifiers + self.ex_dividend_days = ex_dividend_days + self.initial_coupon_date = initial_coupon_date + self.first_coupon_pay_date = first_coupon_pay_date + self.calculation_type = calculation_type + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this BondAllOf. # noqa: E501 + + The start date of the bond's first coupon start date or accrual state date (if settle days = 0) # noqa: E501 + + :return: The start_date of this BondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this BondAllOf. + + The start date of the bond's first coupon start date or accrual state date (if settle days = 0) # noqa: E501 + + :param start_date: The start_date of this BondAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this BondAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this BondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this BondAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this BondAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this BondAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this BondAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this BondAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this BondAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def flow_conventions(self): + """Gets the flow_conventions of this BondAllOf. # noqa: E501 + + + :return: The flow_conventions of this BondAllOf. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this BondAllOf. + + + :param flow_conventions: The flow_conventions of this BondAllOf. # noqa: E501 + :type flow_conventions: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and flow_conventions is None: # noqa: E501 + raise ValueError("Invalid value for `flow_conventions`, must not be `None`") # noqa: E501 + + self._flow_conventions = flow_conventions + + @property + def principal(self): + """Gets the principal of this BondAllOf. # noqa: E501 + + The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. # noqa: E501 + + :return: The principal of this BondAllOf. # noqa: E501 + :rtype: float + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this BondAllOf. + + The face-value or principal for the bond at outset. This might be reduced through its lifetime in the event of amortisation or similar. # noqa: E501 + + :param principal: The principal of this BondAllOf. # noqa: E501 + :type principal: float + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def coupon_rate(self): + """Gets the coupon_rate of this BondAllOf. # noqa: E501 + + Simple coupon rate. # noqa: E501 + + :return: The coupon_rate of this BondAllOf. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this BondAllOf. + + Simple coupon rate. # noqa: E501 + + :param coupon_rate: The coupon_rate of this BondAllOf. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def identifiers(self): + """Gets the identifiers of this BondAllOf. # noqa: E501 + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this BondAllOf. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this BondAllOf. + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this BondAllOf. # noqa: E501 + :type identifiers: dict(str, str) + """ + + self._identifiers = identifiers + + @property + def ex_dividend_days(self): + """Gets the ex_dividend_days of this BondAllOf. # noqa: E501 + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). # noqa: E501 + + :return: The ex_dividend_days of this BondAllOf. # noqa: E501 + :rtype: int + """ + return self._ex_dividend_days + + @ex_dividend_days.setter + def ex_dividend_days(self, ex_dividend_days): + """Sets the ex_dividend_days of this BondAllOf. + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This means that if the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. The ex-dividend period is (Next Coupon Payment Date - ExDividendDays, Next Coupon Payment Date). # noqa: E501 + + :param ex_dividend_days: The ex_dividend_days of this BondAllOf. # noqa: E501 + :type ex_dividend_days: int + """ + + self._ex_dividend_days = ex_dividend_days + + @property + def initial_coupon_date(self): + """Gets the initial_coupon_date of this BondAllOf. # noqa: E501 + + The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. # noqa: E501 + + :return: The initial_coupon_date of this BondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._initial_coupon_date + + @initial_coupon_date.setter + def initial_coupon_date(self, initial_coupon_date): + """Sets the initial_coupon_date of this BondAllOf. + + The initial coupon date applies to ex-dividends bonds with effectiveAt date before the initial accrual start date. In this case, the initial coupon date is used as an anchor to generate a bond schedule that allows the computation of the ex-dividend date and hence the right coupon amount and accrued interest. # noqa: E501 + + :param initial_coupon_date: The initial_coupon_date of this BondAllOf. # noqa: E501 + :type initial_coupon_date: datetime + """ + + self._initial_coupon_date = initial_coupon_date + + @property + def first_coupon_pay_date(self): + """Gets the first_coupon_pay_date of this BondAllOf. # noqa: E501 + + The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. # noqa: E501 + + :return: The first_coupon_pay_date of this BondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._first_coupon_pay_date + + @first_coupon_pay_date.setter + def first_coupon_pay_date(self, first_coupon_pay_date): + """Sets the first_coupon_pay_date of this BondAllOf. + + The date that the first coupon of the bond is paid. This is required for bonds that have a long first coupon or short first coupon. The first coupon pay date is used as an anchor to compare with the start date and determine if this is a long/short coupon period. # noqa: E501 + + :param first_coupon_pay_date: The first_coupon_pay_date of this BondAllOf. # noqa: E501 + :type first_coupon_pay_date: datetime + """ + + self._first_coupon_pay_date = first_coupon_pay_date + + @property + def calculation_type(self): + """Gets the calculation_type of this BondAllOf. # noqa: E501 + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :return: The calculation_type of this BondAllOf. # noqa: E501 + :rtype: str + """ + return self._calculation_type + + @calculation_type.setter + def calculation_type(self, calculation_type): + """Sets the calculation_type of this BondAllOf. + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :param calculation_type: The calculation_type of this BondAllOf. # noqa: E501 + :type calculation_type: str + """ + + self._calculation_type = calculation_type + + @property + def instrument_type(self): + """Gets the instrument_type of this BondAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this BondAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this BondAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this BondAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BondAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BondAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cap_floor.py b/sdk/lusid/models/cap_floor.py new file mode 100644 index 00000000000..e69ca37bef1 --- /dev/null +++ b/sdk/lusid/models/cap_floor.py @@ -0,0 +1,310 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CapFloor(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'cap_floor_type': 'str', + 'cap_strike': 'float', + 'floor_strike': 'float', + 'include_first_caplet': 'bool', + 'underlying_floating_leg': 'FloatingLeg', + 'instrument_type': 'str' + } + + attribute_map = { + 'cap_floor_type': 'capFloorType', + 'cap_strike': 'capStrike', + 'floor_strike': 'floorStrike', + 'include_first_caplet': 'includeFirstCaplet', + 'underlying_floating_leg': 'underlyingFloatingLeg', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'cap_floor_type': 'required', + 'cap_strike': 'required', + 'floor_strike': 'required', + 'include_first_caplet': 'required', + 'underlying_floating_leg': 'required', + 'instrument_type': 'required' + } + + def __init__(self, cap_floor_type=None, cap_strike=None, floor_strike=None, include_first_caplet=None, underlying_floating_leg=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CapFloor - a model defined in OpenAPI" + + :param cap_floor_type: Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. (required) + :type cap_floor_type: str + :param cap_strike: Strike rate of the Cap. (required) + :type cap_strike: float + :param floor_strike: Strike rate of the Floor. (required) + :type floor_strike: float + :param include_first_caplet: Include first caplet flag. (required) + :type include_first_caplet: bool + :param underlying_floating_leg: (required) + :type underlying_floating_leg: lusid.FloatingLeg + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._cap_floor_type = None + self._cap_strike = None + self._floor_strike = None + self._include_first_caplet = None + self._underlying_floating_leg = None + self._instrument_type = None + self.discriminator = None + + self.cap_floor_type = cap_floor_type + self.cap_strike = cap_strike + self.floor_strike = floor_strike + self.include_first_caplet = include_first_caplet + self.underlying_floating_leg = underlying_floating_leg + self.instrument_type = instrument_type + + @property + def cap_floor_type(self): + """Gets the cap_floor_type of this CapFloor. # noqa: E501 + + Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. # noqa: E501 + + :return: The cap_floor_type of this CapFloor. # noqa: E501 + :rtype: str + """ + return self._cap_floor_type + + @cap_floor_type.setter + def cap_floor_type(self, cap_floor_type): + """Sets the cap_floor_type of this CapFloor. + + Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. # noqa: E501 + + :param cap_floor_type: The cap_floor_type of this CapFloor. # noqa: E501 + :type cap_floor_type: str + """ + if self.local_vars_configuration.client_side_validation and cap_floor_type is None: # noqa: E501 + raise ValueError("Invalid value for `cap_floor_type`, must not be `None`") # noqa: E501 + + self._cap_floor_type = cap_floor_type + + @property + def cap_strike(self): + """Gets the cap_strike of this CapFloor. # noqa: E501 + + Strike rate of the Cap. # noqa: E501 + + :return: The cap_strike of this CapFloor. # noqa: E501 + :rtype: float + """ + return self._cap_strike + + @cap_strike.setter + def cap_strike(self, cap_strike): + """Sets the cap_strike of this CapFloor. + + Strike rate of the Cap. # noqa: E501 + + :param cap_strike: The cap_strike of this CapFloor. # noqa: E501 + :type cap_strike: float + """ + if self.local_vars_configuration.client_side_validation and cap_strike is None: # noqa: E501 + raise ValueError("Invalid value for `cap_strike`, must not be `None`") # noqa: E501 + + self._cap_strike = cap_strike + + @property + def floor_strike(self): + """Gets the floor_strike of this CapFloor. # noqa: E501 + + Strike rate of the Floor. # noqa: E501 + + :return: The floor_strike of this CapFloor. # noqa: E501 + :rtype: float + """ + return self._floor_strike + + @floor_strike.setter + def floor_strike(self, floor_strike): + """Sets the floor_strike of this CapFloor. + + Strike rate of the Floor. # noqa: E501 + + :param floor_strike: The floor_strike of this CapFloor. # noqa: E501 + :type floor_strike: float + """ + if self.local_vars_configuration.client_side_validation and floor_strike is None: # noqa: E501 + raise ValueError("Invalid value for `floor_strike`, must not be `None`") # noqa: E501 + + self._floor_strike = floor_strike + + @property + def include_first_caplet(self): + """Gets the include_first_caplet of this CapFloor. # noqa: E501 + + Include first caplet flag. # noqa: E501 + + :return: The include_first_caplet of this CapFloor. # noqa: E501 + :rtype: bool + """ + return self._include_first_caplet + + @include_first_caplet.setter + def include_first_caplet(self, include_first_caplet): + """Sets the include_first_caplet of this CapFloor. + + Include first caplet flag. # noqa: E501 + + :param include_first_caplet: The include_first_caplet of this CapFloor. # noqa: E501 + :type include_first_caplet: bool + """ + if self.local_vars_configuration.client_side_validation and include_first_caplet is None: # noqa: E501 + raise ValueError("Invalid value for `include_first_caplet`, must not be `None`") # noqa: E501 + + self._include_first_caplet = include_first_caplet + + @property + def underlying_floating_leg(self): + """Gets the underlying_floating_leg of this CapFloor. # noqa: E501 + + + :return: The underlying_floating_leg of this CapFloor. # noqa: E501 + :rtype: lusid.FloatingLeg + """ + return self._underlying_floating_leg + + @underlying_floating_leg.setter + def underlying_floating_leg(self, underlying_floating_leg): + """Sets the underlying_floating_leg of this CapFloor. + + + :param underlying_floating_leg: The underlying_floating_leg of this CapFloor. # noqa: E501 + :type underlying_floating_leg: lusid.FloatingLeg + """ + if self.local_vars_configuration.client_side_validation and underlying_floating_leg is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_floating_leg`, must not be `None`") # noqa: E501 + + self._underlying_floating_leg = underlying_floating_leg + + @property + def instrument_type(self): + """Gets the instrument_type of this CapFloor. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CapFloor. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CapFloor. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CapFloor. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CapFloor): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CapFloor): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cap_floor_all_of.py b/sdk/lusid/models/cap_floor_all_of.py new file mode 100644 index 00000000000..f010de944d4 --- /dev/null +++ b/sdk/lusid/models/cap_floor_all_of.py @@ -0,0 +1,310 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CapFloorAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'cap_floor_type': 'str', + 'cap_strike': 'float', + 'floor_strike': 'float', + 'include_first_caplet': 'bool', + 'underlying_floating_leg': 'FloatingLeg', + 'instrument_type': 'str' + } + + attribute_map = { + 'cap_floor_type': 'capFloorType', + 'cap_strike': 'capStrike', + 'floor_strike': 'floorStrike', + 'include_first_caplet': 'includeFirstCaplet', + 'underlying_floating_leg': 'underlyingFloatingLeg', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'cap_floor_type': 'required', + 'cap_strike': 'required', + 'floor_strike': 'required', + 'include_first_caplet': 'required', + 'underlying_floating_leg': 'required', + 'instrument_type': 'required' + } + + def __init__(self, cap_floor_type=None, cap_strike=None, floor_strike=None, include_first_caplet=None, underlying_floating_leg=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CapFloorAllOf - a model defined in OpenAPI" + + :param cap_floor_type: Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. (required) + :type cap_floor_type: str + :param cap_strike: Strike rate of the Cap. (required) + :type cap_strike: float + :param floor_strike: Strike rate of the Floor. (required) + :type floor_strike: float + :param include_first_caplet: Include first caplet flag. (required) + :type include_first_caplet: bool + :param underlying_floating_leg: (required) + :type underlying_floating_leg: lusid.FloatingLeg + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._cap_floor_type = None + self._cap_strike = None + self._floor_strike = None + self._include_first_caplet = None + self._underlying_floating_leg = None + self._instrument_type = None + self.discriminator = None + + self.cap_floor_type = cap_floor_type + self.cap_strike = cap_strike + self.floor_strike = floor_strike + self.include_first_caplet = include_first_caplet + self.underlying_floating_leg = underlying_floating_leg + self.instrument_type = instrument_type + + @property + def cap_floor_type(self): + """Gets the cap_floor_type of this CapFloorAllOf. # noqa: E501 + + Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. # noqa: E501 + + :return: The cap_floor_type of this CapFloorAllOf. # noqa: E501 + :rtype: str + """ + return self._cap_floor_type + + @cap_floor_type.setter + def cap_floor_type(self, cap_floor_type): + """Sets the cap_floor_type of this CapFloorAllOf. + + Determine if it's CAP, FLOOR, or COLLAR. Supported string (enumeration) values are: [Cap, Floor, Collar]. # noqa: E501 + + :param cap_floor_type: The cap_floor_type of this CapFloorAllOf. # noqa: E501 + :type cap_floor_type: str + """ + if self.local_vars_configuration.client_side_validation and cap_floor_type is None: # noqa: E501 + raise ValueError("Invalid value for `cap_floor_type`, must not be `None`") # noqa: E501 + + self._cap_floor_type = cap_floor_type + + @property + def cap_strike(self): + """Gets the cap_strike of this CapFloorAllOf. # noqa: E501 + + Strike rate of the Cap. # noqa: E501 + + :return: The cap_strike of this CapFloorAllOf. # noqa: E501 + :rtype: float + """ + return self._cap_strike + + @cap_strike.setter + def cap_strike(self, cap_strike): + """Sets the cap_strike of this CapFloorAllOf. + + Strike rate of the Cap. # noqa: E501 + + :param cap_strike: The cap_strike of this CapFloorAllOf. # noqa: E501 + :type cap_strike: float + """ + if self.local_vars_configuration.client_side_validation and cap_strike is None: # noqa: E501 + raise ValueError("Invalid value for `cap_strike`, must not be `None`") # noqa: E501 + + self._cap_strike = cap_strike + + @property + def floor_strike(self): + """Gets the floor_strike of this CapFloorAllOf. # noqa: E501 + + Strike rate of the Floor. # noqa: E501 + + :return: The floor_strike of this CapFloorAllOf. # noqa: E501 + :rtype: float + """ + return self._floor_strike + + @floor_strike.setter + def floor_strike(self, floor_strike): + """Sets the floor_strike of this CapFloorAllOf. + + Strike rate of the Floor. # noqa: E501 + + :param floor_strike: The floor_strike of this CapFloorAllOf. # noqa: E501 + :type floor_strike: float + """ + if self.local_vars_configuration.client_side_validation and floor_strike is None: # noqa: E501 + raise ValueError("Invalid value for `floor_strike`, must not be `None`") # noqa: E501 + + self._floor_strike = floor_strike + + @property + def include_first_caplet(self): + """Gets the include_first_caplet of this CapFloorAllOf. # noqa: E501 + + Include first caplet flag. # noqa: E501 + + :return: The include_first_caplet of this CapFloorAllOf. # noqa: E501 + :rtype: bool + """ + return self._include_first_caplet + + @include_first_caplet.setter + def include_first_caplet(self, include_first_caplet): + """Sets the include_first_caplet of this CapFloorAllOf. + + Include first caplet flag. # noqa: E501 + + :param include_first_caplet: The include_first_caplet of this CapFloorAllOf. # noqa: E501 + :type include_first_caplet: bool + """ + if self.local_vars_configuration.client_side_validation and include_first_caplet is None: # noqa: E501 + raise ValueError("Invalid value for `include_first_caplet`, must not be `None`") # noqa: E501 + + self._include_first_caplet = include_first_caplet + + @property + def underlying_floating_leg(self): + """Gets the underlying_floating_leg of this CapFloorAllOf. # noqa: E501 + + + :return: The underlying_floating_leg of this CapFloorAllOf. # noqa: E501 + :rtype: lusid.FloatingLeg + """ + return self._underlying_floating_leg + + @underlying_floating_leg.setter + def underlying_floating_leg(self, underlying_floating_leg): + """Sets the underlying_floating_leg of this CapFloorAllOf. + + + :param underlying_floating_leg: The underlying_floating_leg of this CapFloorAllOf. # noqa: E501 + :type underlying_floating_leg: lusid.FloatingLeg + """ + if self.local_vars_configuration.client_side_validation and underlying_floating_leg is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_floating_leg`, must not be `None`") # noqa: E501 + + self._underlying_floating_leg = underlying_floating_leg + + @property + def instrument_type(self): + """Gets the instrument_type of this CapFloorAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CapFloorAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CapFloorAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CapFloorAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CapFloorAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CapFloorAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cash_perpetual.py b/sdk/lusid/models/cash_perpetual.py new file mode 100644 index 00000000000..1313c16fb38 --- /dev/null +++ b/sdk/lusid/models/cash_perpetual.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CashPerpetual(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'dom_ccy': 'str', + 'principal': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'dom_ccy': 'domCcy', + 'principal': 'principal', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'dom_ccy': 'required', + 'principal': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, dom_ccy=None, principal=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CashPerpetual - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param principal: The face-value or principal for the cash at outset. (required) + :type principal: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._dom_ccy = None + self._principal = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.dom_ccy = dom_ccy + self.principal = principal + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this CashPerpetual. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this CashPerpetual. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this CashPerpetual. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this CashPerpetual. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this CashPerpetual. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this CashPerpetual. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this CashPerpetual. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this CashPerpetual. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def principal(self): + """Gets the principal of this CashPerpetual. # noqa: E501 + + The face-value or principal for the cash at outset. # noqa: E501 + + :return: The principal of this CashPerpetual. # noqa: E501 + :rtype: float + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this CashPerpetual. + + The face-value or principal for the cash at outset. # noqa: E501 + + :param principal: The principal of this CashPerpetual. # noqa: E501 + :type principal: float + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def instrument_type(self): + """Gets the instrument_type of this CashPerpetual. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CashPerpetual. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CashPerpetual. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CashPerpetual. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CashPerpetual): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CashPerpetual): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cash_perpetual_all_of.py b/sdk/lusid/models/cash_perpetual_all_of.py new file mode 100644 index 00000000000..a1d8e4880ae --- /dev/null +++ b/sdk/lusid/models/cash_perpetual_all_of.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CashPerpetualAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'dom_ccy': 'str', + 'principal': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'dom_ccy': 'domCcy', + 'principal': 'principal', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'dom_ccy': 'required', + 'principal': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, dom_ccy=None, principal=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CashPerpetualAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param principal: The face-value or principal for the cash at outset. (required) + :type principal: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._dom_ccy = None + self._principal = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.dom_ccy = dom_ccy + self.principal = principal + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this CashPerpetualAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this CashPerpetualAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this CashPerpetualAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this CashPerpetualAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this CashPerpetualAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this CashPerpetualAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this CashPerpetualAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this CashPerpetualAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def principal(self): + """Gets the principal of this CashPerpetualAllOf. # noqa: E501 + + The face-value or principal for the cash at outset. # noqa: E501 + + :return: The principal of this CashPerpetualAllOf. # noqa: E501 + :rtype: float + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this CashPerpetualAllOf. + + The face-value or principal for the cash at outset. # noqa: E501 + + :param principal: The principal of this CashPerpetualAllOf. # noqa: E501 + :type principal: float + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def instrument_type(self): + """Gets the instrument_type of this CashPerpetualAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CashPerpetualAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CashPerpetualAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CashPerpetualAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CashPerpetualAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CashPerpetualAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cds_flow_conventions.py b/sdk/lusid/models/cds_flow_conventions.py new file mode 100644 index 00000000000..0c24530a148 --- /dev/null +++ b/sdk/lusid/models/cds_flow_conventions.py @@ -0,0 +1,502 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CdsFlowConventions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'roll_frequency': 'str', + 'currency': 'str', + 'payment_frequency': 'str', + 'day_count_convention': 'str', + 'roll_convention': 'str', + 'payment_calendars': 'list[str]', + 'reset_calendars': 'list[str]', + 'settle_days': 'int', + 'reset_days': 'int', + 'scope': 'str', + 'code': 'str' + } + + attribute_map = { + 'roll_frequency': 'rollFrequency', + 'currency': 'currency', + 'payment_frequency': 'paymentFrequency', + 'day_count_convention': 'dayCountConvention', + 'roll_convention': 'rollConvention', + 'payment_calendars': 'paymentCalendars', + 'reset_calendars': 'resetCalendars', + 'settle_days': 'settleDays', + 'reset_days': 'resetDays', + 'scope': 'scope', + 'code': 'code' + } + + required_map = { + 'roll_frequency': 'optional', + 'currency': 'required', + 'payment_frequency': 'required', + 'day_count_convention': 'required', + 'roll_convention': 'required', + 'payment_calendars': 'required', + 'reset_calendars': 'required', + 'settle_days': 'required', + 'reset_days': 'required', + 'scope': 'optional', + 'code': 'optional' + } + + def __init__(self, roll_frequency=None, currency=None, payment_frequency=None, day_count_convention=None, roll_convention=None, payment_calendars=None, reset_calendars=None, settle_days=None, reset_days=None, scope=None, code=None, local_vars_configuration=None): # noqa: E501 + """CdsFlowConventions - a model defined in OpenAPI" + + :param roll_frequency: The frequency at which the reference bonds are updated, this defaults to 6M, but can be 3M, exp for historically issued products + :type roll_frequency: str + :param currency: Currency of the flow convention. (required) + :type currency: str + :param payment_frequency: When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. (required) + :type payment_frequency: str + :param day_count_convention: when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. (required) + :type day_count_convention: str + :param roll_convention: When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, EndOfMonth, EOM, EndOfMonthPrevious, EOMP, EndOfMonthFollowing, EOMF, HalfMonthModifiedFollowing]. (required) + :type roll_convention: str + :param payment_calendars: An array of strings denoting holiday calendars that apply to generation of payment schedules. (required) + :type payment_calendars: list[str] + :param reset_calendars: An array of strings denoting holiday calendars that apply to generation of reset schedules. (required) + :type reset_calendars: list[str] + :param settle_days: Number of Good Business Days between the trade date and the effective or settlement date of the instrument. (required) + :type settle_days: int + :param reset_days: The number of Good Business Days between determination and payment of reset. (required) + :type reset_days: int + :param scope: The scope used when updating or inserting the convention. + :type scope: str + :param code: The code of the convention. + :type code: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._roll_frequency = None + self._currency = None + self._payment_frequency = None + self._day_count_convention = None + self._roll_convention = None + self._payment_calendars = None + self._reset_calendars = None + self._settle_days = None + self._reset_days = None + self._scope = None + self._code = None + self.discriminator = None + + self.roll_frequency = roll_frequency + self.currency = currency + self.payment_frequency = payment_frequency + self.day_count_convention = day_count_convention + self.roll_convention = roll_convention + self.payment_calendars = payment_calendars + self.reset_calendars = reset_calendars + self.settle_days = settle_days + self.reset_days = reset_days + self.scope = scope + self.code = code + + @property + def roll_frequency(self): + """Gets the roll_frequency of this CdsFlowConventions. # noqa: E501 + + The frequency at which the reference bonds are updated, this defaults to 6M, but can be 3M, exp for historically issued products # noqa: E501 + + :return: The roll_frequency of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._roll_frequency + + @roll_frequency.setter + def roll_frequency(self, roll_frequency): + """Sets the roll_frequency of this CdsFlowConventions. + + The frequency at which the reference bonds are updated, this defaults to 6M, but can be 3M, exp for historically issued products # noqa: E501 + + :param roll_frequency: The roll_frequency of this CdsFlowConventions. # noqa: E501 + :type roll_frequency: str + """ + if (self.local_vars_configuration.client_side_validation and + roll_frequency is not None and len(roll_frequency) > 16): + raise ValueError("Invalid value for `roll_frequency`, length must be less than or equal to `16`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + roll_frequency is not None and len(roll_frequency) < 0): + raise ValueError("Invalid value for `roll_frequency`, length must be greater than or equal to `0`") # noqa: E501 + + self._roll_frequency = roll_frequency + + @property + def currency(self): + """Gets the currency of this CdsFlowConventions. # noqa: E501 + + Currency of the flow convention. # noqa: E501 + + :return: The currency of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this CdsFlowConventions. + + Currency of the flow convention. # noqa: E501 + + :param currency: The currency of this CdsFlowConventions. # noqa: E501 + :type currency: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def payment_frequency(self): + """Gets the payment_frequency of this CdsFlowConventions. # noqa: E501 + + When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. # noqa: E501 + + :return: The payment_frequency of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._payment_frequency + + @payment_frequency.setter + def payment_frequency(self, payment_frequency): + """Sets the payment_frequency of this CdsFlowConventions. + + When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. # noqa: E501 + + :param payment_frequency: The payment_frequency of this CdsFlowConventions. # noqa: E501 + :type payment_frequency: str + """ + if self.local_vars_configuration.client_side_validation and payment_frequency is None: # noqa: E501 + raise ValueError("Invalid value for `payment_frequency`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + payment_frequency is not None and len(payment_frequency) > 50): + raise ValueError("Invalid value for `payment_frequency`, length must be less than or equal to `50`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + payment_frequency is not None and len(payment_frequency) < 0): + raise ValueError("Invalid value for `payment_frequency`, length must be greater than or equal to `0`") # noqa: E501 + + self._payment_frequency = payment_frequency + + @property + def day_count_convention(self): + """Gets the day_count_convention of this CdsFlowConventions. # noqa: E501 + + when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :return: The day_count_convention of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._day_count_convention + + @day_count_convention.setter + def day_count_convention(self, day_count_convention): + """Sets the day_count_convention of this CdsFlowConventions. + + when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :param day_count_convention: The day_count_convention of this CdsFlowConventions. # noqa: E501 + :type day_count_convention: str + """ + if self.local_vars_configuration.client_side_validation and day_count_convention is None: # noqa: E501 + raise ValueError("Invalid value for `day_count_convention`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + day_count_convention is not None and len(day_count_convention) > 50): + raise ValueError("Invalid value for `day_count_convention`, length must be less than or equal to `50`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + day_count_convention is not None and len(day_count_convention) < 0): + raise ValueError("Invalid value for `day_count_convention`, length must be greater than or equal to `0`") # noqa: E501 + + self._day_count_convention = day_count_convention + + @property + def roll_convention(self): + """Gets the roll_convention of this CdsFlowConventions. # noqa: E501 + + When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, EndOfMonth, EOM, EndOfMonthPrevious, EOMP, EndOfMonthFollowing, EOMF, HalfMonthModifiedFollowing]. # noqa: E501 + + :return: The roll_convention of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._roll_convention + + @roll_convention.setter + def roll_convention(self, roll_convention): + """Sets the roll_convention of this CdsFlowConventions. + + When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, EndOfMonth, EOM, EndOfMonthPrevious, EOMP, EndOfMonthFollowing, EOMF, HalfMonthModifiedFollowing]. # noqa: E501 + + :param roll_convention: The roll_convention of this CdsFlowConventions. # noqa: E501 + :type roll_convention: str + """ + if self.local_vars_configuration.client_side_validation and roll_convention is None: # noqa: E501 + raise ValueError("Invalid value for `roll_convention`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + roll_convention is not None and len(roll_convention) > 50): + raise ValueError("Invalid value for `roll_convention`, length must be less than or equal to `50`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + roll_convention is not None and len(roll_convention) < 0): + raise ValueError("Invalid value for `roll_convention`, length must be greater than or equal to `0`") # noqa: E501 + + self._roll_convention = roll_convention + + @property + def payment_calendars(self): + """Gets the payment_calendars of this CdsFlowConventions. # noqa: E501 + + An array of strings denoting holiday calendars that apply to generation of payment schedules. # noqa: E501 + + :return: The payment_calendars of this CdsFlowConventions. # noqa: E501 + :rtype: list[str] + """ + return self._payment_calendars + + @payment_calendars.setter + def payment_calendars(self, payment_calendars): + """Sets the payment_calendars of this CdsFlowConventions. + + An array of strings denoting holiday calendars that apply to generation of payment schedules. # noqa: E501 + + :param payment_calendars: The payment_calendars of this CdsFlowConventions. # noqa: E501 + :type payment_calendars: list[str] + """ + if self.local_vars_configuration.client_side_validation and payment_calendars is None: # noqa: E501 + raise ValueError("Invalid value for `payment_calendars`, must not be `None`") # noqa: E501 + + self._payment_calendars = payment_calendars + + @property + def reset_calendars(self): + """Gets the reset_calendars of this CdsFlowConventions. # noqa: E501 + + An array of strings denoting holiday calendars that apply to generation of reset schedules. # noqa: E501 + + :return: The reset_calendars of this CdsFlowConventions. # noqa: E501 + :rtype: list[str] + """ + return self._reset_calendars + + @reset_calendars.setter + def reset_calendars(self, reset_calendars): + """Sets the reset_calendars of this CdsFlowConventions. + + An array of strings denoting holiday calendars that apply to generation of reset schedules. # noqa: E501 + + :param reset_calendars: The reset_calendars of this CdsFlowConventions. # noqa: E501 + :type reset_calendars: list[str] + """ + if self.local_vars_configuration.client_side_validation and reset_calendars is None: # noqa: E501 + raise ValueError("Invalid value for `reset_calendars`, must not be `None`") # noqa: E501 + + self._reset_calendars = reset_calendars + + @property + def settle_days(self): + """Gets the settle_days of this CdsFlowConventions. # noqa: E501 + + Number of Good Business Days between the trade date and the effective or settlement date of the instrument. # noqa: E501 + + :return: The settle_days of this CdsFlowConventions. # noqa: E501 + :rtype: int + """ + return self._settle_days + + @settle_days.setter + def settle_days(self, settle_days): + """Sets the settle_days of this CdsFlowConventions. + + Number of Good Business Days between the trade date and the effective or settlement date of the instrument. # noqa: E501 + + :param settle_days: The settle_days of this CdsFlowConventions. # noqa: E501 + :type settle_days: int + """ + if self.local_vars_configuration.client_side_validation and settle_days is None: # noqa: E501 + raise ValueError("Invalid value for `settle_days`, must not be `None`") # noqa: E501 + + self._settle_days = settle_days + + @property + def reset_days(self): + """Gets the reset_days of this CdsFlowConventions. # noqa: E501 + + The number of Good Business Days between determination and payment of reset. # noqa: E501 + + :return: The reset_days of this CdsFlowConventions. # noqa: E501 + :rtype: int + """ + return self._reset_days + + @reset_days.setter + def reset_days(self, reset_days): + """Sets the reset_days of this CdsFlowConventions. + + The number of Good Business Days between determination and payment of reset. # noqa: E501 + + :param reset_days: The reset_days of this CdsFlowConventions. # noqa: E501 + :type reset_days: int + """ + if self.local_vars_configuration.client_side_validation and reset_days is None: # noqa: E501 + raise ValueError("Invalid value for `reset_days`, must not be `None`") # noqa: E501 + + self._reset_days = reset_days + + @property + def scope(self): + """Gets the scope of this CdsFlowConventions. # noqa: E501 + + The scope used when updating or inserting the convention. # noqa: E501 + + :return: The scope of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this CdsFlowConventions. + + The scope used when updating or inserting the convention. # noqa: E501 + + :param scope: The scope of this CdsFlowConventions. # noqa: E501 + :type scope: str + """ + if (self.local_vars_configuration.client_side_validation and + scope is not None and len(scope) > 256): + raise ValueError("Invalid value for `scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + scope is not None and len(scope) < 1): + raise ValueError("Invalid value for `scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', scope)): # noqa: E501 + raise ValueError(r"Invalid value for `scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._scope = scope + + @property + def code(self): + """Gets the code of this CdsFlowConventions. # noqa: E501 + + The code of the convention. # noqa: E501 + + :return: The code of this CdsFlowConventions. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this CdsFlowConventions. + + The code of the convention. # noqa: E501 + + :param code: The code of this CdsFlowConventions. # noqa: E501 + :type code: str + """ + if (self.local_vars_configuration.client_side_validation and + code is not None and len(code) > 256): + raise ValueError("Invalid value for `code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and len(code) < 1): + raise ValueError("Invalid value for `code`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', code)): # noqa: E501 + raise ValueError(r"Invalid value for `code`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._code = code + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CdsFlowConventions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CdsFlowConventions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cds_index.py b/sdk/lusid/models/cds_index.py new file mode 100644 index 00000000000..8f58ede917b --- /dev/null +++ b/sdk/lusid/models/cds_index.py @@ -0,0 +1,400 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CdsIndex(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'flow_conventions': 'CdsFlowConventions', + 'coupon_rate': 'float', + 'identifiers': 'dict(str, str)', + 'basket': 'Basket', + 'convention_name': 'FlowConventionName', + 'notional': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'flow_conventions': 'flowConventions', + 'coupon_rate': 'couponRate', + 'identifiers': 'identifiers', + 'basket': 'basket', + 'convention_name': 'conventionName', + 'notional': 'notional', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'flow_conventions': 'optional', + 'coupon_rate': 'required', + 'identifiers': 'required', + 'basket': 'required', + 'convention_name': 'optional', + 'notional': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, flow_conventions=None, coupon_rate=None, identifiers=None, basket=None, convention_name=None, notional=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CdsIndex - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param flow_conventions: + :type flow_conventions: lusid.CdsFlowConventions + :param coupon_rate: The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. (required) + :type coupon_rate: float + :param identifiers: external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. (required) + :type identifiers: dict(str, str) + :param basket: (required) + :type basket: lusid.Basket + :param convention_name: + :type convention_name: lusid.FlowConventionName + :param notional: The notional quantity that applies to both the premium and protection legs. (required) + :type notional: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._flow_conventions = None + self._coupon_rate = None + self._identifiers = None + self._basket = None + self._convention_name = None + self._notional = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + if flow_conventions is not None: + self.flow_conventions = flow_conventions + self.coupon_rate = coupon_rate + self.identifiers = identifiers + self.basket = basket + if convention_name is not None: + self.convention_name = convention_name + self.notional = notional + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this CdsIndex. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this CdsIndex. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this CdsIndex. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this CdsIndex. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this CdsIndex. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this CdsIndex. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this CdsIndex. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this CdsIndex. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def flow_conventions(self): + """Gets the flow_conventions of this CdsIndex. # noqa: E501 + + + :return: The flow_conventions of this CdsIndex. # noqa: E501 + :rtype: lusid.CdsFlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this CdsIndex. + + + :param flow_conventions: The flow_conventions of this CdsIndex. # noqa: E501 + :type flow_conventions: lusid.CdsFlowConventions + """ + + self._flow_conventions = flow_conventions + + @property + def coupon_rate(self): + """Gets the coupon_rate of this CdsIndex. # noqa: E501 + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :return: The coupon_rate of this CdsIndex. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this CdsIndex. + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :param coupon_rate: The coupon_rate of this CdsIndex. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def identifiers(self): + """Gets the identifiers of this CdsIndex. # noqa: E501 + + external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. # noqa: E501 + + :return: The identifiers of this CdsIndex. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this CdsIndex. + + external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. # noqa: E501 + + :param identifiers: The identifiers of this CdsIndex. # noqa: E501 + :type identifiers: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and identifiers is None: # noqa: E501 + raise ValueError("Invalid value for `identifiers`, must not be `None`") # noqa: E501 + + self._identifiers = identifiers + + @property + def basket(self): + """Gets the basket of this CdsIndex. # noqa: E501 + + + :return: The basket of this CdsIndex. # noqa: E501 + :rtype: lusid.Basket + """ + return self._basket + + @basket.setter + def basket(self, basket): + """Sets the basket of this CdsIndex. + + + :param basket: The basket of this CdsIndex. # noqa: E501 + :type basket: lusid.Basket + """ + if self.local_vars_configuration.client_side_validation and basket is None: # noqa: E501 + raise ValueError("Invalid value for `basket`, must not be `None`") # noqa: E501 + + self._basket = basket + + @property + def convention_name(self): + """Gets the convention_name of this CdsIndex. # noqa: E501 + + + :return: The convention_name of this CdsIndex. # noqa: E501 + :rtype: lusid.FlowConventionName + """ + return self._convention_name + + @convention_name.setter + def convention_name(self, convention_name): + """Sets the convention_name of this CdsIndex. + + + :param convention_name: The convention_name of this CdsIndex. # noqa: E501 + :type convention_name: lusid.FlowConventionName + """ + + self._convention_name = convention_name + + @property + def notional(self): + """Gets the notional of this CdsIndex. # noqa: E501 + + The notional quantity that applies to both the premium and protection legs. # noqa: E501 + + :return: The notional of this CdsIndex. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this CdsIndex. + + The notional quantity that applies to both the premium and protection legs. # noqa: E501 + + :param notional: The notional of this CdsIndex. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def instrument_type(self): + """Gets the instrument_type of this CdsIndex. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CdsIndex. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CdsIndex. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CdsIndex. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CdsIndex): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CdsIndex): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cds_index_all_of.py b/sdk/lusid/models/cds_index_all_of.py new file mode 100644 index 00000000000..4fe9feb40f1 --- /dev/null +++ b/sdk/lusid/models/cds_index_all_of.py @@ -0,0 +1,400 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CdsIndexAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'flow_conventions': 'CdsFlowConventions', + 'coupon_rate': 'float', + 'identifiers': 'dict(str, str)', + 'basket': 'Basket', + 'convention_name': 'FlowConventionName', + 'notional': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'flow_conventions': 'flowConventions', + 'coupon_rate': 'couponRate', + 'identifiers': 'identifiers', + 'basket': 'basket', + 'convention_name': 'conventionName', + 'notional': 'notional', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'flow_conventions': 'optional', + 'coupon_rate': 'required', + 'identifiers': 'required', + 'basket': 'required', + 'convention_name': 'optional', + 'notional': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, flow_conventions=None, coupon_rate=None, identifiers=None, basket=None, convention_name=None, notional=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CdsIndexAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param flow_conventions: + :type flow_conventions: lusid.CdsFlowConventions + :param coupon_rate: The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. (required) + :type coupon_rate: float + :param identifiers: external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. (required) + :type identifiers: dict(str, str) + :param basket: (required) + :type basket: lusid.Basket + :param convention_name: + :type convention_name: lusid.FlowConventionName + :param notional: The notional quantity that applies to both the premium and protection legs. (required) + :type notional: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._flow_conventions = None + self._coupon_rate = None + self._identifiers = None + self._basket = None + self._convention_name = None + self._notional = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + if flow_conventions is not None: + self.flow_conventions = flow_conventions + self.coupon_rate = coupon_rate + self.identifiers = identifiers + self.basket = basket + if convention_name is not None: + self.convention_name = convention_name + self.notional = notional + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this CdsIndexAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this CdsIndexAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this CdsIndexAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this CdsIndexAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this CdsIndexAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this CdsIndexAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this CdsIndexAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this CdsIndexAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def flow_conventions(self): + """Gets the flow_conventions of this CdsIndexAllOf. # noqa: E501 + + + :return: The flow_conventions of this CdsIndexAllOf. # noqa: E501 + :rtype: lusid.CdsFlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this CdsIndexAllOf. + + + :param flow_conventions: The flow_conventions of this CdsIndexAllOf. # noqa: E501 + :type flow_conventions: lusid.CdsFlowConventions + """ + + self._flow_conventions = flow_conventions + + @property + def coupon_rate(self): + """Gets the coupon_rate of this CdsIndexAllOf. # noqa: E501 + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :return: The coupon_rate of this CdsIndexAllOf. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this CdsIndexAllOf. + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :param coupon_rate: The coupon_rate of this CdsIndexAllOf. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def identifiers(self): + """Gets the identifiers of this CdsIndexAllOf. # noqa: E501 + + external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. # noqa: E501 + + :return: The identifiers of this CdsIndexAllOf. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this CdsIndexAllOf. + + external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. # noqa: E501 + + :param identifiers: The identifiers of this CdsIndexAllOf. # noqa: E501 + :type identifiers: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and identifiers is None: # noqa: E501 + raise ValueError("Invalid value for `identifiers`, must not be `None`") # noqa: E501 + + self._identifiers = identifiers + + @property + def basket(self): + """Gets the basket of this CdsIndexAllOf. # noqa: E501 + + + :return: The basket of this CdsIndexAllOf. # noqa: E501 + :rtype: lusid.Basket + """ + return self._basket + + @basket.setter + def basket(self, basket): + """Sets the basket of this CdsIndexAllOf. + + + :param basket: The basket of this CdsIndexAllOf. # noqa: E501 + :type basket: lusid.Basket + """ + if self.local_vars_configuration.client_side_validation and basket is None: # noqa: E501 + raise ValueError("Invalid value for `basket`, must not be `None`") # noqa: E501 + + self._basket = basket + + @property + def convention_name(self): + """Gets the convention_name of this CdsIndexAllOf. # noqa: E501 + + + :return: The convention_name of this CdsIndexAllOf. # noqa: E501 + :rtype: lusid.FlowConventionName + """ + return self._convention_name + + @convention_name.setter + def convention_name(self, convention_name): + """Sets the convention_name of this CdsIndexAllOf. + + + :param convention_name: The convention_name of this CdsIndexAllOf. # noqa: E501 + :type convention_name: lusid.FlowConventionName + """ + + self._convention_name = convention_name + + @property + def notional(self): + """Gets the notional of this CdsIndexAllOf. # noqa: E501 + + The notional quantity that applies to both the premium and protection legs. # noqa: E501 + + :return: The notional of this CdsIndexAllOf. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this CdsIndexAllOf. + + The notional quantity that applies to both the premium and protection legs. # noqa: E501 + + :param notional: The notional of this CdsIndexAllOf. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def instrument_type(self): + """Gets the instrument_type of this CdsIndexAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CdsIndexAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CdsIndexAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CdsIndexAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CdsIndexAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CdsIndexAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/cds_protection_detail_specification.py b/sdk/lusid/models/cds_protection_detail_specification.py new file mode 100644 index 00000000000..aba11dc2dd2 --- /dev/null +++ b/sdk/lusid/models/cds_protection_detail_specification.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CdsProtectionDetailSpecification(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'seniority': 'str', + 'restructuring_type': 'str', + 'protect_start_day': 'bool', + 'pay_accrued_interest_on_default': 'bool' + } + + attribute_map = { + 'seniority': 'seniority', + 'restructuring_type': 'restructuringType', + 'protect_start_day': 'protectStartDay', + 'pay_accrued_interest_on_default': 'payAccruedInterestOnDefault' + } + + required_map = { + 'seniority': 'required', + 'restructuring_type': 'required', + 'protect_start_day': 'required', + 'pay_accrued_interest_on_default': 'required' + } + + def __init__(self, seniority=None, restructuring_type=None, protect_start_day=None, pay_accrued_interest_on_default=None, local_vars_configuration=None): # noqa: E501 + """CdsProtectionDetailSpecification - a model defined in OpenAPI" + + :param seniority: The seniority level of the CDS. Supported string (enumeration) values are: [SNR, SUB, JRSUBUT2, PREFT1, SECDOM, SNRFOR, SUBLT2]. (required) + :type seniority: str + :param restructuring_type: The restructuring clause. Supported string (enumeration) values are: [CR, MR, MM, XR]. (required) + :type restructuring_type: str + :param protect_start_day: Does the protection leg pay out in the case of default on the start date. (required) + :type protect_start_day: bool + :param pay_accrued_interest_on_default: Should accrued interest on the premium leg be paid if a credit event occurs. (required) + :type pay_accrued_interest_on_default: bool + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._seniority = None + self._restructuring_type = None + self._protect_start_day = None + self._pay_accrued_interest_on_default = None + self.discriminator = None + + self.seniority = seniority + self.restructuring_type = restructuring_type + self.protect_start_day = protect_start_day + self.pay_accrued_interest_on_default = pay_accrued_interest_on_default + + @property + def seniority(self): + """Gets the seniority of this CdsProtectionDetailSpecification. # noqa: E501 + + The seniority level of the CDS. Supported string (enumeration) values are: [SNR, SUB, JRSUBUT2, PREFT1, SECDOM, SNRFOR, SUBLT2]. # noqa: E501 + + :return: The seniority of this CdsProtectionDetailSpecification. # noqa: E501 + :rtype: str + """ + return self._seniority + + @seniority.setter + def seniority(self, seniority): + """Sets the seniority of this CdsProtectionDetailSpecification. + + The seniority level of the CDS. Supported string (enumeration) values are: [SNR, SUB, JRSUBUT2, PREFT1, SECDOM, SNRFOR, SUBLT2]. # noqa: E501 + + :param seniority: The seniority of this CdsProtectionDetailSpecification. # noqa: E501 + :type seniority: str + """ + if self.local_vars_configuration.client_side_validation and seniority is None: # noqa: E501 + raise ValueError("Invalid value for `seniority`, must not be `None`") # noqa: E501 + + self._seniority = seniority + + @property + def restructuring_type(self): + """Gets the restructuring_type of this CdsProtectionDetailSpecification. # noqa: E501 + + The restructuring clause. Supported string (enumeration) values are: [CR, MR, MM, XR]. # noqa: E501 + + :return: The restructuring_type of this CdsProtectionDetailSpecification. # noqa: E501 + :rtype: str + """ + return self._restructuring_type + + @restructuring_type.setter + def restructuring_type(self, restructuring_type): + """Sets the restructuring_type of this CdsProtectionDetailSpecification. + + The restructuring clause. Supported string (enumeration) values are: [CR, MR, MM, XR]. # noqa: E501 + + :param restructuring_type: The restructuring_type of this CdsProtectionDetailSpecification. # noqa: E501 + :type restructuring_type: str + """ + if self.local_vars_configuration.client_side_validation and restructuring_type is None: # noqa: E501 + raise ValueError("Invalid value for `restructuring_type`, must not be `None`") # noqa: E501 + + self._restructuring_type = restructuring_type + + @property + def protect_start_day(self): + """Gets the protect_start_day of this CdsProtectionDetailSpecification. # noqa: E501 + + Does the protection leg pay out in the case of default on the start date. # noqa: E501 + + :return: The protect_start_day of this CdsProtectionDetailSpecification. # noqa: E501 + :rtype: bool + """ + return self._protect_start_day + + @protect_start_day.setter + def protect_start_day(self, protect_start_day): + """Sets the protect_start_day of this CdsProtectionDetailSpecification. + + Does the protection leg pay out in the case of default on the start date. # noqa: E501 + + :param protect_start_day: The protect_start_day of this CdsProtectionDetailSpecification. # noqa: E501 + :type protect_start_day: bool + """ + if self.local_vars_configuration.client_side_validation and protect_start_day is None: # noqa: E501 + raise ValueError("Invalid value for `protect_start_day`, must not be `None`") # noqa: E501 + + self._protect_start_day = protect_start_day + + @property + def pay_accrued_interest_on_default(self): + """Gets the pay_accrued_interest_on_default of this CdsProtectionDetailSpecification. # noqa: E501 + + Should accrued interest on the premium leg be paid if a credit event occurs. # noqa: E501 + + :return: The pay_accrued_interest_on_default of this CdsProtectionDetailSpecification. # noqa: E501 + :rtype: bool + """ + return self._pay_accrued_interest_on_default + + @pay_accrued_interest_on_default.setter + def pay_accrued_interest_on_default(self, pay_accrued_interest_on_default): + """Sets the pay_accrued_interest_on_default of this CdsProtectionDetailSpecification. + + Should accrued interest on the premium leg be paid if a credit event occurs. # noqa: E501 + + :param pay_accrued_interest_on_default: The pay_accrued_interest_on_default of this CdsProtectionDetailSpecification. # noqa: E501 + :type pay_accrued_interest_on_default: bool + """ + if self.local_vars_configuration.client_side_validation and pay_accrued_interest_on_default is None: # noqa: E501 + raise ValueError("Invalid value for `pay_accrued_interest_on_default`, must not be `None`") # noqa: E501 + + self._pay_accrued_interest_on_default = pay_accrued_interest_on_default + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CdsProtectionDetailSpecification): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CdsProtectionDetailSpecification): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/complex_bond.py b/sdk/lusid/models/complex_bond.py new file mode 100644 index 00000000000..a16779e30c2 --- /dev/null +++ b/sdk/lusid/models/complex_bond.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ComplexBond(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'identifiers': 'dict(str, str)', + 'calculation_type': 'str', + 'schedules': 'list[Schedule]', + 'instrument_type': 'str' + } + + attribute_map = { + 'identifiers': 'identifiers', + 'calculation_type': 'calculationType', + 'schedules': 'schedules', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'identifiers': 'optional', + 'calculation_type': 'optional', + 'schedules': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, identifiers=None, calculation_type=None, schedules=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ComplexBond - a model defined in OpenAPI" + + :param identifiers: external market codes and identifiers for the bond, e.g. ISIN. + :type identifiers: dict(str, str) + :param calculation_type: The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. + :type calculation_type: str + :param schedules: schedules. + :type schedules: list[lusid.Schedule] + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._identifiers = None + self._calculation_type = None + self._schedules = None + self._instrument_type = None + self.discriminator = None + + self.identifiers = identifiers + self.calculation_type = calculation_type + self.schedules = schedules + self.instrument_type = instrument_type + + @property + def identifiers(self): + """Gets the identifiers of this ComplexBond. # noqa: E501 + + external market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this ComplexBond. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this ComplexBond. + + external market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this ComplexBond. # noqa: E501 + :type identifiers: dict(str, str) + """ + + self._identifiers = identifiers + + @property + def calculation_type(self): + """Gets the calculation_type of this ComplexBond. # noqa: E501 + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :return: The calculation_type of this ComplexBond. # noqa: E501 + :rtype: str + """ + return self._calculation_type + + @calculation_type.setter + def calculation_type(self, calculation_type): + """Sets the calculation_type of this ComplexBond. + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :param calculation_type: The calculation_type of this ComplexBond. # noqa: E501 + :type calculation_type: str + """ + + self._calculation_type = calculation_type + + @property + def schedules(self): + """Gets the schedules of this ComplexBond. # noqa: E501 + + schedules. # noqa: E501 + + :return: The schedules of this ComplexBond. # noqa: E501 + :rtype: list[lusid.Schedule] + """ + return self._schedules + + @schedules.setter + def schedules(self, schedules): + """Sets the schedules of this ComplexBond. + + schedules. # noqa: E501 + + :param schedules: The schedules of this ComplexBond. # noqa: E501 + :type schedules: list[lusid.Schedule] + """ + + self._schedules = schedules + + @property + def instrument_type(self): + """Gets the instrument_type of this ComplexBond. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ComplexBond. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ComplexBond. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ComplexBond. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ComplexBond): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ComplexBond): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/complex_bond_all_of.py b/sdk/lusid/models/complex_bond_all_of.py new file mode 100644 index 00000000000..8c050ff6ab0 --- /dev/null +++ b/sdk/lusid/models/complex_bond_all_of.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ComplexBondAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'identifiers': 'dict(str, str)', + 'calculation_type': 'str', + 'schedules': 'list[Schedule]', + 'instrument_type': 'str' + } + + attribute_map = { + 'identifiers': 'identifiers', + 'calculation_type': 'calculationType', + 'schedules': 'schedules', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'identifiers': 'optional', + 'calculation_type': 'optional', + 'schedules': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, identifiers=None, calculation_type=None, schedules=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ComplexBondAllOf - a model defined in OpenAPI" + + :param identifiers: external market codes and identifiers for the bond, e.g. ISIN. + :type identifiers: dict(str, str) + :param calculation_type: The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. + :type calculation_type: str + :param schedules: schedules. + :type schedules: list[lusid.Schedule] + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._identifiers = None + self._calculation_type = None + self._schedules = None + self._instrument_type = None + self.discriminator = None + + self.identifiers = identifiers + self.calculation_type = calculation_type + self.schedules = schedules + self.instrument_type = instrument_type + + @property + def identifiers(self): + """Gets the identifiers of this ComplexBondAllOf. # noqa: E501 + + external market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this ComplexBondAllOf. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this ComplexBondAllOf. + + external market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this ComplexBondAllOf. # noqa: E501 + :type identifiers: dict(str, str) + """ + + self._identifiers = identifiers + + @property + def calculation_type(self): + """Gets the calculation_type of this ComplexBondAllOf. # noqa: E501 + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :return: The calculation_type of this ComplexBondAllOf. # noqa: E501 + :rtype: str + """ + return self._calculation_type + + @calculation_type.setter + def calculation_type(self, calculation_type): + """Sets the calculation_type of this ComplexBondAllOf. + + The calculation type applied to the bond coupon amount. This is required for bonds that have a particular type of computing the period coupon, such as simple compounding, irregular coupons etc. The default CalculationType is `Standard`, which returns a coupon amount equal to Principal * Coupon Rate / Coupon Frequency. Coupon Frequency is 12M / Payment Frequency. Payment Frequency can be 1M, 3M, 6M, 12M etc. So Coupon Frequency can be 12, 4, 2, 1 respectively. Supported string (enumeration) values are: [Standard, DayCountCoupon, NoCalculationFloater, BrazilFixedCoupon]. # noqa: E501 + + :param calculation_type: The calculation_type of this ComplexBondAllOf. # noqa: E501 + :type calculation_type: str + """ + + self._calculation_type = calculation_type + + @property + def schedules(self): + """Gets the schedules of this ComplexBondAllOf. # noqa: E501 + + schedules. # noqa: E501 + + :return: The schedules of this ComplexBondAllOf. # noqa: E501 + :rtype: list[lusid.Schedule] + """ + return self._schedules + + @schedules.setter + def schedules(self, schedules): + """Sets the schedules of this ComplexBondAllOf. + + schedules. # noqa: E501 + + :param schedules: The schedules of this ComplexBondAllOf. # noqa: E501 + :type schedules: list[lusid.Schedule] + """ + + self._schedules = schedules + + @property + def instrument_type(self): + """Gets the instrument_type of this ComplexBondAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ComplexBondAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ComplexBondAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ComplexBondAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ComplexBondAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ComplexBondAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/complex_market_data.py b/sdk/lusid/models/complex_market_data.py index 092dbef2c1c..1eaec5bde6e 100644 --- a/sdk/lusid/models/complex_market_data.py +++ b/sdk/lusid/models/complex_market_data.py @@ -51,6 +51,19 @@ class ComplexMarketData(object): } discriminator_value_class_map = { + 'FxForwardCurveData': 'FxForwardCurveData', + 'FxForwardTenorPipsCurveData': 'FxForwardTenorPipsCurveData', + 'FxForwardTenorCurveData': 'FxForwardTenorCurveData', + 'EquityCurveByPricesData': 'EquityCurveByPricesData', + 'FxForwardPipsCurveData': 'FxForwardPipsCurveData', + 'YieldCurveData': 'YieldCurveData', + 'EquityVolSurfaceData': 'EquityVolSurfaceData', + 'OpaqueMarketData': 'OpaqueMarketData', + 'FxForwardCurveByQuoteReference': 'FxForwardCurveByQuoteReference', + 'FxVolSurfaceData': 'FxVolSurfaceData', + 'IrVolCubeData': 'IrVolCubeData', + 'CreditSpreadCurveData': 'CreditSpreadCurveData', + 'DiscountFactorCurveData': 'DiscountFactorCurveData' } def __init__(self, market_data_type=None, local_vars_configuration=None): # noqa: E501 diff --git a/sdk/lusid/models/compounding.py b/sdk/lusid/models/compounding.py new file mode 100644 index 00000000000..e4f9c6d90e1 --- /dev/null +++ b/sdk/lusid/models/compounding.py @@ -0,0 +1,271 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Compounding(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'calculation_shift_method': 'str', + 'compounding_method': 'str', + 'reset_frequency': 'str', + 'shift': 'int', + 'spread_compounding_method': 'str' + } + + attribute_map = { + 'calculation_shift_method': 'calculationShiftMethod', + 'compounding_method': 'compoundingMethod', + 'reset_frequency': 'resetFrequency', + 'shift': 'shift', + 'spread_compounding_method': 'spreadCompoundingMethod' + } + + required_map = { + 'calculation_shift_method': 'optional', + 'compounding_method': 'required', + 'reset_frequency': 'required', + 'shift': 'optional', + 'spread_compounding_method': 'required' + } + + def __init__(self, calculation_shift_method=None, compounding_method=None, reset_frequency=None, shift=None, spread_compounding_method=None, local_vars_configuration=None): # noqa: E501 + """Compounding - a model defined in OpenAPI" + + :param calculation_shift_method: Defines which resets and day counts are used for the rate calculation Supported string (enumeration) values are: [Lookback, NoShift, ObservationPeriodShift, Lockout]. + :type calculation_shift_method: str + :param compounding_method: If the interest rate is simple or compounded. Supported string (enumeration) values are: [Average, Compounded]. (required) + :type compounding_method: str + :param reset_frequency: The interest payment frequency. (required) + :type reset_frequency: str + :param shift: Defines the number of days to lockout or shift observation period by - should be a non-negative integer + :type shift: int + :param spread_compounding_method: Defines how the computed leg spread is applied to compounded rate. It applies only when CompoundingMethod = ‘Compounded‘. Supported string (enumeration) values are: [Straight, IsdaCompounding, NoCompounding, SpreadExclusive, IsdaFlatCompounding, Flat, None]. (required) + :type spread_compounding_method: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._calculation_shift_method = None + self._compounding_method = None + self._reset_frequency = None + self._shift = None + self._spread_compounding_method = None + self.discriminator = None + + self.calculation_shift_method = calculation_shift_method + self.compounding_method = compounding_method + self.reset_frequency = reset_frequency + if shift is not None: + self.shift = shift + self.spread_compounding_method = spread_compounding_method + + @property + def calculation_shift_method(self): + """Gets the calculation_shift_method of this Compounding. # noqa: E501 + + Defines which resets and day counts are used for the rate calculation Supported string (enumeration) values are: [Lookback, NoShift, ObservationPeriodShift, Lockout]. # noqa: E501 + + :return: The calculation_shift_method of this Compounding. # noqa: E501 + :rtype: str + """ + return self._calculation_shift_method + + @calculation_shift_method.setter + def calculation_shift_method(self, calculation_shift_method): + """Sets the calculation_shift_method of this Compounding. + + Defines which resets and day counts are used for the rate calculation Supported string (enumeration) values are: [Lookback, NoShift, ObservationPeriodShift, Lockout]. # noqa: E501 + + :param calculation_shift_method: The calculation_shift_method of this Compounding. # noqa: E501 + :type calculation_shift_method: str + """ + + self._calculation_shift_method = calculation_shift_method + + @property + def compounding_method(self): + """Gets the compounding_method of this Compounding. # noqa: E501 + + If the interest rate is simple or compounded. Supported string (enumeration) values are: [Average, Compounded]. # noqa: E501 + + :return: The compounding_method of this Compounding. # noqa: E501 + :rtype: str + """ + return self._compounding_method + + @compounding_method.setter + def compounding_method(self, compounding_method): + """Sets the compounding_method of this Compounding. + + If the interest rate is simple or compounded. Supported string (enumeration) values are: [Average, Compounded]. # noqa: E501 + + :param compounding_method: The compounding_method of this Compounding. # noqa: E501 + :type compounding_method: str + """ + if self.local_vars_configuration.client_side_validation and compounding_method is None: # noqa: E501 + raise ValueError("Invalid value for `compounding_method`, must not be `None`") # noqa: E501 + + self._compounding_method = compounding_method + + @property + def reset_frequency(self): + """Gets the reset_frequency of this Compounding. # noqa: E501 + + The interest payment frequency. # noqa: E501 + + :return: The reset_frequency of this Compounding. # noqa: E501 + :rtype: str + """ + return self._reset_frequency + + @reset_frequency.setter + def reset_frequency(self, reset_frequency): + """Sets the reset_frequency of this Compounding. + + The interest payment frequency. # noqa: E501 + + :param reset_frequency: The reset_frequency of this Compounding. # noqa: E501 + :type reset_frequency: str + """ + if self.local_vars_configuration.client_side_validation and reset_frequency is None: # noqa: E501 + raise ValueError("Invalid value for `reset_frequency`, must not be `None`") # noqa: E501 + + self._reset_frequency = reset_frequency + + @property + def shift(self): + """Gets the shift of this Compounding. # noqa: E501 + + Defines the number of days to lockout or shift observation period by - should be a non-negative integer # noqa: E501 + + :return: The shift of this Compounding. # noqa: E501 + :rtype: int + """ + return self._shift + + @shift.setter + def shift(self, shift): + """Sets the shift of this Compounding. + + Defines the number of days to lockout or shift observation period by - should be a non-negative integer # noqa: E501 + + :param shift: The shift of this Compounding. # noqa: E501 + :type shift: int + """ + + self._shift = shift + + @property + def spread_compounding_method(self): + """Gets the spread_compounding_method of this Compounding. # noqa: E501 + + Defines how the computed leg spread is applied to compounded rate. It applies only when CompoundingMethod = ‘Compounded‘. Supported string (enumeration) values are: [Straight, IsdaCompounding, NoCompounding, SpreadExclusive, IsdaFlatCompounding, Flat, None]. # noqa: E501 + + :return: The spread_compounding_method of this Compounding. # noqa: E501 + :rtype: str + """ + return self._spread_compounding_method + + @spread_compounding_method.setter + def spread_compounding_method(self, spread_compounding_method): + """Sets the spread_compounding_method of this Compounding. + + Defines how the computed leg spread is applied to compounded rate. It applies only when CompoundingMethod = ‘Compounded‘. Supported string (enumeration) values are: [Straight, IsdaCompounding, NoCompounding, SpreadExclusive, IsdaFlatCompounding, Flat, None]. # noqa: E501 + + :param spread_compounding_method: The spread_compounding_method of this Compounding. # noqa: E501 + :type spread_compounding_method: str + """ + if self.local_vars_configuration.client_side_validation and spread_compounding_method is None: # noqa: E501 + raise ValueError("Invalid value for `spread_compounding_method`, must not be `None`") # noqa: E501 + + self._spread_compounding_method = spread_compounding_method + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Compounding): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Compounding): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/contract_for_difference.py b/sdk/lusid/models/contract_for_difference.py new file mode 100644 index 00000000000..ea5e9725211 --- /dev/null +++ b/sdk/lusid/models/contract_for_difference.py @@ -0,0 +1,438 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ContractForDifference(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'code': 'str', + 'contract_size': 'float', + 'pay_ccy': 'str', + 'reference_rate': 'float', + 'type': 'str', + 'underlying_ccy': 'str', + 'underlying_identifier': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'code': 'code', + 'contract_size': 'contractSize', + 'pay_ccy': 'payCcy', + 'reference_rate': 'referenceRate', + 'type': 'type', + 'underlying_ccy': 'underlyingCcy', + 'underlying_identifier': 'underlyingIdentifier', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'optional', + 'code': 'required', + 'contract_size': 'required', + 'pay_ccy': 'required', + 'reference_rate': 'optional', + 'type': 'required', + 'underlying_ccy': 'required', + 'underlying_identifier': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, code=None, contract_size=None, pay_ccy=None, reference_rate=None, type=None, underlying_ccy=None, underlying_identifier=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ContractForDifference - a model defined in OpenAPI" + + :param start_date: The start date of the CFD. (required) + :type start_date: datetime + :param maturity_date: The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. + :type maturity_date: datetime + :param code: The code of the underlying. (required) + :type code: str + :param contract_size: The size of the CFD contract, this should represent the total number of stocks that the CFD represents. (required) + :type contract_size: float + :param pay_ccy: The currency that this CFD pays out, this can be different to the UnderlyingCcy. (required) + :type pay_ccy: str + :param reference_rate: The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. + :type reference_rate: float + :param type: The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. (required) + :type type: str + :param underlying_ccy: The currency of the underlying (required) + :type underlying_ccy: str + :param underlying_identifier: external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. (required) + :type underlying_identifier: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._code = None + self._contract_size = None + self._pay_ccy = None + self._reference_rate = None + self._type = None + self._underlying_ccy = None + self._underlying_identifier = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + if maturity_date is not None: + self.maturity_date = maturity_date + self.code = code + self.contract_size = contract_size + self.pay_ccy = pay_ccy + if reference_rate is not None: + self.reference_rate = reference_rate + self.type = type + self.underlying_ccy = underlying_ccy + self.underlying_identifier = underlying_identifier + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this ContractForDifference. # noqa: E501 + + The start date of the CFD. # noqa: E501 + + :return: The start_date of this ContractForDifference. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this ContractForDifference. + + The start date of the CFD. # noqa: E501 + + :param start_date: The start_date of this ContractForDifference. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this ContractForDifference. # noqa: E501 + + The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. # noqa: E501 + + :return: The maturity_date of this ContractForDifference. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this ContractForDifference. + + The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. # noqa: E501 + + :param maturity_date: The maturity_date of this ContractForDifference. # noqa: E501 + :type maturity_date: datetime + """ + + self._maturity_date = maturity_date + + @property + def code(self): + """Gets the code of this ContractForDifference. # noqa: E501 + + The code of the underlying. # noqa: E501 + + :return: The code of this ContractForDifference. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ContractForDifference. + + The code of the underlying. # noqa: E501 + + :param code: The code of this ContractForDifference. # noqa: E501 + :type code: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def contract_size(self): + """Gets the contract_size of this ContractForDifference. # noqa: E501 + + The size of the CFD contract, this should represent the total number of stocks that the CFD represents. # noqa: E501 + + :return: The contract_size of this ContractForDifference. # noqa: E501 + :rtype: float + """ + return self._contract_size + + @contract_size.setter + def contract_size(self, contract_size): + """Sets the contract_size of this ContractForDifference. + + The size of the CFD contract, this should represent the total number of stocks that the CFD represents. # noqa: E501 + + :param contract_size: The contract_size of this ContractForDifference. # noqa: E501 + :type contract_size: float + """ + if self.local_vars_configuration.client_side_validation and contract_size is None: # noqa: E501 + raise ValueError("Invalid value for `contract_size`, must not be `None`") # noqa: E501 + + self._contract_size = contract_size + + @property + def pay_ccy(self): + """Gets the pay_ccy of this ContractForDifference. # noqa: E501 + + The currency that this CFD pays out, this can be different to the UnderlyingCcy. # noqa: E501 + + :return: The pay_ccy of this ContractForDifference. # noqa: E501 + :rtype: str + """ + return self._pay_ccy + + @pay_ccy.setter + def pay_ccy(self, pay_ccy): + """Sets the pay_ccy of this ContractForDifference. + + The currency that this CFD pays out, this can be different to the UnderlyingCcy. # noqa: E501 + + :param pay_ccy: The pay_ccy of this ContractForDifference. # noqa: E501 + :type pay_ccy: str + """ + if self.local_vars_configuration.client_side_validation and pay_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `pay_ccy`, must not be `None`") # noqa: E501 + + self._pay_ccy = pay_ccy + + @property + def reference_rate(self): + """Gets the reference_rate of this ContractForDifference. # noqa: E501 + + The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. # noqa: E501 + + :return: The reference_rate of this ContractForDifference. # noqa: E501 + :rtype: float + """ + return self._reference_rate + + @reference_rate.setter + def reference_rate(self, reference_rate): + """Sets the reference_rate of this ContractForDifference. + + The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. # noqa: E501 + + :param reference_rate: The reference_rate of this ContractForDifference. # noqa: E501 + :type reference_rate: float + """ + + self._reference_rate = reference_rate + + @property + def type(self): + """Gets the type of this ContractForDifference. # noqa: E501 + + The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. # noqa: E501 + + :return: The type of this ContractForDifference. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ContractForDifference. + + The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. # noqa: E501 + + :param type: The type of this ContractForDifference. # noqa: E501 + :type type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def underlying_ccy(self): + """Gets the underlying_ccy of this ContractForDifference. # noqa: E501 + + The currency of the underlying # noqa: E501 + + :return: The underlying_ccy of this ContractForDifference. # noqa: E501 + :rtype: str + """ + return self._underlying_ccy + + @underlying_ccy.setter + def underlying_ccy(self, underlying_ccy): + """Sets the underlying_ccy of this ContractForDifference. + + The currency of the underlying # noqa: E501 + + :param underlying_ccy: The underlying_ccy of this ContractForDifference. # noqa: E501 + :type underlying_ccy: str + """ + if self.local_vars_configuration.client_side_validation and underlying_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_ccy`, must not be `None`") # noqa: E501 + + self._underlying_ccy = underlying_ccy + + @property + def underlying_identifier(self): + """Gets the underlying_identifier of this ContractForDifference. # noqa: E501 + + external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :return: The underlying_identifier of this ContractForDifference. # noqa: E501 + :rtype: str + """ + return self._underlying_identifier + + @underlying_identifier.setter + def underlying_identifier(self, underlying_identifier): + """Sets the underlying_identifier of this ContractForDifference. + + external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :param underlying_identifier: The underlying_identifier of this ContractForDifference. # noqa: E501 + :type underlying_identifier: str + """ + if self.local_vars_configuration.client_side_validation and underlying_identifier is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_identifier`, must not be `None`") # noqa: E501 + + self._underlying_identifier = underlying_identifier + + @property + def instrument_type(self): + """Gets the instrument_type of this ContractForDifference. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ContractForDifference. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ContractForDifference. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ContractForDifference. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContractForDifference): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContractForDifference): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/contract_for_difference_all_of.py b/sdk/lusid/models/contract_for_difference_all_of.py new file mode 100644 index 00000000000..ba0ab858ca7 --- /dev/null +++ b/sdk/lusid/models/contract_for_difference_all_of.py @@ -0,0 +1,438 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ContractForDifferenceAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'code': 'str', + 'contract_size': 'float', + 'pay_ccy': 'str', + 'reference_rate': 'float', + 'type': 'str', + 'underlying_ccy': 'str', + 'underlying_identifier': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'code': 'code', + 'contract_size': 'contractSize', + 'pay_ccy': 'payCcy', + 'reference_rate': 'referenceRate', + 'type': 'type', + 'underlying_ccy': 'underlyingCcy', + 'underlying_identifier': 'underlyingIdentifier', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'optional', + 'code': 'required', + 'contract_size': 'required', + 'pay_ccy': 'required', + 'reference_rate': 'optional', + 'type': 'required', + 'underlying_ccy': 'required', + 'underlying_identifier': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, code=None, contract_size=None, pay_ccy=None, reference_rate=None, type=None, underlying_ccy=None, underlying_identifier=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ContractForDifferenceAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the CFD. (required) + :type start_date: datetime + :param maturity_date: The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. + :type maturity_date: datetime + :param code: The code of the underlying. (required) + :type code: str + :param contract_size: The size of the CFD contract, this should represent the total number of stocks that the CFD represents. (required) + :type contract_size: float + :param pay_ccy: The currency that this CFD pays out, this can be different to the UnderlyingCcy. (required) + :type pay_ccy: str + :param reference_rate: The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. + :type reference_rate: float + :param type: The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. (required) + :type type: str + :param underlying_ccy: The currency of the underlying (required) + :type underlying_ccy: str + :param underlying_identifier: external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. (required) + :type underlying_identifier: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._code = None + self._contract_size = None + self._pay_ccy = None + self._reference_rate = None + self._type = None + self._underlying_ccy = None + self._underlying_identifier = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + if maturity_date is not None: + self.maturity_date = maturity_date + self.code = code + self.contract_size = contract_size + self.pay_ccy = pay_ccy + if reference_rate is not None: + self.reference_rate = reference_rate + self.type = type + self.underlying_ccy = underlying_ccy + self.underlying_identifier = underlying_identifier + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this ContractForDifferenceAllOf. # noqa: E501 + + The start date of the CFD. # noqa: E501 + + :return: The start_date of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this ContractForDifferenceAllOf. + + The start date of the CFD. # noqa: E501 + + :param start_date: The start_date of this ContractForDifferenceAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this ContractForDifferenceAllOf. # noqa: E501 + + The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. # noqa: E501 + + :return: The maturity_date of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this ContractForDifferenceAllOf. + + The maturity date for the CFD. If CFDType is Futures, this should be set to be the maturity date of the underlying future. If CFDType is Cash, this should not be set. # noqa: E501 + + :param maturity_date: The maturity_date of this ContractForDifferenceAllOf. # noqa: E501 + :type maturity_date: datetime + """ + + self._maturity_date = maturity_date + + @property + def code(self): + """Gets the code of this ContractForDifferenceAllOf. # noqa: E501 + + The code of the underlying. # noqa: E501 + + :return: The code of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ContractForDifferenceAllOf. + + The code of the underlying. # noqa: E501 + + :param code: The code of this ContractForDifferenceAllOf. # noqa: E501 + :type code: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def contract_size(self): + """Gets the contract_size of this ContractForDifferenceAllOf. # noqa: E501 + + The size of the CFD contract, this should represent the total number of stocks that the CFD represents. # noqa: E501 + + :return: The contract_size of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: float + """ + return self._contract_size + + @contract_size.setter + def contract_size(self, contract_size): + """Sets the contract_size of this ContractForDifferenceAllOf. + + The size of the CFD contract, this should represent the total number of stocks that the CFD represents. # noqa: E501 + + :param contract_size: The contract_size of this ContractForDifferenceAllOf. # noqa: E501 + :type contract_size: float + """ + if self.local_vars_configuration.client_side_validation and contract_size is None: # noqa: E501 + raise ValueError("Invalid value for `contract_size`, must not be `None`") # noqa: E501 + + self._contract_size = contract_size + + @property + def pay_ccy(self): + """Gets the pay_ccy of this ContractForDifferenceAllOf. # noqa: E501 + + The currency that this CFD pays out, this can be different to the UnderlyingCcy. # noqa: E501 + + :return: The pay_ccy of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._pay_ccy + + @pay_ccy.setter + def pay_ccy(self, pay_ccy): + """Sets the pay_ccy of this ContractForDifferenceAllOf. + + The currency that this CFD pays out, this can be different to the UnderlyingCcy. # noqa: E501 + + :param pay_ccy: The pay_ccy of this ContractForDifferenceAllOf. # noqa: E501 + :type pay_ccy: str + """ + if self.local_vars_configuration.client_side_validation and pay_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `pay_ccy`, must not be `None`") # noqa: E501 + + self._pay_ccy = pay_ccy + + @property + def reference_rate(self): + """Gets the reference_rate of this ContractForDifferenceAllOf. # noqa: E501 + + The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. # noqa: E501 + + :return: The reference_rate of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: float + """ + return self._reference_rate + + @reference_rate.setter + def reference_rate(self, reference_rate): + """Sets the reference_rate of this ContractForDifferenceAllOf. + + The reference rate of the CFD, this can be set to 0 but not negative values. This field is optional, if not set it will default to 0. # noqa: E501 + + :param reference_rate: The reference_rate of this ContractForDifferenceAllOf. # noqa: E501 + :type reference_rate: float + """ + + self._reference_rate = reference_rate + + @property + def type(self): + """Gets the type of this ContractForDifferenceAllOf. # noqa: E501 + + The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. # noqa: E501 + + :return: The type of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ContractForDifferenceAllOf. + + The type of CFD. Supported string (enumeration) values are: [Cash, Futures]. # noqa: E501 + + :param type: The type of this ContractForDifferenceAllOf. # noqa: E501 + :type type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def underlying_ccy(self): + """Gets the underlying_ccy of this ContractForDifferenceAllOf. # noqa: E501 + + The currency of the underlying # noqa: E501 + + :return: The underlying_ccy of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._underlying_ccy + + @underlying_ccy.setter + def underlying_ccy(self, underlying_ccy): + """Sets the underlying_ccy of this ContractForDifferenceAllOf. + + The currency of the underlying # noqa: E501 + + :param underlying_ccy: The underlying_ccy of this ContractForDifferenceAllOf. # noqa: E501 + :type underlying_ccy: str + """ + if self.local_vars_configuration.client_side_validation and underlying_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_ccy`, must not be `None`") # noqa: E501 + + self._underlying_ccy = underlying_ccy + + @property + def underlying_identifier(self): + """Gets the underlying_identifier of this ContractForDifferenceAllOf. # noqa: E501 + + external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :return: The underlying_identifier of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._underlying_identifier + + @underlying_identifier.setter + def underlying_identifier(self, underlying_identifier): + """Sets the underlying_identifier of this ContractForDifferenceAllOf. + + external market codes and identifiers for the CFD, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :param underlying_identifier: The underlying_identifier of this ContractForDifferenceAllOf. # noqa: E501 + :type underlying_identifier: str + """ + if self.local_vars_configuration.client_side_validation and underlying_identifier is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_identifier`, must not be `None`") # noqa: E501 + + self._underlying_identifier = underlying_identifier + + @property + def instrument_type(self): + """Gets the instrument_type of this ContractForDifferenceAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ContractForDifferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ContractForDifferenceAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ContractForDifferenceAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContractForDifferenceAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContractForDifferenceAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/credit_default_swap.py b/sdk/lusid/models/credit_default_swap.py new file mode 100644 index 00000000000..76fc67b9783 --- /dev/null +++ b/sdk/lusid/models/credit_default_swap.py @@ -0,0 +1,398 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CreditDefaultSwap(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'ticker': 'str', + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'flow_conventions': 'CdsFlowConventions', + 'coupon_rate': 'float', + 'convention_name': 'FlowConventionName', + 'notional': 'float', + 'protection_detail_specification': 'CdsProtectionDetailSpecification', + 'instrument_type': 'str' + } + + attribute_map = { + 'ticker': 'ticker', + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'flow_conventions': 'flowConventions', + 'coupon_rate': 'couponRate', + 'convention_name': 'conventionName', + 'notional': 'notional', + 'protection_detail_specification': 'protectionDetailSpecification', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'ticker': 'required', + 'start_date': 'required', + 'maturity_date': 'required', + 'flow_conventions': 'optional', + 'coupon_rate': 'required', + 'convention_name': 'optional', + 'notional': 'optional', + 'protection_detail_specification': 'required', + 'instrument_type': 'required' + } + + def __init__(self, ticker=None, start_date=None, maturity_date=None, flow_conventions=None, coupon_rate=None, convention_name=None, notional=None, protection_detail_specification=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CreditDefaultSwap - a model defined in OpenAPI" + + :param ticker: A ticker to uniquely specify then entity against which the cds is written. (required) + :type ticker: str + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param flow_conventions: + :type flow_conventions: lusid.CdsFlowConventions + :param coupon_rate: The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. (required) + :type coupon_rate: float + :param convention_name: + :type convention_name: lusid.FlowConventionName + :param notional: The notional protected by the Credit Default Swap + :type notional: float + :param protection_detail_specification: (required) + :type protection_detail_specification: lusid.CdsProtectionDetailSpecification + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._ticker = None + self._start_date = None + self._maturity_date = None + self._flow_conventions = None + self._coupon_rate = None + self._convention_name = None + self._notional = None + self._protection_detail_specification = None + self._instrument_type = None + self.discriminator = None + + self.ticker = ticker + self.start_date = start_date + self.maturity_date = maturity_date + if flow_conventions is not None: + self.flow_conventions = flow_conventions + self.coupon_rate = coupon_rate + if convention_name is not None: + self.convention_name = convention_name + self.notional = notional + self.protection_detail_specification = protection_detail_specification + self.instrument_type = instrument_type + + @property + def ticker(self): + """Gets the ticker of this CreditDefaultSwap. # noqa: E501 + + A ticker to uniquely specify then entity against which the cds is written. # noqa: E501 + + :return: The ticker of this CreditDefaultSwap. # noqa: E501 + :rtype: str + """ + return self._ticker + + @ticker.setter + def ticker(self, ticker): + """Sets the ticker of this CreditDefaultSwap. + + A ticker to uniquely specify then entity against which the cds is written. # noqa: E501 + + :param ticker: The ticker of this CreditDefaultSwap. # noqa: E501 + :type ticker: str + """ + if self.local_vars_configuration.client_side_validation and ticker is None: # noqa: E501 + raise ValueError("Invalid value for `ticker`, must not be `None`") # noqa: E501 + + self._ticker = ticker + + @property + def start_date(self): + """Gets the start_date of this CreditDefaultSwap. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this CreditDefaultSwap. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this CreditDefaultSwap. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this CreditDefaultSwap. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this CreditDefaultSwap. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this CreditDefaultSwap. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this CreditDefaultSwap. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this CreditDefaultSwap. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def flow_conventions(self): + """Gets the flow_conventions of this CreditDefaultSwap. # noqa: E501 + + + :return: The flow_conventions of this CreditDefaultSwap. # noqa: E501 + :rtype: lusid.CdsFlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this CreditDefaultSwap. + + + :param flow_conventions: The flow_conventions of this CreditDefaultSwap. # noqa: E501 + :type flow_conventions: lusid.CdsFlowConventions + """ + + self._flow_conventions = flow_conventions + + @property + def coupon_rate(self): + """Gets the coupon_rate of this CreditDefaultSwap. # noqa: E501 + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :return: The coupon_rate of this CreditDefaultSwap. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this CreditDefaultSwap. + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :param coupon_rate: The coupon_rate of this CreditDefaultSwap. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def convention_name(self): + """Gets the convention_name of this CreditDefaultSwap. # noqa: E501 + + + :return: The convention_name of this CreditDefaultSwap. # noqa: E501 + :rtype: lusid.FlowConventionName + """ + return self._convention_name + + @convention_name.setter + def convention_name(self, convention_name): + """Sets the convention_name of this CreditDefaultSwap. + + + :param convention_name: The convention_name of this CreditDefaultSwap. # noqa: E501 + :type convention_name: lusid.FlowConventionName + """ + + self._convention_name = convention_name + + @property + def notional(self): + """Gets the notional of this CreditDefaultSwap. # noqa: E501 + + The notional protected by the Credit Default Swap # noqa: E501 + + :return: The notional of this CreditDefaultSwap. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this CreditDefaultSwap. + + The notional protected by the Credit Default Swap # noqa: E501 + + :param notional: The notional of this CreditDefaultSwap. # noqa: E501 + :type notional: float + """ + + self._notional = notional + + @property + def protection_detail_specification(self): + """Gets the protection_detail_specification of this CreditDefaultSwap. # noqa: E501 + + + :return: The protection_detail_specification of this CreditDefaultSwap. # noqa: E501 + :rtype: lusid.CdsProtectionDetailSpecification + """ + return self._protection_detail_specification + + @protection_detail_specification.setter + def protection_detail_specification(self, protection_detail_specification): + """Sets the protection_detail_specification of this CreditDefaultSwap. + + + :param protection_detail_specification: The protection_detail_specification of this CreditDefaultSwap. # noqa: E501 + :type protection_detail_specification: lusid.CdsProtectionDetailSpecification + """ + if self.local_vars_configuration.client_side_validation and protection_detail_specification is None: # noqa: E501 + raise ValueError("Invalid value for `protection_detail_specification`, must not be `None`") # noqa: E501 + + self._protection_detail_specification = protection_detail_specification + + @property + def instrument_type(self): + """Gets the instrument_type of this CreditDefaultSwap. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CreditDefaultSwap. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CreditDefaultSwap. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CreditDefaultSwap. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreditDefaultSwap): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreditDefaultSwap): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/credit_default_swap_all_of.py b/sdk/lusid/models/credit_default_swap_all_of.py new file mode 100644 index 00000000000..23a755059d4 --- /dev/null +++ b/sdk/lusid/models/credit_default_swap_all_of.py @@ -0,0 +1,398 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CreditDefaultSwapAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'ticker': 'str', + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'flow_conventions': 'CdsFlowConventions', + 'coupon_rate': 'float', + 'convention_name': 'FlowConventionName', + 'notional': 'float', + 'protection_detail_specification': 'CdsProtectionDetailSpecification', + 'instrument_type': 'str' + } + + attribute_map = { + 'ticker': 'ticker', + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'flow_conventions': 'flowConventions', + 'coupon_rate': 'couponRate', + 'convention_name': 'conventionName', + 'notional': 'notional', + 'protection_detail_specification': 'protectionDetailSpecification', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'ticker': 'required', + 'start_date': 'required', + 'maturity_date': 'required', + 'flow_conventions': 'optional', + 'coupon_rate': 'required', + 'convention_name': 'optional', + 'notional': 'optional', + 'protection_detail_specification': 'required', + 'instrument_type': 'required' + } + + def __init__(self, ticker=None, start_date=None, maturity_date=None, flow_conventions=None, coupon_rate=None, convention_name=None, notional=None, protection_detail_specification=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """CreditDefaultSwapAllOf - a model defined in OpenAPI" + + :param ticker: A ticker to uniquely specify then entity against which the cds is written. (required) + :type ticker: str + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param flow_conventions: + :type flow_conventions: lusid.CdsFlowConventions + :param coupon_rate: The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. (required) + :type coupon_rate: float + :param convention_name: + :type convention_name: lusid.FlowConventionName + :param notional: The notional protected by the Credit Default Swap + :type notional: float + :param protection_detail_specification: (required) + :type protection_detail_specification: lusid.CdsProtectionDetailSpecification + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._ticker = None + self._start_date = None + self._maturity_date = None + self._flow_conventions = None + self._coupon_rate = None + self._convention_name = None + self._notional = None + self._protection_detail_specification = None + self._instrument_type = None + self.discriminator = None + + self.ticker = ticker + self.start_date = start_date + self.maturity_date = maturity_date + if flow_conventions is not None: + self.flow_conventions = flow_conventions + self.coupon_rate = coupon_rate + if convention_name is not None: + self.convention_name = convention_name + self.notional = notional + self.protection_detail_specification = protection_detail_specification + self.instrument_type = instrument_type + + @property + def ticker(self): + """Gets the ticker of this CreditDefaultSwapAllOf. # noqa: E501 + + A ticker to uniquely specify then entity against which the cds is written. # noqa: E501 + + :return: The ticker of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: str + """ + return self._ticker + + @ticker.setter + def ticker(self, ticker): + """Sets the ticker of this CreditDefaultSwapAllOf. + + A ticker to uniquely specify then entity against which the cds is written. # noqa: E501 + + :param ticker: The ticker of this CreditDefaultSwapAllOf. # noqa: E501 + :type ticker: str + """ + if self.local_vars_configuration.client_side_validation and ticker is None: # noqa: E501 + raise ValueError("Invalid value for `ticker`, must not be `None`") # noqa: E501 + + self._ticker = ticker + + @property + def start_date(self): + """Gets the start_date of this CreditDefaultSwapAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this CreditDefaultSwapAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this CreditDefaultSwapAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this CreditDefaultSwapAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this CreditDefaultSwapAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this CreditDefaultSwapAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def flow_conventions(self): + """Gets the flow_conventions of this CreditDefaultSwapAllOf. # noqa: E501 + + + :return: The flow_conventions of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: lusid.CdsFlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this CreditDefaultSwapAllOf. + + + :param flow_conventions: The flow_conventions of this CreditDefaultSwapAllOf. # noqa: E501 + :type flow_conventions: lusid.CdsFlowConventions + """ + + self._flow_conventions = flow_conventions + + @property + def coupon_rate(self): + """Gets the coupon_rate of this CreditDefaultSwapAllOf. # noqa: E501 + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :return: The coupon_rate of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this CreditDefaultSwapAllOf. + + The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. # noqa: E501 + + :param coupon_rate: The coupon_rate of this CreditDefaultSwapAllOf. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def convention_name(self): + """Gets the convention_name of this CreditDefaultSwapAllOf. # noqa: E501 + + + :return: The convention_name of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: lusid.FlowConventionName + """ + return self._convention_name + + @convention_name.setter + def convention_name(self, convention_name): + """Sets the convention_name of this CreditDefaultSwapAllOf. + + + :param convention_name: The convention_name of this CreditDefaultSwapAllOf. # noqa: E501 + :type convention_name: lusid.FlowConventionName + """ + + self._convention_name = convention_name + + @property + def notional(self): + """Gets the notional of this CreditDefaultSwapAllOf. # noqa: E501 + + The notional protected by the Credit Default Swap # noqa: E501 + + :return: The notional of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this CreditDefaultSwapAllOf. + + The notional protected by the Credit Default Swap # noqa: E501 + + :param notional: The notional of this CreditDefaultSwapAllOf. # noqa: E501 + :type notional: float + """ + + self._notional = notional + + @property + def protection_detail_specification(self): + """Gets the protection_detail_specification of this CreditDefaultSwapAllOf. # noqa: E501 + + + :return: The protection_detail_specification of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: lusid.CdsProtectionDetailSpecification + """ + return self._protection_detail_specification + + @protection_detail_specification.setter + def protection_detail_specification(self, protection_detail_specification): + """Sets the protection_detail_specification of this CreditDefaultSwapAllOf. + + + :param protection_detail_specification: The protection_detail_specification of this CreditDefaultSwapAllOf. # noqa: E501 + :type protection_detail_specification: lusid.CdsProtectionDetailSpecification + """ + if self.local_vars_configuration.client_side_validation and protection_detail_specification is None: # noqa: E501 + raise ValueError("Invalid value for `protection_detail_specification`, must not be `None`") # noqa: E501 + + self._protection_detail_specification = protection_detail_specification + + @property + def instrument_type(self): + """Gets the instrument_type of this CreditDefaultSwapAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this CreditDefaultSwapAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this CreditDefaultSwapAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this CreditDefaultSwapAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreditDefaultSwapAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreditDefaultSwapAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/credit_spread_curve_data.py b/sdk/lusid/models/credit_spread_curve_data.py new file mode 100644 index 00000000000..9e8736476fe --- /dev/null +++ b/sdk/lusid/models/credit_spread_curve_data.py @@ -0,0 +1,408 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CreditSpreadCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'tenors': 'list[str]', + 'spreads': 'list[float]', + 'recovery_rate': 'float', + 'reference_date': 'datetime', + 'maturities': 'list[datetime]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'tenors': 'tenors', + 'spreads': 'spreads', + 'recovery_rate': 'recoveryRate', + 'reference_date': 'referenceDate', + 'maturities': 'maturities', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'tenors': 'required', + 'spreads': 'required', + 'recovery_rate': 'required', + 'reference_date': 'optional', + 'maturities': 'optional', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, tenors=None, spreads=None, recovery_rate=None, reference_date=None, maturities=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """CreditSpreadCurveData - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the curve (required) + :type dom_ccy: str + :param tenors: The tenors for which the rates apply (required) + :type tenors: list[str] + :param spreads: Par spread quotes corresponding to the tenors. (required) + :type spreads: list[float] + :param recovery_rate: The recovery rate in default. (required) + :type recovery_rate: float + :param reference_date: If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. + :type reference_date: datetime + :param maturities: The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. + :type maturities: list[datetime] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._tenors = None + self._spreads = None + self._recovery_rate = None + self._reference_date = None + self._maturities = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.tenors = tenors + self.spreads = spreads + self.recovery_rate = recovery_rate + self.reference_date = reference_date + self.maturities = maturities + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this CreditSpreadCurveData. # noqa: E501 + + EffectiveAt date of the quoted rates # noqa: E501 + + :return: The base_date of this CreditSpreadCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this CreditSpreadCurveData. + + EffectiveAt date of the quoted rates # noqa: E501 + + :param base_date: The base_date of this CreditSpreadCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this CreditSpreadCurveData. # noqa: E501 + + Domestic currency of the curve # noqa: E501 + + :return: The dom_ccy of this CreditSpreadCurveData. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this CreditSpreadCurveData. + + Domestic currency of the curve # noqa: E501 + + :param dom_ccy: The dom_ccy of this CreditSpreadCurveData. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def tenors(self): + """Gets the tenors of this CreditSpreadCurveData. # noqa: E501 + + The tenors for which the rates apply # noqa: E501 + + :return: The tenors of this CreditSpreadCurveData. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this CreditSpreadCurveData. + + The tenors for which the rates apply # noqa: E501 + + :param tenors: The tenors of this CreditSpreadCurveData. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def spreads(self): + """Gets the spreads of this CreditSpreadCurveData. # noqa: E501 + + Par spread quotes corresponding to the tenors. # noqa: E501 + + :return: The spreads of this CreditSpreadCurveData. # noqa: E501 + :rtype: list[float] + """ + return self._spreads + + @spreads.setter + def spreads(self, spreads): + """Sets the spreads of this CreditSpreadCurveData. + + Par spread quotes corresponding to the tenors. # noqa: E501 + + :param spreads: The spreads of this CreditSpreadCurveData. # noqa: E501 + :type spreads: list[float] + """ + if self.local_vars_configuration.client_side_validation and spreads is None: # noqa: E501 + raise ValueError("Invalid value for `spreads`, must not be `None`") # noqa: E501 + + self._spreads = spreads + + @property + def recovery_rate(self): + """Gets the recovery_rate of this CreditSpreadCurveData. # noqa: E501 + + The recovery rate in default. # noqa: E501 + + :return: The recovery_rate of this CreditSpreadCurveData. # noqa: E501 + :rtype: float + """ + return self._recovery_rate + + @recovery_rate.setter + def recovery_rate(self, recovery_rate): + """Sets the recovery_rate of this CreditSpreadCurveData. + + The recovery rate in default. # noqa: E501 + + :param recovery_rate: The recovery_rate of this CreditSpreadCurveData. # noqa: E501 + :type recovery_rate: float + """ + if self.local_vars_configuration.client_side_validation and recovery_rate is None: # noqa: E501 + raise ValueError("Invalid value for `recovery_rate`, must not be `None`") # noqa: E501 + + self._recovery_rate = recovery_rate + + @property + def reference_date(self): + """Gets the reference_date of this CreditSpreadCurveData. # noqa: E501 + + If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. # noqa: E501 + + :return: The reference_date of this CreditSpreadCurveData. # noqa: E501 + :rtype: datetime + """ + return self._reference_date + + @reference_date.setter + def reference_date(self, reference_date): + """Sets the reference_date of this CreditSpreadCurveData. + + If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. # noqa: E501 + + :param reference_date: The reference_date of this CreditSpreadCurveData. # noqa: E501 + :type reference_date: datetime + """ + + self._reference_date = reference_date + + @property + def maturities(self): + """Gets the maturities of this CreditSpreadCurveData. # noqa: E501 + + The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. # noqa: E501 + + :return: The maturities of this CreditSpreadCurveData. # noqa: E501 + :rtype: list[datetime] + """ + return self._maturities + + @maturities.setter + def maturities(self, maturities): + """Sets the maturities of this CreditSpreadCurveData. + + The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. # noqa: E501 + + :param maturities: The maturities of this CreditSpreadCurveData. # noqa: E501 + :type maturities: list[datetime] + """ + + self._maturities = maturities + + @property + def lineage(self): + """Gets the lineage of this CreditSpreadCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this CreditSpreadCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this CreditSpreadCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this CreditSpreadCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this CreditSpreadCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this CreditSpreadCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this CreditSpreadCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this CreditSpreadCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreditSpreadCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreditSpreadCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/credit_spread_curve_data_all_of.py b/sdk/lusid/models/credit_spread_curve_data_all_of.py new file mode 100644 index 00000000000..373178a1c27 --- /dev/null +++ b/sdk/lusid/models/credit_spread_curve_data_all_of.py @@ -0,0 +1,408 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class CreditSpreadCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'tenors': 'list[str]', + 'spreads': 'list[float]', + 'recovery_rate': 'float', + 'reference_date': 'datetime', + 'maturities': 'list[datetime]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'tenors': 'tenors', + 'spreads': 'spreads', + 'recovery_rate': 'recoveryRate', + 'reference_date': 'referenceDate', + 'maturities': 'maturities', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'tenors': 'required', + 'spreads': 'required', + 'recovery_rate': 'required', + 'reference_date': 'optional', + 'maturities': 'optional', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, tenors=None, spreads=None, recovery_rate=None, reference_date=None, maturities=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """CreditSpreadCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the curve (required) + :type dom_ccy: str + :param tenors: The tenors for which the rates apply (required) + :type tenors: list[str] + :param spreads: Par spread quotes corresponding to the tenors. (required) + :type spreads: list[float] + :param recovery_rate: The recovery rate in default. (required) + :type recovery_rate: float + :param reference_date: If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. + :type reference_date: datetime + :param maturities: The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. + :type maturities: list[datetime] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._tenors = None + self._spreads = None + self._recovery_rate = None + self._reference_date = None + self._maturities = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.tenors = tenors + self.spreads = spreads + self.recovery_rate = recovery_rate + self.reference_date = reference_date + self.maturities = maturities + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this CreditSpreadCurveDataAllOf. # noqa: E501 + + EffectiveAt date of the quoted rates # noqa: E501 + + :return: The base_date of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this CreditSpreadCurveDataAllOf. + + EffectiveAt date of the quoted rates # noqa: E501 + + :param base_date: The base_date of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this CreditSpreadCurveDataAllOf. # noqa: E501 + + Domestic currency of the curve # noqa: E501 + + :return: The dom_ccy of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this CreditSpreadCurveDataAllOf. + + Domestic currency of the curve # noqa: E501 + + :param dom_ccy: The dom_ccy of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def tenors(self): + """Gets the tenors of this CreditSpreadCurveDataAllOf. # noqa: E501 + + The tenors for which the rates apply # noqa: E501 + + :return: The tenors of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this CreditSpreadCurveDataAllOf. + + The tenors for which the rates apply # noqa: E501 + + :param tenors: The tenors of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def spreads(self): + """Gets the spreads of this CreditSpreadCurveDataAllOf. # noqa: E501 + + Par spread quotes corresponding to the tenors. # noqa: E501 + + :return: The spreads of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._spreads + + @spreads.setter + def spreads(self, spreads): + """Sets the spreads of this CreditSpreadCurveDataAllOf. + + Par spread quotes corresponding to the tenors. # noqa: E501 + + :param spreads: The spreads of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type spreads: list[float] + """ + if self.local_vars_configuration.client_side_validation and spreads is None: # noqa: E501 + raise ValueError("Invalid value for `spreads`, must not be `None`") # noqa: E501 + + self._spreads = spreads + + @property + def recovery_rate(self): + """Gets the recovery_rate of this CreditSpreadCurveDataAllOf. # noqa: E501 + + The recovery rate in default. # noqa: E501 + + :return: The recovery_rate of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: float + """ + return self._recovery_rate + + @recovery_rate.setter + def recovery_rate(self, recovery_rate): + """Sets the recovery_rate of this CreditSpreadCurveDataAllOf. + + The recovery rate in default. # noqa: E501 + + :param recovery_rate: The recovery_rate of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type recovery_rate: float + """ + if self.local_vars_configuration.client_side_validation and recovery_rate is None: # noqa: E501 + raise ValueError("Invalid value for `recovery_rate`, must not be `None`") # noqa: E501 + + self._recovery_rate = recovery_rate + + @property + def reference_date(self): + """Gets the reference_date of this CreditSpreadCurveDataAllOf. # noqa: E501 + + If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. # noqa: E501 + + :return: The reference_date of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._reference_date + + @reference_date.setter + def reference_date(self, reference_date): + """Sets the reference_date of this CreditSpreadCurveDataAllOf. + + If tenors are provided, this is the date against which the tenors will be resolved. This is of importance to CDX spread quotes, which are usually quoted in tenors relative to the CDX start date. In this case, the ReferenceDate would be equal to the CDX start date, and the BaseDate would be the date for which the spreads are valid. If not provided, this defaults to the BaseDate of the curve. # noqa: E501 + + :param reference_date: The reference_date of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type reference_date: datetime + """ + + self._reference_date = reference_date + + @property + def maturities(self): + """Gets the maturities of this CreditSpreadCurveDataAllOf. # noqa: E501 + + The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. # noqa: E501 + + :return: The maturities of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: list[datetime] + """ + return self._maturities + + @maturities.setter + def maturities(self, maturities): + """Sets the maturities of this CreditSpreadCurveDataAllOf. + + The maturity dates for which the rates apply. Either tenors or maturities should be provided, not both. # noqa: E501 + + :param maturities: The maturities of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type maturities: list[datetime] + """ + + self._maturities = maturities + + @property + def lineage(self): + """Gets the lineage of this CreditSpreadCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this CreditSpreadCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this CreditSpreadCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this CreditSpreadCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this CreditSpreadCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this CreditSpreadCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreditSpreadCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreditSpreadCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/discount_factor_curve_data.py b/sdk/lusid/models/discount_factor_curve_data.py new file mode 100644 index 00000000000..3a03d3c25a0 --- /dev/null +++ b/sdk/lusid/models/discount_factor_curve_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class DiscountFactorCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dates': 'list[datetime]', + 'discount_factors': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dates': 'dates', + 'discount_factors': 'discountFactors', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dates': 'required', + 'discount_factors': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dates=None, discount_factors=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """DiscountFactorCurveData - a model defined in OpenAPI" + + :param base_date: BaseDate for the Curve (required) + :type base_date: datetime + :param dates: Dates for which the discount factors apply (required) + :type dates: list[datetime] + :param discount_factors: Discount factors to be applied to cashflow on the specified dates (required) + :type discount_factors: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dates = None + self._discount_factors = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dates = dates + self.discount_factors = discount_factors + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this DiscountFactorCurveData. # noqa: E501 + + BaseDate for the Curve # noqa: E501 + + :return: The base_date of this DiscountFactorCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this DiscountFactorCurveData. + + BaseDate for the Curve # noqa: E501 + + :param base_date: The base_date of this DiscountFactorCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dates(self): + """Gets the dates of this DiscountFactorCurveData. # noqa: E501 + + Dates for which the discount factors apply # noqa: E501 + + :return: The dates of this DiscountFactorCurveData. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this DiscountFactorCurveData. + + Dates for which the discount factors apply # noqa: E501 + + :param dates: The dates of this DiscountFactorCurveData. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def discount_factors(self): + """Gets the discount_factors of this DiscountFactorCurveData. # noqa: E501 + + Discount factors to be applied to cashflow on the specified dates # noqa: E501 + + :return: The discount_factors of this DiscountFactorCurveData. # noqa: E501 + :rtype: list[float] + """ + return self._discount_factors + + @discount_factors.setter + def discount_factors(self, discount_factors): + """Sets the discount_factors of this DiscountFactorCurveData. + + Discount factors to be applied to cashflow on the specified dates # noqa: E501 + + :param discount_factors: The discount_factors of this DiscountFactorCurveData. # noqa: E501 + :type discount_factors: list[float] + """ + if self.local_vars_configuration.client_side_validation and discount_factors is None: # noqa: E501 + raise ValueError("Invalid value for `discount_factors`, must not be `None`") # noqa: E501 + + self._discount_factors = discount_factors + + @property + def lineage(self): + """Gets the lineage of this DiscountFactorCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this DiscountFactorCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this DiscountFactorCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this DiscountFactorCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this DiscountFactorCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this DiscountFactorCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this DiscountFactorCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this DiscountFactorCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiscountFactorCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiscountFactorCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/discount_factor_curve_data_all_of.py b/sdk/lusid/models/discount_factor_curve_data_all_of.py new file mode 100644 index 00000000000..f47d89f2042 --- /dev/null +++ b/sdk/lusid/models/discount_factor_curve_data_all_of.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class DiscountFactorCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dates': 'list[datetime]', + 'discount_factors': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dates': 'dates', + 'discount_factors': 'discountFactors', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dates': 'required', + 'discount_factors': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dates=None, discount_factors=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """DiscountFactorCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: BaseDate for the Curve (required) + :type base_date: datetime + :param dates: Dates for which the discount factors apply (required) + :type dates: list[datetime] + :param discount_factors: Discount factors to be applied to cashflow on the specified dates (required) + :type discount_factors: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dates = None + self._discount_factors = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dates = dates + self.discount_factors = discount_factors + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this DiscountFactorCurveDataAllOf. # noqa: E501 + + BaseDate for the Curve # noqa: E501 + + :return: The base_date of this DiscountFactorCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this DiscountFactorCurveDataAllOf. + + BaseDate for the Curve # noqa: E501 + + :param base_date: The base_date of this DiscountFactorCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dates(self): + """Gets the dates of this DiscountFactorCurveDataAllOf. # noqa: E501 + + Dates for which the discount factors apply # noqa: E501 + + :return: The dates of this DiscountFactorCurveDataAllOf. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this DiscountFactorCurveDataAllOf. + + Dates for which the discount factors apply # noqa: E501 + + :param dates: The dates of this DiscountFactorCurveDataAllOf. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def discount_factors(self): + """Gets the discount_factors of this DiscountFactorCurveDataAllOf. # noqa: E501 + + Discount factors to be applied to cashflow on the specified dates # noqa: E501 + + :return: The discount_factors of this DiscountFactorCurveDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._discount_factors + + @discount_factors.setter + def discount_factors(self, discount_factors): + """Sets the discount_factors of this DiscountFactorCurveDataAllOf. + + Discount factors to be applied to cashflow on the specified dates # noqa: E501 + + :param discount_factors: The discount_factors of this DiscountFactorCurveDataAllOf. # noqa: E501 + :type discount_factors: list[float] + """ + if self.local_vars_configuration.client_side_validation and discount_factors is None: # noqa: E501 + raise ValueError("Invalid value for `discount_factors`, must not be `None`") # noqa: E501 + + self._discount_factors = discount_factors + + @property + def lineage(self): + """Gets the lineage of this DiscountFactorCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this DiscountFactorCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this DiscountFactorCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this DiscountFactorCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this DiscountFactorCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this DiscountFactorCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this DiscountFactorCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this DiscountFactorCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiscountFactorCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiscountFactorCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/empty_model_options.py b/sdk/lusid/models/empty_model_options.py new file mode 100644 index 00000000000..a31481c5ba0 --- /dev/null +++ b/sdk/lusid/models/empty_model_options.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EmptyModelOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'model_options_type': 'str' + } + + attribute_map = { + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'model_options_type': 'required' + } + + def __init__(self, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """EmptyModelOptions - a model defined in OpenAPI" + + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._model_options_type = None + self.discriminator = None + + self.model_options_type = model_options_type + + @property + def model_options_type(self): + """Gets the model_options_type of this EmptyModelOptions. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this EmptyModelOptions. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this EmptyModelOptions. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this EmptyModelOptions. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmptyModelOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmptyModelOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/empty_model_options_all_of.py b/sdk/lusid/models/empty_model_options_all_of.py new file mode 100644 index 00000000000..eb263878ddb --- /dev/null +++ b/sdk/lusid/models/empty_model_options_all_of.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EmptyModelOptionsAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'model_options_type': 'str' + } + + attribute_map = { + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'model_options_type': 'required' + } + + def __init__(self, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """EmptyModelOptionsAllOf - a model defined in OpenAPI" + + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._model_options_type = None + self.discriminator = None + + self.model_options_type = model_options_type + + @property + def model_options_type(self): + """Gets the model_options_type of this EmptyModelOptionsAllOf. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this EmptyModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this EmptyModelOptionsAllOf. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this EmptyModelOptionsAllOf. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmptyModelOptionsAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmptyModelOptionsAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity.py b/sdk/lusid/models/equity.py new file mode 100644 index 00000000000..6cfe395b744 --- /dev/null +++ b/sdk/lusid/models/equity.py @@ -0,0 +1,212 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Equity(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'identifiers': 'EquityAllOfIdentifiers', + 'dom_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'identifiers': 'identifiers', + 'dom_ccy': 'domCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'identifiers': 'optional', + 'dom_ccy': 'required', + 'instrument_type': 'required' + } + + def __init__(self, identifiers=None, dom_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """Equity - a model defined in OpenAPI" + + :param identifiers: + :type identifiers: lusid.EquityAllOfIdentifiers + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._identifiers = None + self._dom_ccy = None + self._instrument_type = None + self.discriminator = None + + self.identifiers = identifiers + self.dom_ccy = dom_ccy + self.instrument_type = instrument_type + + @property + def identifiers(self): + """Gets the identifiers of this Equity. # noqa: E501 + + + :return: The identifiers of this Equity. # noqa: E501 + :rtype: lusid.EquityAllOfIdentifiers + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this Equity. + + + :param identifiers: The identifiers of this Equity. # noqa: E501 + :type identifiers: lusid.EquityAllOfIdentifiers + """ + + self._identifiers = identifiers + + @property + def dom_ccy(self): + """Gets the dom_ccy of this Equity. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this Equity. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this Equity. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this Equity. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this Equity. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this Equity. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this Equity. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this Equity. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Equity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Equity): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_all_of.py b/sdk/lusid/models/equity_all_of.py new file mode 100644 index 00000000000..d36cc69a076 --- /dev/null +++ b/sdk/lusid/models/equity_all_of.py @@ -0,0 +1,212 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'identifiers': 'EquityAllOfIdentifiers', + 'dom_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'identifiers': 'identifiers', + 'dom_ccy': 'domCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'identifiers': 'optional', + 'dom_ccy': 'required', + 'instrument_type': 'required' + } + + def __init__(self, identifiers=None, dom_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """EquityAllOf - a model defined in OpenAPI" + + :param identifiers: + :type identifiers: lusid.EquityAllOfIdentifiers + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._identifiers = None + self._dom_ccy = None + self._instrument_type = None + self.discriminator = None + + self.identifiers = identifiers + self.dom_ccy = dom_ccy + self.instrument_type = instrument_type + + @property + def identifiers(self): + """Gets the identifiers of this EquityAllOf. # noqa: E501 + + + :return: The identifiers of this EquityAllOf. # noqa: E501 + :rtype: lusid.EquityAllOfIdentifiers + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this EquityAllOf. + + + :param identifiers: The identifiers of this EquityAllOf. # noqa: E501 + :type identifiers: lusid.EquityAllOfIdentifiers + """ + + self._identifiers = identifiers + + @property + def dom_ccy(self): + """Gets the dom_ccy of this EquityAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this EquityAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this EquityAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this EquityAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this EquityAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this EquityAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this EquityAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this EquityAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_all_of_identifiers.py b/sdk/lusid/models/equity_all_of_identifiers.py new file mode 100644 index 00000000000..fa038756773 --- /dev/null +++ b/sdk/lusid/models/equity_all_of_identifiers.py @@ -0,0 +1,433 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityAllOfIdentifiers(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'lusid_instrument_id': 'str', + 'isin': 'str', + 'sedol': 'str', + 'cusip': 'str', + 'client_internal': 'str', + 'figi': 'str', + 'ric': 'str', + 'quote_perm_id': 'str', + 'red_code': 'str', + 'bbgid': 'str', + 'ice_code': 'str' + } + + attribute_map = { + 'lusid_instrument_id': 'LusidInstrumentId', + 'isin': 'Isin', + 'sedol': 'Sedol', + 'cusip': 'Cusip', + 'client_internal': 'ClientInternal', + 'figi': 'Figi', + 'ric': 'RIC', + 'quote_perm_id': 'QuotePermId', + 'red_code': 'REDCode', + 'bbgid': 'BBGId', + 'ice_code': 'ICECode' + } + + required_map = { + 'lusid_instrument_id': 'optional', + 'isin': 'optional', + 'sedol': 'optional', + 'cusip': 'optional', + 'client_internal': 'optional', + 'figi': 'optional', + 'ric': 'optional', + 'quote_perm_id': 'optional', + 'red_code': 'optional', + 'bbgid': 'optional', + 'ice_code': 'optional' + } + + def __init__(self, lusid_instrument_id=None, isin=None, sedol=None, cusip=None, client_internal=None, figi=None, ric=None, quote_perm_id=None, red_code=None, bbgid=None, ice_code=None, local_vars_configuration=None): # noqa: E501 + """EquityAllOfIdentifiers - a model defined in OpenAPI" + + :param lusid_instrument_id: + :type lusid_instrument_id: str + :param isin: + :type isin: str + :param sedol: + :type sedol: str + :param cusip: + :type cusip: str + :param client_internal: + :type client_internal: str + :param figi: + :type figi: str + :param ric: + :type ric: str + :param quote_perm_id: + :type quote_perm_id: str + :param red_code: + :type red_code: str + :param bbgid: + :type bbgid: str + :param ice_code: + :type ice_code: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._lusid_instrument_id = None + self._isin = None + self._sedol = None + self._cusip = None + self._client_internal = None + self._figi = None + self._ric = None + self._quote_perm_id = None + self._red_code = None + self._bbgid = None + self._ice_code = None + self.discriminator = None + + if lusid_instrument_id is not None: + self.lusid_instrument_id = lusid_instrument_id + if isin is not None: + self.isin = isin + if sedol is not None: + self.sedol = sedol + if cusip is not None: + self.cusip = cusip + if client_internal is not None: + self.client_internal = client_internal + if figi is not None: + self.figi = figi + if ric is not None: + self.ric = ric + if quote_perm_id is not None: + self.quote_perm_id = quote_perm_id + if red_code is not None: + self.red_code = red_code + if bbgid is not None: + self.bbgid = bbgid + if ice_code is not None: + self.ice_code = ice_code + + @property + def lusid_instrument_id(self): + """Gets the lusid_instrument_id of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The lusid_instrument_id of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._lusid_instrument_id + + @lusid_instrument_id.setter + def lusid_instrument_id(self, lusid_instrument_id): + """Sets the lusid_instrument_id of this EquityAllOfIdentifiers. + + + :param lusid_instrument_id: The lusid_instrument_id of this EquityAllOfIdentifiers. # noqa: E501 + :type lusid_instrument_id: str + """ + + self._lusid_instrument_id = lusid_instrument_id + + @property + def isin(self): + """Gets the isin of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The isin of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._isin + + @isin.setter + def isin(self, isin): + """Sets the isin of this EquityAllOfIdentifiers. + + + :param isin: The isin of this EquityAllOfIdentifiers. # noqa: E501 + :type isin: str + """ + + self._isin = isin + + @property + def sedol(self): + """Gets the sedol of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The sedol of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._sedol + + @sedol.setter + def sedol(self, sedol): + """Sets the sedol of this EquityAllOfIdentifiers. + + + :param sedol: The sedol of this EquityAllOfIdentifiers. # noqa: E501 + :type sedol: str + """ + + self._sedol = sedol + + @property + def cusip(self): + """Gets the cusip of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The cusip of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._cusip + + @cusip.setter + def cusip(self, cusip): + """Sets the cusip of this EquityAllOfIdentifiers. + + + :param cusip: The cusip of this EquityAllOfIdentifiers. # noqa: E501 + :type cusip: str + """ + + self._cusip = cusip + + @property + def client_internal(self): + """Gets the client_internal of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The client_internal of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._client_internal + + @client_internal.setter + def client_internal(self, client_internal): + """Sets the client_internal of this EquityAllOfIdentifiers. + + + :param client_internal: The client_internal of this EquityAllOfIdentifiers. # noqa: E501 + :type client_internal: str + """ + + self._client_internal = client_internal + + @property + def figi(self): + """Gets the figi of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The figi of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._figi + + @figi.setter + def figi(self, figi): + """Sets the figi of this EquityAllOfIdentifiers. + + + :param figi: The figi of this EquityAllOfIdentifiers. # noqa: E501 + :type figi: str + """ + + self._figi = figi + + @property + def ric(self): + """Gets the ric of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The ric of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._ric + + @ric.setter + def ric(self, ric): + """Sets the ric of this EquityAllOfIdentifiers. + + + :param ric: The ric of this EquityAllOfIdentifiers. # noqa: E501 + :type ric: str + """ + + self._ric = ric + + @property + def quote_perm_id(self): + """Gets the quote_perm_id of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The quote_perm_id of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._quote_perm_id + + @quote_perm_id.setter + def quote_perm_id(self, quote_perm_id): + """Sets the quote_perm_id of this EquityAllOfIdentifiers. + + + :param quote_perm_id: The quote_perm_id of this EquityAllOfIdentifiers. # noqa: E501 + :type quote_perm_id: str + """ + + self._quote_perm_id = quote_perm_id + + @property + def red_code(self): + """Gets the red_code of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The red_code of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._red_code + + @red_code.setter + def red_code(self, red_code): + """Sets the red_code of this EquityAllOfIdentifiers. + + + :param red_code: The red_code of this EquityAllOfIdentifiers. # noqa: E501 + :type red_code: str + """ + + self._red_code = red_code + + @property + def bbgid(self): + """Gets the bbgid of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The bbgid of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._bbgid + + @bbgid.setter + def bbgid(self, bbgid): + """Sets the bbgid of this EquityAllOfIdentifiers. + + + :param bbgid: The bbgid of this EquityAllOfIdentifiers. # noqa: E501 + :type bbgid: str + """ + + self._bbgid = bbgid + + @property + def ice_code(self): + """Gets the ice_code of this EquityAllOfIdentifiers. # noqa: E501 + + + :return: The ice_code of this EquityAllOfIdentifiers. # noqa: E501 + :rtype: str + """ + return self._ice_code + + @ice_code.setter + def ice_code(self, ice_code): + """Sets the ice_code of this EquityAllOfIdentifiers. + + + :param ice_code: The ice_code of this EquityAllOfIdentifiers. # noqa: E501 + :type ice_code: str + """ + + self._ice_code = ice_code + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityAllOfIdentifiers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityAllOfIdentifiers): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_curve_by_prices_data.py b/sdk/lusid/models/equity_curve_by_prices_data.py new file mode 100644 index 00000000000..a60b8ef8baf --- /dev/null +++ b/sdk/lusid/models/equity_curve_by_prices_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityCurveByPricesData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dates': 'list[datetime]', + 'lineage': 'str', + 'prices': 'list[float]', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dates': 'dates', + 'lineage': 'lineage', + 'prices': 'prices', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dates': 'required', + 'lineage': 'optional', + 'prices': 'required', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dates=None, lineage=None, prices=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """EquityCurveByPricesData - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the provided prices (required) + :type base_date: datetime + :param dates: Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. (required) + :type dates: list[datetime] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param prices: Prices provided for the forward price of the Equity at the corresponding date in Dates. (required) + :type prices: list[float] + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dates = None + self._lineage = None + self._prices = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dates = dates + self.lineage = lineage + self.prices = prices + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this EquityCurveByPricesData. # noqa: E501 + + EffectiveAt date of the provided prices # noqa: E501 + + :return: The base_date of this EquityCurveByPricesData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this EquityCurveByPricesData. + + EffectiveAt date of the provided prices # noqa: E501 + + :param base_date: The base_date of this EquityCurveByPricesData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dates(self): + """Gets the dates of this EquityCurveByPricesData. # noqa: E501 + + Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. # noqa: E501 + + :return: The dates of this EquityCurveByPricesData. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this EquityCurveByPricesData. + + Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. # noqa: E501 + + :param dates: The dates of this EquityCurveByPricesData. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def lineage(self): + """Gets the lineage of this EquityCurveByPricesData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this EquityCurveByPricesData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this EquityCurveByPricesData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this EquityCurveByPricesData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def prices(self): + """Gets the prices of this EquityCurveByPricesData. # noqa: E501 + + Prices provided for the forward price of the Equity at the corresponding date in Dates. # noqa: E501 + + :return: The prices of this EquityCurveByPricesData. # noqa: E501 + :rtype: list[float] + """ + return self._prices + + @prices.setter + def prices(self, prices): + """Sets the prices of this EquityCurveByPricesData. + + Prices provided for the forward price of the Equity at the corresponding date in Dates. # noqa: E501 + + :param prices: The prices of this EquityCurveByPricesData. # noqa: E501 + :type prices: list[float] + """ + if self.local_vars_configuration.client_side_validation and prices is None: # noqa: E501 + raise ValueError("Invalid value for `prices`, must not be `None`") # noqa: E501 + + self._prices = prices + + @property + def market_data_type(self): + """Gets the market_data_type of this EquityCurveByPricesData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this EquityCurveByPricesData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this EquityCurveByPricesData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this EquityCurveByPricesData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityCurveByPricesData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityCurveByPricesData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_curve_by_prices_data_all_of.py b/sdk/lusid/models/equity_curve_by_prices_data_all_of.py new file mode 100644 index 00000000000..65683c3be0e --- /dev/null +++ b/sdk/lusid/models/equity_curve_by_prices_data_all_of.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityCurveByPricesDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dates': 'list[datetime]', + 'lineage': 'str', + 'prices': 'list[float]', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dates': 'dates', + 'lineage': 'lineage', + 'prices': 'prices', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dates': 'required', + 'lineage': 'optional', + 'prices': 'required', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dates=None, lineage=None, prices=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """EquityCurveByPricesDataAllOf - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the provided prices (required) + :type base_date: datetime + :param dates: Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. (required) + :type dates: list[datetime] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param prices: Prices provided for the forward price of the Equity at the corresponding date in Dates. (required) + :type prices: list[float] + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dates = None + self._lineage = None + self._prices = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dates = dates + self.lineage = lineage + self.prices = prices + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this EquityCurveByPricesDataAllOf. # noqa: E501 + + EffectiveAt date of the provided prices # noqa: E501 + + :return: The base_date of this EquityCurveByPricesDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this EquityCurveByPricesDataAllOf. + + EffectiveAt date of the provided prices # noqa: E501 + + :param base_date: The base_date of this EquityCurveByPricesDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dates(self): + """Gets the dates of this EquityCurveByPricesDataAllOf. # noqa: E501 + + Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. # noqa: E501 + + :return: The dates of this EquityCurveByPricesDataAllOf. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this EquityCurveByPricesDataAllOf. + + Dates provided for the forward price of the Equity at the corresponding price in Prices. These dates should be in the future with respect to the BaseDate. # noqa: E501 + + :param dates: The dates of this EquityCurveByPricesDataAllOf. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def lineage(self): + """Gets the lineage of this EquityCurveByPricesDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this EquityCurveByPricesDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this EquityCurveByPricesDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this EquityCurveByPricesDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def prices(self): + """Gets the prices of this EquityCurveByPricesDataAllOf. # noqa: E501 + + Prices provided for the forward price of the Equity at the corresponding date in Dates. # noqa: E501 + + :return: The prices of this EquityCurveByPricesDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._prices + + @prices.setter + def prices(self, prices): + """Sets the prices of this EquityCurveByPricesDataAllOf. + + Prices provided for the forward price of the Equity at the corresponding date in Dates. # noqa: E501 + + :param prices: The prices of this EquityCurveByPricesDataAllOf. # noqa: E501 + :type prices: list[float] + """ + if self.local_vars_configuration.client_side_validation and prices is None: # noqa: E501 + raise ValueError("Invalid value for `prices`, must not be `None`") # noqa: E501 + + self._prices = prices + + @property + def market_data_type(self): + """Gets the market_data_type of this EquityCurveByPricesDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this EquityCurveByPricesDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this EquityCurveByPricesDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this EquityCurveByPricesDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityCurveByPricesDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityCurveByPricesDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_model_options.py b/sdk/lusid/models/equity_model_options.py new file mode 100644 index 00000000000..4c636b53b62 --- /dev/null +++ b/sdk/lusid/models/equity_model_options.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityModelOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'equity_forward_projection_type': 'str', + 'model_options_type': 'str' + } + + attribute_map = { + 'equity_forward_projection_type': 'equityForwardProjectionType', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'equity_forward_projection_type': 'required', + 'model_options_type': 'required' + } + + def __init__(self, equity_forward_projection_type=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """EquityModelOptions - a model defined in OpenAPI" + + :param equity_forward_projection_type: Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. (required) + :type equity_forward_projection_type: str + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._equity_forward_projection_type = None + self._model_options_type = None + self.discriminator = None + + self.equity_forward_projection_type = equity_forward_projection_type + self.model_options_type = model_options_type + + @property + def equity_forward_projection_type(self): + """Gets the equity_forward_projection_type of this EquityModelOptions. # noqa: E501 + + Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. # noqa: E501 + + :return: The equity_forward_projection_type of this EquityModelOptions. # noqa: E501 + :rtype: str + """ + return self._equity_forward_projection_type + + @equity_forward_projection_type.setter + def equity_forward_projection_type(self, equity_forward_projection_type): + """Sets the equity_forward_projection_type of this EquityModelOptions. + + Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. # noqa: E501 + + :param equity_forward_projection_type: The equity_forward_projection_type of this EquityModelOptions. # noqa: E501 + :type equity_forward_projection_type: str + """ + if self.local_vars_configuration.client_side_validation and equity_forward_projection_type is None: # noqa: E501 + raise ValueError("Invalid value for `equity_forward_projection_type`, must not be `None`") # noqa: E501 + + self._equity_forward_projection_type = equity_forward_projection_type + + @property + def model_options_type(self): + """Gets the model_options_type of this EquityModelOptions. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this EquityModelOptions. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this EquityModelOptions. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this EquityModelOptions. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityModelOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityModelOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_model_options_all_of.py b/sdk/lusid/models/equity_model_options_all_of.py new file mode 100644 index 00000000000..859ee2c7e46 --- /dev/null +++ b/sdk/lusid/models/equity_model_options_all_of.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityModelOptionsAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'equity_forward_projection_type': 'str', + 'model_options_type': 'str' + } + + attribute_map = { + 'equity_forward_projection_type': 'equityForwardProjectionType', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'equity_forward_projection_type': 'required', + 'model_options_type': 'required' + } + + def __init__(self, equity_forward_projection_type=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """EquityModelOptionsAllOf - a model defined in OpenAPI" + + :param equity_forward_projection_type: Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. (required) + :type equity_forward_projection_type: str + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._equity_forward_projection_type = None + self._model_options_type = None + self.discriminator = None + + self.equity_forward_projection_type = equity_forward_projection_type + self.model_options_type = model_options_type + + @property + def equity_forward_projection_type(self): + """Gets the equity_forward_projection_type of this EquityModelOptionsAllOf. # noqa: E501 + + Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. # noqa: E501 + + :return: The equity_forward_projection_type of this EquityModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._equity_forward_projection_type + + @equity_forward_projection_type.setter + def equity_forward_projection_type(self, equity_forward_projection_type): + """Sets the equity_forward_projection_type of this EquityModelOptionsAllOf. + + Determines how forward equity prices should be projected. Supported string (enumeration) values are: [FlatForwardCurveFromSpot, EquityCurveByPrices, ForwardProjectedFromRatesCurve]. # noqa: E501 + + :param equity_forward_projection_type: The equity_forward_projection_type of this EquityModelOptionsAllOf. # noqa: E501 + :type equity_forward_projection_type: str + """ + if self.local_vars_configuration.client_side_validation and equity_forward_projection_type is None: # noqa: E501 + raise ValueError("Invalid value for `equity_forward_projection_type`, must not be `None`") # noqa: E501 + + self._equity_forward_projection_type = equity_forward_projection_type + + @property + def model_options_type(self): + """Gets the model_options_type of this EquityModelOptionsAllOf. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this EquityModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this EquityModelOptionsAllOf. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this EquityModelOptionsAllOf. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityModelOptionsAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityModelOptionsAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_option.py b/sdk/lusid/models/equity_option.py new file mode 100644 index 00000000000..a3e965d28b1 --- /dev/null +++ b/sdk/lusid/models/equity_option.py @@ -0,0 +1,529 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityOption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'option_maturity_date': 'datetime', + 'option_settlement_date': 'datetime', + 'delivery_type': 'str', + 'option_type': 'str', + 'strike': 'float', + 'dom_ccy': 'str', + 'underlying_identifier': 'str', + 'code': 'str', + 'equity_option_type': 'str', + 'number_of_shares': 'float', + 'premium': 'Premium', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'option_maturity_date': 'optionMaturityDate', + 'option_settlement_date': 'optionSettlementDate', + 'delivery_type': 'deliveryType', + 'option_type': 'optionType', + 'strike': 'strike', + 'dom_ccy': 'domCcy', + 'underlying_identifier': 'underlyingIdentifier', + 'code': 'code', + 'equity_option_type': 'equityOptionType', + 'number_of_shares': 'numberOfShares', + 'premium': 'premium', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'option_maturity_date': 'required', + 'option_settlement_date': 'required', + 'delivery_type': 'required', + 'option_type': 'required', + 'strike': 'required', + 'dom_ccy': 'required', + 'underlying_identifier': 'required', + 'code': 'required', + 'equity_option_type': 'optional', + 'number_of_shares': 'optional', + 'premium': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, option_maturity_date=None, option_settlement_date=None, delivery_type=None, option_type=None, strike=None, dom_ccy=None, underlying_identifier=None, code=None, equity_option_type=None, number_of_shares=None, premium=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """EquityOption - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param option_maturity_date: The maturity date of the option. (required) + :type option_maturity_date: datetime + :param option_settlement_date: The settlement date of the option. (required) + :type option_settlement_date: datetime + :param delivery_type: is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. (required) + :type delivery_type: str + :param option_type: Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. (required) + :type option_type: str + :param strike: The strike of the option. (required) + :type strike: float + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param underlying_identifier: The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. (required) + :type underlying_identifier: str + :param code: The identifying code for the equity underlying, e.g. 'IBM.N'. (required) + :type code: str + :param equity_option_type: Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. + :type equity_option_type: str + :param number_of_shares: The amount of shares to exchange if the option is exercised. + :type number_of_shares: float + :param premium: + :type premium: lusid.Premium + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._option_maturity_date = None + self._option_settlement_date = None + self._delivery_type = None + self._option_type = None + self._strike = None + self._dom_ccy = None + self._underlying_identifier = None + self._code = None + self._equity_option_type = None + self._number_of_shares = None + self._premium = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.option_maturity_date = option_maturity_date + self.option_settlement_date = option_settlement_date + self.delivery_type = delivery_type + self.option_type = option_type + self.strike = strike + self.dom_ccy = dom_ccy + self.underlying_identifier = underlying_identifier + self.code = code + self.equity_option_type = equity_option_type + self.number_of_shares = number_of_shares + if premium is not None: + self.premium = premium + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this EquityOption. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this EquityOption. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this EquityOption. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this EquityOption. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def option_maturity_date(self): + """Gets the option_maturity_date of this EquityOption. # noqa: E501 + + The maturity date of the option. # noqa: E501 + + :return: The option_maturity_date of this EquityOption. # noqa: E501 + :rtype: datetime + """ + return self._option_maturity_date + + @option_maturity_date.setter + def option_maturity_date(self, option_maturity_date): + """Sets the option_maturity_date of this EquityOption. + + The maturity date of the option. # noqa: E501 + + :param option_maturity_date: The option_maturity_date of this EquityOption. # noqa: E501 + :type option_maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_maturity_date`, must not be `None`") # noqa: E501 + + self._option_maturity_date = option_maturity_date + + @property + def option_settlement_date(self): + """Gets the option_settlement_date of this EquityOption. # noqa: E501 + + The settlement date of the option. # noqa: E501 + + :return: The option_settlement_date of this EquityOption. # noqa: E501 + :rtype: datetime + """ + return self._option_settlement_date + + @option_settlement_date.setter + def option_settlement_date(self, option_settlement_date): + """Sets the option_settlement_date of this EquityOption. + + The settlement date of the option. # noqa: E501 + + :param option_settlement_date: The option_settlement_date of this EquityOption. # noqa: E501 + :type option_settlement_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_settlement_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_settlement_date`, must not be `None`") # noqa: E501 + + self._option_settlement_date = option_settlement_date + + @property + def delivery_type(self): + """Gets the delivery_type of this EquityOption. # noqa: E501 + + is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :return: The delivery_type of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._delivery_type + + @delivery_type.setter + def delivery_type(self, delivery_type): + """Sets the delivery_type of this EquityOption. + + is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :param delivery_type: The delivery_type of this EquityOption. # noqa: E501 + :type delivery_type: str + """ + if self.local_vars_configuration.client_side_validation and delivery_type is None: # noqa: E501 + raise ValueError("Invalid value for `delivery_type`, must not be `None`") # noqa: E501 + + self._delivery_type = delivery_type + + @property + def option_type(self): + """Gets the option_type of this EquityOption. # noqa: E501 + + Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. # noqa: E501 + + :return: The option_type of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._option_type + + @option_type.setter + def option_type(self, option_type): + """Sets the option_type of this EquityOption. + + Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. # noqa: E501 + + :param option_type: The option_type of this EquityOption. # noqa: E501 + :type option_type: str + """ + if self.local_vars_configuration.client_side_validation and option_type is None: # noqa: E501 + raise ValueError("Invalid value for `option_type`, must not be `None`") # noqa: E501 + + self._option_type = option_type + + @property + def strike(self): + """Gets the strike of this EquityOption. # noqa: E501 + + The strike of the option. # noqa: E501 + + :return: The strike of this EquityOption. # noqa: E501 + :rtype: float + """ + return self._strike + + @strike.setter + def strike(self, strike): + """Sets the strike of this EquityOption. + + The strike of the option. # noqa: E501 + + :param strike: The strike of this EquityOption. # noqa: E501 + :type strike: float + """ + if self.local_vars_configuration.client_side_validation and strike is None: # noqa: E501 + raise ValueError("Invalid value for `strike`, must not be `None`") # noqa: E501 + + self._strike = strike + + @property + def dom_ccy(self): + """Gets the dom_ccy of this EquityOption. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this EquityOption. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this EquityOption. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def underlying_identifier(self): + """Gets the underlying_identifier of this EquityOption. # noqa: E501 + + The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :return: The underlying_identifier of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._underlying_identifier + + @underlying_identifier.setter + def underlying_identifier(self, underlying_identifier): + """Sets the underlying_identifier of this EquityOption. + + The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :param underlying_identifier: The underlying_identifier of this EquityOption. # noqa: E501 + :type underlying_identifier: str + """ + if self.local_vars_configuration.client_side_validation and underlying_identifier is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_identifier`, must not be `None`") # noqa: E501 + + self._underlying_identifier = underlying_identifier + + @property + def code(self): + """Gets the code of this EquityOption. # noqa: E501 + + The identifying code for the equity underlying, e.g. 'IBM.N'. # noqa: E501 + + :return: The code of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this EquityOption. + + The identifying code for the equity underlying, e.g. 'IBM.N'. # noqa: E501 + + :param code: The code of this EquityOption. # noqa: E501 + :type code: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def equity_option_type(self): + """Gets the equity_option_type of this EquityOption. # noqa: E501 + + Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. # noqa: E501 + + :return: The equity_option_type of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._equity_option_type + + @equity_option_type.setter + def equity_option_type(self, equity_option_type): + """Sets the equity_option_type of this EquityOption. + + Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. # noqa: E501 + + :param equity_option_type: The equity_option_type of this EquityOption. # noqa: E501 + :type equity_option_type: str + """ + + self._equity_option_type = equity_option_type + + @property + def number_of_shares(self): + """Gets the number_of_shares of this EquityOption. # noqa: E501 + + The amount of shares to exchange if the option is exercised. # noqa: E501 + + :return: The number_of_shares of this EquityOption. # noqa: E501 + :rtype: float + """ + return self._number_of_shares + + @number_of_shares.setter + def number_of_shares(self, number_of_shares): + """Sets the number_of_shares of this EquityOption. + + The amount of shares to exchange if the option is exercised. # noqa: E501 + + :param number_of_shares: The number_of_shares of this EquityOption. # noqa: E501 + :type number_of_shares: float + """ + + self._number_of_shares = number_of_shares + + @property + def premium(self): + """Gets the premium of this EquityOption. # noqa: E501 + + + :return: The premium of this EquityOption. # noqa: E501 + :rtype: lusid.Premium + """ + return self._premium + + @premium.setter + def premium(self, premium): + """Sets the premium of this EquityOption. + + + :param premium: The premium of this EquityOption. # noqa: E501 + :type premium: lusid.Premium + """ + + self._premium = premium + + @property + def instrument_type(self): + """Gets the instrument_type of this EquityOption. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this EquityOption. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this EquityOption. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this EquityOption. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_option_all_of.py b/sdk/lusid/models/equity_option_all_of.py new file mode 100644 index 00000000000..fec5ae84ef1 --- /dev/null +++ b/sdk/lusid/models/equity_option_all_of.py @@ -0,0 +1,529 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityOptionAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'option_maturity_date': 'datetime', + 'option_settlement_date': 'datetime', + 'delivery_type': 'str', + 'option_type': 'str', + 'strike': 'float', + 'dom_ccy': 'str', + 'underlying_identifier': 'str', + 'code': 'str', + 'equity_option_type': 'str', + 'number_of_shares': 'float', + 'premium': 'Premium', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'option_maturity_date': 'optionMaturityDate', + 'option_settlement_date': 'optionSettlementDate', + 'delivery_type': 'deliveryType', + 'option_type': 'optionType', + 'strike': 'strike', + 'dom_ccy': 'domCcy', + 'underlying_identifier': 'underlyingIdentifier', + 'code': 'code', + 'equity_option_type': 'equityOptionType', + 'number_of_shares': 'numberOfShares', + 'premium': 'premium', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'option_maturity_date': 'required', + 'option_settlement_date': 'required', + 'delivery_type': 'required', + 'option_type': 'required', + 'strike': 'required', + 'dom_ccy': 'required', + 'underlying_identifier': 'required', + 'code': 'required', + 'equity_option_type': 'optional', + 'number_of_shares': 'optional', + 'premium': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, option_maturity_date=None, option_settlement_date=None, delivery_type=None, option_type=None, strike=None, dom_ccy=None, underlying_identifier=None, code=None, equity_option_type=None, number_of_shares=None, premium=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """EquityOptionAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param option_maturity_date: The maturity date of the option. (required) + :type option_maturity_date: datetime + :param option_settlement_date: The settlement date of the option. (required) + :type option_settlement_date: datetime + :param delivery_type: is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. (required) + :type delivery_type: str + :param option_type: Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. (required) + :type option_type: str + :param strike: The strike of the option. (required) + :type strike: float + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param underlying_identifier: The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. (required) + :type underlying_identifier: str + :param code: The identifying code for the equity underlying, e.g. 'IBM.N'. (required) + :type code: str + :param equity_option_type: Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. + :type equity_option_type: str + :param number_of_shares: The amount of shares to exchange if the option is exercised. + :type number_of_shares: float + :param premium: + :type premium: lusid.Premium + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._option_maturity_date = None + self._option_settlement_date = None + self._delivery_type = None + self._option_type = None + self._strike = None + self._dom_ccy = None + self._underlying_identifier = None + self._code = None + self._equity_option_type = None + self._number_of_shares = None + self._premium = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.option_maturity_date = option_maturity_date + self.option_settlement_date = option_settlement_date + self.delivery_type = delivery_type + self.option_type = option_type + self.strike = strike + self.dom_ccy = dom_ccy + self.underlying_identifier = underlying_identifier + self.code = code + self.equity_option_type = equity_option_type + self.number_of_shares = number_of_shares + if premium is not None: + self.premium = premium + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this EquityOptionAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this EquityOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this EquityOptionAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this EquityOptionAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def option_maturity_date(self): + """Gets the option_maturity_date of this EquityOptionAllOf. # noqa: E501 + + The maturity date of the option. # noqa: E501 + + :return: The option_maturity_date of this EquityOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._option_maturity_date + + @option_maturity_date.setter + def option_maturity_date(self, option_maturity_date): + """Sets the option_maturity_date of this EquityOptionAllOf. + + The maturity date of the option. # noqa: E501 + + :param option_maturity_date: The option_maturity_date of this EquityOptionAllOf. # noqa: E501 + :type option_maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_maturity_date`, must not be `None`") # noqa: E501 + + self._option_maturity_date = option_maturity_date + + @property + def option_settlement_date(self): + """Gets the option_settlement_date of this EquityOptionAllOf. # noqa: E501 + + The settlement date of the option. # noqa: E501 + + :return: The option_settlement_date of this EquityOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._option_settlement_date + + @option_settlement_date.setter + def option_settlement_date(self, option_settlement_date): + """Sets the option_settlement_date of this EquityOptionAllOf. + + The settlement date of the option. # noqa: E501 + + :param option_settlement_date: The option_settlement_date of this EquityOptionAllOf. # noqa: E501 + :type option_settlement_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_settlement_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_settlement_date`, must not be `None`") # noqa: E501 + + self._option_settlement_date = option_settlement_date + + @property + def delivery_type(self): + """Gets the delivery_type of this EquityOptionAllOf. # noqa: E501 + + is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :return: The delivery_type of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._delivery_type + + @delivery_type.setter + def delivery_type(self, delivery_type): + """Sets the delivery_type of this EquityOptionAllOf. + + is the option cash settled or physical delivery of option Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :param delivery_type: The delivery_type of this EquityOptionAllOf. # noqa: E501 + :type delivery_type: str + """ + if self.local_vars_configuration.client_side_validation and delivery_type is None: # noqa: E501 + raise ValueError("Invalid value for `delivery_type`, must not be `None`") # noqa: E501 + + self._delivery_type = delivery_type + + @property + def option_type(self): + """Gets the option_type of this EquityOptionAllOf. # noqa: E501 + + Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. # noqa: E501 + + :return: The option_type of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._option_type + + @option_type.setter + def option_type(self, option_type): + """Sets the option_type of this EquityOptionAllOf. + + Type of optionality for the option Supported string (enumeration) values are: [Call, Put]. # noqa: E501 + + :param option_type: The option_type of this EquityOptionAllOf. # noqa: E501 + :type option_type: str + """ + if self.local_vars_configuration.client_side_validation and option_type is None: # noqa: E501 + raise ValueError("Invalid value for `option_type`, must not be `None`") # noqa: E501 + + self._option_type = option_type + + @property + def strike(self): + """Gets the strike of this EquityOptionAllOf. # noqa: E501 + + The strike of the option. # noqa: E501 + + :return: The strike of this EquityOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._strike + + @strike.setter + def strike(self, strike): + """Sets the strike of this EquityOptionAllOf. + + The strike of the option. # noqa: E501 + + :param strike: The strike of this EquityOptionAllOf. # noqa: E501 + :type strike: float + """ + if self.local_vars_configuration.client_side_validation and strike is None: # noqa: E501 + raise ValueError("Invalid value for `strike`, must not be `None`") # noqa: E501 + + self._strike = strike + + @property + def dom_ccy(self): + """Gets the dom_ccy of this EquityOptionAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this EquityOptionAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this EquityOptionAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def underlying_identifier(self): + """Gets the underlying_identifier of this EquityOptionAllOf. # noqa: E501 + + The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :return: The underlying_identifier of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._underlying_identifier + + @underlying_identifier.setter + def underlying_identifier(self, underlying_identifier): + """Sets the underlying_identifier of this EquityOptionAllOf. + + The market identifier type of the underlying code, e.g RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :param underlying_identifier: The underlying_identifier of this EquityOptionAllOf. # noqa: E501 + :type underlying_identifier: str + """ + if self.local_vars_configuration.client_side_validation and underlying_identifier is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_identifier`, must not be `None`") # noqa: E501 + + self._underlying_identifier = underlying_identifier + + @property + def code(self): + """Gets the code of this EquityOptionAllOf. # noqa: E501 + + The identifying code for the equity underlying, e.g. 'IBM.N'. # noqa: E501 + + :return: The code of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this EquityOptionAllOf. + + The identifying code for the equity underlying, e.g. 'IBM.N'. # noqa: E501 + + :param code: The code of this EquityOptionAllOf. # noqa: E501 + :type code: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def equity_option_type(self): + """Gets the equity_option_type of this EquityOptionAllOf. # noqa: E501 + + Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. # noqa: E501 + + :return: The equity_option_type of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._equity_option_type + + @equity_option_type.setter + def equity_option_type(self, equity_option_type): + """Sets the equity_option_type of this EquityOptionAllOf. + + Equity option types. E.g. Vanilla (default), RightsIssue, Warrant. Supported string (enumeration) values are: [Vanilla, RightsIssue, Warrant]. # noqa: E501 + + :param equity_option_type: The equity_option_type of this EquityOptionAllOf. # noqa: E501 + :type equity_option_type: str + """ + + self._equity_option_type = equity_option_type + + @property + def number_of_shares(self): + """Gets the number_of_shares of this EquityOptionAllOf. # noqa: E501 + + The amount of shares to exchange if the option is exercised. # noqa: E501 + + :return: The number_of_shares of this EquityOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._number_of_shares + + @number_of_shares.setter + def number_of_shares(self, number_of_shares): + """Sets the number_of_shares of this EquityOptionAllOf. + + The amount of shares to exchange if the option is exercised. # noqa: E501 + + :param number_of_shares: The number_of_shares of this EquityOptionAllOf. # noqa: E501 + :type number_of_shares: float + """ + + self._number_of_shares = number_of_shares + + @property + def premium(self): + """Gets the premium of this EquityOptionAllOf. # noqa: E501 + + + :return: The premium of this EquityOptionAllOf. # noqa: E501 + :rtype: lusid.Premium + """ + return self._premium + + @premium.setter + def premium(self, premium): + """Sets the premium of this EquityOptionAllOf. + + + :param premium: The premium of this EquityOptionAllOf. # noqa: E501 + :type premium: lusid.Premium + """ + + self._premium = premium + + @property + def instrument_type(self): + """Gets the instrument_type of this EquityOptionAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this EquityOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this EquityOptionAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this EquityOptionAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityOptionAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityOptionAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_swap.py b/sdk/lusid/models/equity_swap.py new file mode 100644 index 00000000000..53238b5877d --- /dev/null +++ b/sdk/lusid/models/equity_swap.py @@ -0,0 +1,498 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquitySwap(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'code': 'str', + 'equity_flow_conventions': 'FlowConventions', + 'funding_leg': 'InstrumentLeg', + 'include_dividends': 'bool', + 'initial_price': 'float', + 'notional_reset': 'bool', + 'quantity': 'float', + 'underlying_identifier': 'str', + 'equity_swap_dividend_payment_timing': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'code': 'code', + 'equity_flow_conventions': 'equityFlowConventions', + 'funding_leg': 'fundingLeg', + 'include_dividends': 'includeDividends', + 'initial_price': 'initialPrice', + 'notional_reset': 'notionalReset', + 'quantity': 'quantity', + 'underlying_identifier': 'underlyingIdentifier', + 'equity_swap_dividend_payment_timing': 'equitySwapDividendPaymentTiming', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'code': 'required', + 'equity_flow_conventions': 'required', + 'funding_leg': 'required', + 'include_dividends': 'required', + 'initial_price': 'required', + 'notional_reset': 'required', + 'quantity': 'required', + 'underlying_identifier': 'required', + 'equity_swap_dividend_payment_timing': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, code=None, equity_flow_conventions=None, funding_leg=None, include_dividends=None, initial_price=None, notional_reset=None, quantity=None, underlying_identifier=None, equity_swap_dividend_payment_timing=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """EquitySwap - a model defined in OpenAPI" + + :param start_date: The start date of the EquitySwap. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param code: The code of the underlying. (required) + :type code: str + :param equity_flow_conventions: (required) + :type equity_flow_conventions: lusid.FlowConventions + :param funding_leg: (required) + :type funding_leg: lusid.InstrumentLeg + :param include_dividends: Dividend inclusion flag, if true dividends are included in the equity leg (total return). (required) + :type include_dividends: bool + :param initial_price: The initial equity price of the Equity Swap. (required) + :type initial_price: float + :param notional_reset: Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). (required) + :type notional_reset: bool + :param quantity: The quantity or number of shares in the Equity Swap. (required) + :type quantity: float + :param underlying_identifier: external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. (required) + :type underlying_identifier: str + :param equity_swap_dividend_payment_timing: Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. + :type equity_swap_dividend_payment_timing: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._code = None + self._equity_flow_conventions = None + self._funding_leg = None + self._include_dividends = None + self._initial_price = None + self._notional_reset = None + self._quantity = None + self._underlying_identifier = None + self._equity_swap_dividend_payment_timing = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.code = code + self.equity_flow_conventions = equity_flow_conventions + self.funding_leg = funding_leg + self.include_dividends = include_dividends + self.initial_price = initial_price + self.notional_reset = notional_reset + self.quantity = quantity + self.underlying_identifier = underlying_identifier + self.equity_swap_dividend_payment_timing = equity_swap_dividend_payment_timing + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this EquitySwap. # noqa: E501 + + The start date of the EquitySwap. # noqa: E501 + + :return: The start_date of this EquitySwap. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this EquitySwap. + + The start date of the EquitySwap. # noqa: E501 + + :param start_date: The start_date of this EquitySwap. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this EquitySwap. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this EquitySwap. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this EquitySwap. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this EquitySwap. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def code(self): + """Gets the code of this EquitySwap. # noqa: E501 + + The code of the underlying. # noqa: E501 + + :return: The code of this EquitySwap. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this EquitySwap. + + The code of the underlying. # noqa: E501 + + :param code: The code of this EquitySwap. # noqa: E501 + :type code: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def equity_flow_conventions(self): + """Gets the equity_flow_conventions of this EquitySwap. # noqa: E501 + + + :return: The equity_flow_conventions of this EquitySwap. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._equity_flow_conventions + + @equity_flow_conventions.setter + def equity_flow_conventions(self, equity_flow_conventions): + """Sets the equity_flow_conventions of this EquitySwap. + + + :param equity_flow_conventions: The equity_flow_conventions of this EquitySwap. # noqa: E501 + :type equity_flow_conventions: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and equity_flow_conventions is None: # noqa: E501 + raise ValueError("Invalid value for `equity_flow_conventions`, must not be `None`") # noqa: E501 + + self._equity_flow_conventions = equity_flow_conventions + + @property + def funding_leg(self): + """Gets the funding_leg of this EquitySwap. # noqa: E501 + + + :return: The funding_leg of this EquitySwap. # noqa: E501 + :rtype: lusid.InstrumentLeg + """ + return self._funding_leg + + @funding_leg.setter + def funding_leg(self, funding_leg): + """Sets the funding_leg of this EquitySwap. + + + :param funding_leg: The funding_leg of this EquitySwap. # noqa: E501 + :type funding_leg: lusid.InstrumentLeg + """ + if self.local_vars_configuration.client_side_validation and funding_leg is None: # noqa: E501 + raise ValueError("Invalid value for `funding_leg`, must not be `None`") # noqa: E501 + + self._funding_leg = funding_leg + + @property + def include_dividends(self): + """Gets the include_dividends of this EquitySwap. # noqa: E501 + + Dividend inclusion flag, if true dividends are included in the equity leg (total return). # noqa: E501 + + :return: The include_dividends of this EquitySwap. # noqa: E501 + :rtype: bool + """ + return self._include_dividends + + @include_dividends.setter + def include_dividends(self, include_dividends): + """Sets the include_dividends of this EquitySwap. + + Dividend inclusion flag, if true dividends are included in the equity leg (total return). # noqa: E501 + + :param include_dividends: The include_dividends of this EquitySwap. # noqa: E501 + :type include_dividends: bool + """ + if self.local_vars_configuration.client_side_validation and include_dividends is None: # noqa: E501 + raise ValueError("Invalid value for `include_dividends`, must not be `None`") # noqa: E501 + + self._include_dividends = include_dividends + + @property + def initial_price(self): + """Gets the initial_price of this EquitySwap. # noqa: E501 + + The initial equity price of the Equity Swap. # noqa: E501 + + :return: The initial_price of this EquitySwap. # noqa: E501 + :rtype: float + """ + return self._initial_price + + @initial_price.setter + def initial_price(self, initial_price): + """Sets the initial_price of this EquitySwap. + + The initial equity price of the Equity Swap. # noqa: E501 + + :param initial_price: The initial_price of this EquitySwap. # noqa: E501 + :type initial_price: float + """ + if self.local_vars_configuration.client_side_validation and initial_price is None: # noqa: E501 + raise ValueError("Invalid value for `initial_price`, must not be `None`") # noqa: E501 + + self._initial_price = initial_price + + @property + def notional_reset(self): + """Gets the notional_reset of this EquitySwap. # noqa: E501 + + Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). # noqa: E501 + + :return: The notional_reset of this EquitySwap. # noqa: E501 + :rtype: bool + """ + return self._notional_reset + + @notional_reset.setter + def notional_reset(self, notional_reset): + """Sets the notional_reset of this EquitySwap. + + Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). # noqa: E501 + + :param notional_reset: The notional_reset of this EquitySwap. # noqa: E501 + :type notional_reset: bool + """ + if self.local_vars_configuration.client_side_validation and notional_reset is None: # noqa: E501 + raise ValueError("Invalid value for `notional_reset`, must not be `None`") # noqa: E501 + + self._notional_reset = notional_reset + + @property + def quantity(self): + """Gets the quantity of this EquitySwap. # noqa: E501 + + The quantity or number of shares in the Equity Swap. # noqa: E501 + + :return: The quantity of this EquitySwap. # noqa: E501 + :rtype: float + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """Sets the quantity of this EquitySwap. + + The quantity or number of shares in the Equity Swap. # noqa: E501 + + :param quantity: The quantity of this EquitySwap. # noqa: E501 + :type quantity: float + """ + if self.local_vars_configuration.client_side_validation and quantity is None: # noqa: E501 + raise ValueError("Invalid value for `quantity`, must not be `None`") # noqa: E501 + + self._quantity = quantity + + @property + def underlying_identifier(self): + """Gets the underlying_identifier of this EquitySwap. # noqa: E501 + + external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :return: The underlying_identifier of this EquitySwap. # noqa: E501 + :rtype: str + """ + return self._underlying_identifier + + @underlying_identifier.setter + def underlying_identifier(self, underlying_identifier): + """Sets the underlying_identifier of this EquitySwap. + + external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :param underlying_identifier: The underlying_identifier of this EquitySwap. # noqa: E501 + :type underlying_identifier: str + """ + if self.local_vars_configuration.client_side_validation and underlying_identifier is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_identifier`, must not be `None`") # noqa: E501 + + self._underlying_identifier = underlying_identifier + + @property + def equity_swap_dividend_payment_timing(self): + """Gets the equity_swap_dividend_payment_timing of this EquitySwap. # noqa: E501 + + Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. # noqa: E501 + + :return: The equity_swap_dividend_payment_timing of this EquitySwap. # noqa: E501 + :rtype: str + """ + return self._equity_swap_dividend_payment_timing + + @equity_swap_dividend_payment_timing.setter + def equity_swap_dividend_payment_timing(self, equity_swap_dividend_payment_timing): + """Sets the equity_swap_dividend_payment_timing of this EquitySwap. + + Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. # noqa: E501 + + :param equity_swap_dividend_payment_timing: The equity_swap_dividend_payment_timing of this EquitySwap. # noqa: E501 + :type equity_swap_dividend_payment_timing: str + """ + + self._equity_swap_dividend_payment_timing = equity_swap_dividend_payment_timing + + @property + def instrument_type(self): + """Gets the instrument_type of this EquitySwap. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this EquitySwap. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this EquitySwap. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this EquitySwap. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquitySwap): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquitySwap): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_swap_all_of.py b/sdk/lusid/models/equity_swap_all_of.py new file mode 100644 index 00000000000..c91e4415f62 --- /dev/null +++ b/sdk/lusid/models/equity_swap_all_of.py @@ -0,0 +1,498 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquitySwapAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'code': 'str', + 'equity_flow_conventions': 'FlowConventions', + 'funding_leg': 'InstrumentLeg', + 'include_dividends': 'bool', + 'initial_price': 'float', + 'notional_reset': 'bool', + 'quantity': 'float', + 'underlying_identifier': 'str', + 'equity_swap_dividend_payment_timing': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'code': 'code', + 'equity_flow_conventions': 'equityFlowConventions', + 'funding_leg': 'fundingLeg', + 'include_dividends': 'includeDividends', + 'initial_price': 'initialPrice', + 'notional_reset': 'notionalReset', + 'quantity': 'quantity', + 'underlying_identifier': 'underlyingIdentifier', + 'equity_swap_dividend_payment_timing': 'equitySwapDividendPaymentTiming', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'code': 'required', + 'equity_flow_conventions': 'required', + 'funding_leg': 'required', + 'include_dividends': 'required', + 'initial_price': 'required', + 'notional_reset': 'required', + 'quantity': 'required', + 'underlying_identifier': 'required', + 'equity_swap_dividend_payment_timing': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, code=None, equity_flow_conventions=None, funding_leg=None, include_dividends=None, initial_price=None, notional_reset=None, quantity=None, underlying_identifier=None, equity_swap_dividend_payment_timing=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """EquitySwapAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the EquitySwap. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param code: The code of the underlying. (required) + :type code: str + :param equity_flow_conventions: (required) + :type equity_flow_conventions: lusid.FlowConventions + :param funding_leg: (required) + :type funding_leg: lusid.InstrumentLeg + :param include_dividends: Dividend inclusion flag, if true dividends are included in the equity leg (total return). (required) + :type include_dividends: bool + :param initial_price: The initial equity price of the Equity Swap. (required) + :type initial_price: float + :param notional_reset: Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). (required) + :type notional_reset: bool + :param quantity: The quantity or number of shares in the Equity Swap. (required) + :type quantity: float + :param underlying_identifier: external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. (required) + :type underlying_identifier: str + :param equity_swap_dividend_payment_timing: Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. + :type equity_swap_dividend_payment_timing: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._code = None + self._equity_flow_conventions = None + self._funding_leg = None + self._include_dividends = None + self._initial_price = None + self._notional_reset = None + self._quantity = None + self._underlying_identifier = None + self._equity_swap_dividend_payment_timing = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.code = code + self.equity_flow_conventions = equity_flow_conventions + self.funding_leg = funding_leg + self.include_dividends = include_dividends + self.initial_price = initial_price + self.notional_reset = notional_reset + self.quantity = quantity + self.underlying_identifier = underlying_identifier + self.equity_swap_dividend_payment_timing = equity_swap_dividend_payment_timing + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this EquitySwapAllOf. # noqa: E501 + + The start date of the EquitySwap. # noqa: E501 + + :return: The start_date of this EquitySwapAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this EquitySwapAllOf. + + The start date of the EquitySwap. # noqa: E501 + + :param start_date: The start_date of this EquitySwapAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this EquitySwapAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this EquitySwapAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this EquitySwapAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this EquitySwapAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def code(self): + """Gets the code of this EquitySwapAllOf. # noqa: E501 + + The code of the underlying. # noqa: E501 + + :return: The code of this EquitySwapAllOf. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this EquitySwapAllOf. + + The code of the underlying. # noqa: E501 + + :param code: The code of this EquitySwapAllOf. # noqa: E501 + :type code: str + """ + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def equity_flow_conventions(self): + """Gets the equity_flow_conventions of this EquitySwapAllOf. # noqa: E501 + + + :return: The equity_flow_conventions of this EquitySwapAllOf. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._equity_flow_conventions + + @equity_flow_conventions.setter + def equity_flow_conventions(self, equity_flow_conventions): + """Sets the equity_flow_conventions of this EquitySwapAllOf. + + + :param equity_flow_conventions: The equity_flow_conventions of this EquitySwapAllOf. # noqa: E501 + :type equity_flow_conventions: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and equity_flow_conventions is None: # noqa: E501 + raise ValueError("Invalid value for `equity_flow_conventions`, must not be `None`") # noqa: E501 + + self._equity_flow_conventions = equity_flow_conventions + + @property + def funding_leg(self): + """Gets the funding_leg of this EquitySwapAllOf. # noqa: E501 + + + :return: The funding_leg of this EquitySwapAllOf. # noqa: E501 + :rtype: lusid.InstrumentLeg + """ + return self._funding_leg + + @funding_leg.setter + def funding_leg(self, funding_leg): + """Sets the funding_leg of this EquitySwapAllOf. + + + :param funding_leg: The funding_leg of this EquitySwapAllOf. # noqa: E501 + :type funding_leg: lusid.InstrumentLeg + """ + if self.local_vars_configuration.client_side_validation and funding_leg is None: # noqa: E501 + raise ValueError("Invalid value for `funding_leg`, must not be `None`") # noqa: E501 + + self._funding_leg = funding_leg + + @property + def include_dividends(self): + """Gets the include_dividends of this EquitySwapAllOf. # noqa: E501 + + Dividend inclusion flag, if true dividends are included in the equity leg (total return). # noqa: E501 + + :return: The include_dividends of this EquitySwapAllOf. # noqa: E501 + :rtype: bool + """ + return self._include_dividends + + @include_dividends.setter + def include_dividends(self, include_dividends): + """Sets the include_dividends of this EquitySwapAllOf. + + Dividend inclusion flag, if true dividends are included in the equity leg (total return). # noqa: E501 + + :param include_dividends: The include_dividends of this EquitySwapAllOf. # noqa: E501 + :type include_dividends: bool + """ + if self.local_vars_configuration.client_side_validation and include_dividends is None: # noqa: E501 + raise ValueError("Invalid value for `include_dividends`, must not be `None`") # noqa: E501 + + self._include_dividends = include_dividends + + @property + def initial_price(self): + """Gets the initial_price of this EquitySwapAllOf. # noqa: E501 + + The initial equity price of the Equity Swap. # noqa: E501 + + :return: The initial_price of this EquitySwapAllOf. # noqa: E501 + :rtype: float + """ + return self._initial_price + + @initial_price.setter + def initial_price(self, initial_price): + """Sets the initial_price of this EquitySwapAllOf. + + The initial equity price of the Equity Swap. # noqa: E501 + + :param initial_price: The initial_price of this EquitySwapAllOf. # noqa: E501 + :type initial_price: float + """ + if self.local_vars_configuration.client_side_validation and initial_price is None: # noqa: E501 + raise ValueError("Invalid value for `initial_price`, must not be `None`") # noqa: E501 + + self._initial_price = initial_price + + @property + def notional_reset(self): + """Gets the notional_reset of this EquitySwapAllOf. # noqa: E501 + + Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). # noqa: E501 + + :return: The notional_reset of this EquitySwapAllOf. # noqa: E501 + :rtype: bool + """ + return self._notional_reset + + @notional_reset.setter + def notional_reset(self, notional_reset): + """Sets the notional_reset of this EquitySwapAllOf. + + Notional reset flag, if true the notional of the funding leg is reset at the start of every coupon to match the value of the equity leg (equity price at start of coupon times quantity). # noqa: E501 + + :param notional_reset: The notional_reset of this EquitySwapAllOf. # noqa: E501 + :type notional_reset: bool + """ + if self.local_vars_configuration.client_side_validation and notional_reset is None: # noqa: E501 + raise ValueError("Invalid value for `notional_reset`, must not be `None`") # noqa: E501 + + self._notional_reset = notional_reset + + @property + def quantity(self): + """Gets the quantity of this EquitySwapAllOf. # noqa: E501 + + The quantity or number of shares in the Equity Swap. # noqa: E501 + + :return: The quantity of this EquitySwapAllOf. # noqa: E501 + :rtype: float + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """Sets the quantity of this EquitySwapAllOf. + + The quantity or number of shares in the Equity Swap. # noqa: E501 + + :param quantity: The quantity of this EquitySwapAllOf. # noqa: E501 + :type quantity: float + """ + if self.local_vars_configuration.client_side_validation and quantity is None: # noqa: E501 + raise ValueError("Invalid value for `quantity`, must not be `None`") # noqa: E501 + + self._quantity = quantity + + @property + def underlying_identifier(self): + """Gets the underlying_identifier of this EquitySwapAllOf. # noqa: E501 + + external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :return: The underlying_identifier of this EquitySwapAllOf. # noqa: E501 + :rtype: str + """ + return self._underlying_identifier + + @underlying_identifier.setter + def underlying_identifier(self, underlying_identifier): + """Sets the underlying_identifier of this EquitySwapAllOf. + + external market codes and identifiers for the EquitySwap, e.g. RIC. Supported string (enumeration) values are: [LusidInstrumentId, Isin, Sedol, Cusip, ClientInternal, Figi, RIC, QuotePermId, REDCode, BBGId, ICECode]. # noqa: E501 + + :param underlying_identifier: The underlying_identifier of this EquitySwapAllOf. # noqa: E501 + :type underlying_identifier: str + """ + if self.local_vars_configuration.client_side_validation and underlying_identifier is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_identifier`, must not be `None`") # noqa: E501 + + self._underlying_identifier = underlying_identifier + + @property + def equity_swap_dividend_payment_timing(self): + """Gets the equity_swap_dividend_payment_timing of this EquitySwapAllOf. # noqa: E501 + + Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. # noqa: E501 + + :return: The equity_swap_dividend_payment_timing of this EquitySwapAllOf. # noqa: E501 + :rtype: str + """ + return self._equity_swap_dividend_payment_timing + + @equity_swap_dividend_payment_timing.setter + def equity_swap_dividend_payment_timing(self, equity_swap_dividend_payment_timing): + """Sets the equity_swap_dividend_payment_timing of this EquitySwapAllOf. + + Determines how the payment of dividends is handled for the equity swap. Defaults to paying at the next Equity coupon date. Supported string (enumeration) values are: [PayAtNextEquityCouponDate, PayAtMaturityOfSwap, PayAtNextFundingLegCouponDate, PayAtPaymentDateOfDividendEvent]. # noqa: E501 + + :param equity_swap_dividend_payment_timing: The equity_swap_dividend_payment_timing of this EquitySwapAllOf. # noqa: E501 + :type equity_swap_dividend_payment_timing: str + """ + + self._equity_swap_dividend_payment_timing = equity_swap_dividend_payment_timing + + @property + def instrument_type(self): + """Gets the instrument_type of this EquitySwapAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this EquitySwapAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this EquitySwapAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this EquitySwapAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquitySwapAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquitySwapAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_vol_surface_data.py b/sdk/lusid/models/equity_vol_surface_data.py new file mode 100644 index 00000000000..a8dddbf31b9 --- /dev/null +++ b/sdk/lusid/models/equity_vol_surface_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityVolSurfaceData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """EquityVolSurfaceData - a model defined in OpenAPI" + + :param base_date: Base date of the surface (required) + :type base_date: datetime + :param instruments: The set of instruments that define the surface. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this EquityVolSurfaceData. # noqa: E501 + + Base date of the surface # noqa: E501 + + :return: The base_date of this EquityVolSurfaceData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this EquityVolSurfaceData. + + Base date of the surface # noqa: E501 + + :param base_date: The base_date of this EquityVolSurfaceData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this EquityVolSurfaceData. # noqa: E501 + + The set of instruments that define the surface. # noqa: E501 + + :return: The instruments of this EquityVolSurfaceData. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this EquityVolSurfaceData. + + The set of instruments that define the surface. # noqa: E501 + + :param instruments: The instruments of this EquityVolSurfaceData. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this EquityVolSurfaceData. # noqa: E501 + + The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. # noqa: E501 + + :return: The quotes of this EquityVolSurfaceData. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this EquityVolSurfaceData. + + The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. # noqa: E501 + + :param quotes: The quotes of this EquityVolSurfaceData. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this EquityVolSurfaceData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this EquityVolSurfaceData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this EquityVolSurfaceData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this EquityVolSurfaceData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this EquityVolSurfaceData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this EquityVolSurfaceData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this EquityVolSurfaceData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this EquityVolSurfaceData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityVolSurfaceData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityVolSurfaceData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/equity_vol_surface_data_all_of.py b/sdk/lusid/models/equity_vol_surface_data_all_of.py new file mode 100644 index 00000000000..faa601ad9f5 --- /dev/null +++ b/sdk/lusid/models/equity_vol_surface_data_all_of.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class EquityVolSurfaceDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """EquityVolSurfaceDataAllOf - a model defined in OpenAPI" + + :param base_date: Base date of the surface (required) + :type base_date: datetime + :param instruments: The set of instruments that define the surface. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this EquityVolSurfaceDataAllOf. # noqa: E501 + + Base date of the surface # noqa: E501 + + :return: The base_date of this EquityVolSurfaceDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this EquityVolSurfaceDataAllOf. + + Base date of the surface # noqa: E501 + + :param base_date: The base_date of this EquityVolSurfaceDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this EquityVolSurfaceDataAllOf. # noqa: E501 + + The set of instruments that define the surface. # noqa: E501 + + :return: The instruments of this EquityVolSurfaceDataAllOf. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this EquityVolSurfaceDataAllOf. + + The set of instruments that define the surface. # noqa: E501 + + :param instruments: The instruments of this EquityVolSurfaceDataAllOf. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this EquityVolSurfaceDataAllOf. # noqa: E501 + + The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. # noqa: E501 + + :return: The quotes of this EquityVolSurfaceDataAllOf. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this EquityVolSurfaceDataAllOf. + + The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. # noqa: E501 + + :param quotes: The quotes of this EquityVolSurfaceDataAllOf. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this EquityVolSurfaceDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this EquityVolSurfaceDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this EquityVolSurfaceDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this EquityVolSurfaceDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this EquityVolSurfaceDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this EquityVolSurfaceDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this EquityVolSurfaceDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this EquityVolSurfaceDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EquityVolSurfaceDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EquityVolSurfaceDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/exchange_traded_option.py b/sdk/lusid/models/exchange_traded_option.py new file mode 100644 index 00000000000..1319695a0e3 --- /dev/null +++ b/sdk/lusid/models/exchange_traded_option.py @@ -0,0 +1,278 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ExchangeTradedOption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'contract_details': 'ExchangeTradedOptionContractDetails', + 'contracts': 'float', + 'ref_spot_price': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'contract_details': 'contractDetails', + 'contracts': 'contracts', + 'ref_spot_price': 'refSpotPrice', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'contract_details': 'required', + 'contracts': 'required', + 'ref_spot_price': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, contract_details=None, contracts=None, ref_spot_price=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ExchangeTradedOption - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param contract_details: (required) + :type contract_details: lusid.ExchangeTradedOptionContractDetails + :param contracts: The number of contracts held. (required) + :type contracts: float + :param ref_spot_price: The reference spot price for the option at which the contract was entered into. (required) + :type ref_spot_price: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._contract_details = None + self._contracts = None + self._ref_spot_price = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.contract_details = contract_details + self.contracts = contracts + self.ref_spot_price = ref_spot_price + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this ExchangeTradedOption. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this ExchangeTradedOption. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this ExchangeTradedOption. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this ExchangeTradedOption. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def contract_details(self): + """Gets the contract_details of this ExchangeTradedOption. # noqa: E501 + + + :return: The contract_details of this ExchangeTradedOption. # noqa: E501 + :rtype: lusid.ExchangeTradedOptionContractDetails + """ + return self._contract_details + + @contract_details.setter + def contract_details(self, contract_details): + """Sets the contract_details of this ExchangeTradedOption. + + + :param contract_details: The contract_details of this ExchangeTradedOption. # noqa: E501 + :type contract_details: lusid.ExchangeTradedOptionContractDetails + """ + if self.local_vars_configuration.client_side_validation and contract_details is None: # noqa: E501 + raise ValueError("Invalid value for `contract_details`, must not be `None`") # noqa: E501 + + self._contract_details = contract_details + + @property + def contracts(self): + """Gets the contracts of this ExchangeTradedOption. # noqa: E501 + + The number of contracts held. # noqa: E501 + + :return: The contracts of this ExchangeTradedOption. # noqa: E501 + :rtype: float + """ + return self._contracts + + @contracts.setter + def contracts(self, contracts): + """Sets the contracts of this ExchangeTradedOption. + + The number of contracts held. # noqa: E501 + + :param contracts: The contracts of this ExchangeTradedOption. # noqa: E501 + :type contracts: float + """ + if self.local_vars_configuration.client_side_validation and contracts is None: # noqa: E501 + raise ValueError("Invalid value for `contracts`, must not be `None`") # noqa: E501 + + self._contracts = contracts + + @property + def ref_spot_price(self): + """Gets the ref_spot_price of this ExchangeTradedOption. # noqa: E501 + + The reference spot price for the option at which the contract was entered into. # noqa: E501 + + :return: The ref_spot_price of this ExchangeTradedOption. # noqa: E501 + :rtype: float + """ + return self._ref_spot_price + + @ref_spot_price.setter + def ref_spot_price(self, ref_spot_price): + """Sets the ref_spot_price of this ExchangeTradedOption. + + The reference spot price for the option at which the contract was entered into. # noqa: E501 + + :param ref_spot_price: The ref_spot_price of this ExchangeTradedOption. # noqa: E501 + :type ref_spot_price: float + """ + if self.local_vars_configuration.client_side_validation and ref_spot_price is None: # noqa: E501 + raise ValueError("Invalid value for `ref_spot_price`, must not be `None`") # noqa: E501 + + self._ref_spot_price = ref_spot_price + + @property + def instrument_type(self): + """Gets the instrument_type of this ExchangeTradedOption. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ExchangeTradedOption. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ExchangeTradedOption. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ExchangeTradedOption. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExchangeTradedOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExchangeTradedOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/exchange_traded_option_all_of.py b/sdk/lusid/models/exchange_traded_option_all_of.py new file mode 100644 index 00000000000..2b617cb946d --- /dev/null +++ b/sdk/lusid/models/exchange_traded_option_all_of.py @@ -0,0 +1,278 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ExchangeTradedOptionAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'contract_details': 'ExchangeTradedOptionContractDetails', + 'contracts': 'float', + 'ref_spot_price': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'contract_details': 'contractDetails', + 'contracts': 'contracts', + 'ref_spot_price': 'refSpotPrice', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'contract_details': 'required', + 'contracts': 'required', + 'ref_spot_price': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, contract_details=None, contracts=None, ref_spot_price=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ExchangeTradedOptionAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param contract_details: (required) + :type contract_details: lusid.ExchangeTradedOptionContractDetails + :param contracts: The number of contracts held. (required) + :type contracts: float + :param ref_spot_price: The reference spot price for the option at which the contract was entered into. (required) + :type ref_spot_price: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._contract_details = None + self._contracts = None + self._ref_spot_price = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.contract_details = contract_details + self.contracts = contracts + self.ref_spot_price = ref_spot_price + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this ExchangeTradedOptionAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this ExchangeTradedOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this ExchangeTradedOptionAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this ExchangeTradedOptionAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def contract_details(self): + """Gets the contract_details of this ExchangeTradedOptionAllOf. # noqa: E501 + + + :return: The contract_details of this ExchangeTradedOptionAllOf. # noqa: E501 + :rtype: lusid.ExchangeTradedOptionContractDetails + """ + return self._contract_details + + @contract_details.setter + def contract_details(self, contract_details): + """Sets the contract_details of this ExchangeTradedOptionAllOf. + + + :param contract_details: The contract_details of this ExchangeTradedOptionAllOf. # noqa: E501 + :type contract_details: lusid.ExchangeTradedOptionContractDetails + """ + if self.local_vars_configuration.client_side_validation and contract_details is None: # noqa: E501 + raise ValueError("Invalid value for `contract_details`, must not be `None`") # noqa: E501 + + self._contract_details = contract_details + + @property + def contracts(self): + """Gets the contracts of this ExchangeTradedOptionAllOf. # noqa: E501 + + The number of contracts held. # noqa: E501 + + :return: The contracts of this ExchangeTradedOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._contracts + + @contracts.setter + def contracts(self, contracts): + """Sets the contracts of this ExchangeTradedOptionAllOf. + + The number of contracts held. # noqa: E501 + + :param contracts: The contracts of this ExchangeTradedOptionAllOf. # noqa: E501 + :type contracts: float + """ + if self.local_vars_configuration.client_side_validation and contracts is None: # noqa: E501 + raise ValueError("Invalid value for `contracts`, must not be `None`") # noqa: E501 + + self._contracts = contracts + + @property + def ref_spot_price(self): + """Gets the ref_spot_price of this ExchangeTradedOptionAllOf. # noqa: E501 + + The reference spot price for the option at which the contract was entered into. # noqa: E501 + + :return: The ref_spot_price of this ExchangeTradedOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._ref_spot_price + + @ref_spot_price.setter + def ref_spot_price(self, ref_spot_price): + """Sets the ref_spot_price of this ExchangeTradedOptionAllOf. + + The reference spot price for the option at which the contract was entered into. # noqa: E501 + + :param ref_spot_price: The ref_spot_price of this ExchangeTradedOptionAllOf. # noqa: E501 + :type ref_spot_price: float + """ + if self.local_vars_configuration.client_side_validation and ref_spot_price is None: # noqa: E501 + raise ValueError("Invalid value for `ref_spot_price`, must not be `None`") # noqa: E501 + + self._ref_spot_price = ref_spot_price + + @property + def instrument_type(self): + """Gets the instrument_type of this ExchangeTradedOptionAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ExchangeTradedOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ExchangeTradedOptionAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ExchangeTradedOptionAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExchangeTradedOptionAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExchangeTradedOptionAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/exchange_traded_option_contract_details.py b/sdk/lusid/models/exchange_traded_option_contract_details.py new file mode 100644 index 00000000000..2eb3b6e0d43 --- /dev/null +++ b/sdk/lusid/models/exchange_traded_option_contract_details.py @@ -0,0 +1,528 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ExchangeTradedOptionContractDetails(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'dom_ccy': 'str', + 'strike': 'float', + 'contract_size': 'float', + 'country': 'str', + 'delivery_type': 'str', + 'description': 'str', + 'exchange_code': 'str', + 'exercise_date': 'datetime', + 'exercise_type': 'str', + 'option_code': 'str', + 'option_type': 'str', + 'underlying': 'LusidInstrument', + 'underlying_code': 'str' + } + + attribute_map = { + 'dom_ccy': 'domCcy', + 'strike': 'strike', + 'contract_size': 'contractSize', + 'country': 'country', + 'delivery_type': 'deliveryType', + 'description': 'description', + 'exchange_code': 'exchangeCode', + 'exercise_date': 'exerciseDate', + 'exercise_type': 'exerciseType', + 'option_code': 'optionCode', + 'option_type': 'optionType', + 'underlying': 'underlying', + 'underlying_code': 'underlyingCode' + } + + required_map = { + 'dom_ccy': 'required', + 'strike': 'required', + 'contract_size': 'required', + 'country': 'required', + 'delivery_type': 'required', + 'description': 'required', + 'exchange_code': 'required', + 'exercise_date': 'required', + 'exercise_type': 'required', + 'option_code': 'required', + 'option_type': 'required', + 'underlying': 'required', + 'underlying_code': 'required' + } + + def __init__(self, dom_ccy=None, strike=None, contract_size=None, country=None, delivery_type=None, description=None, exchange_code=None, exercise_date=None, exercise_type=None, option_code=None, option_type=None, underlying=None, underlying_code=None, local_vars_configuration=None): # noqa: E501 + """ExchangeTradedOptionContractDetails - a model defined in OpenAPI" + + :param dom_ccy: Currency in which the contract is paid. (required) + :type dom_ccy: str + :param strike: The option strike, this can be negative for some options. (required) + :type strike: float + :param contract_size: Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. (required) + :type contract_size: float + :param country: Country (code) for the exchange. (required) + :type country: str + :param delivery_type: The delivery type, cash or physical. An option on a future is physically settled if upon exercising the holder receives a future. Supported string (enumeration) values are: [Cash, Physical]. (required) + :type delivery_type: str + :param description: Description of contract (required) + :type description: str + :param exchange_code: Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. (required) + :type exchange_code: str + :param exercise_date: Exercise Date. (required) + :type exercise_date: datetime + :param exercise_type: The exercise type, European, American or Bermudan. Supported string (enumeration) values are: [European, Bermudan, American]. (required) + :type exercise_type: str + :param option_code: Option Contract Code, typically one or two letters, e.g. OG => Option on Gold. (required) + :type option_code: str + :param option_type: The option type, Call or Put. Supported string (enumeration) values are: [Call, Put]. (required) + :type option_type: str + :param underlying: (required) + :type underlying: lusid.LusidInstrument + :param underlying_code: Code of the underlying, for an option on futures this should be the futures code. (required) + :type underlying_code: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._dom_ccy = None + self._strike = None + self._contract_size = None + self._country = None + self._delivery_type = None + self._description = None + self._exchange_code = None + self._exercise_date = None + self._exercise_type = None + self._option_code = None + self._option_type = None + self._underlying = None + self._underlying_code = None + self.discriminator = None + + self.dom_ccy = dom_ccy + self.strike = strike + self.contract_size = contract_size + self.country = country + self.delivery_type = delivery_type + self.description = description + self.exchange_code = exchange_code + self.exercise_date = exercise_date + self.exercise_type = exercise_type + self.option_code = option_code + self.option_type = option_type + self.underlying = underlying + self.underlying_code = underlying_code + + @property + def dom_ccy(self): + """Gets the dom_ccy of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Currency in which the contract is paid. # noqa: E501 + + :return: The dom_ccy of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this ExchangeTradedOptionContractDetails. + + Currency in which the contract is paid. # noqa: E501 + + :param dom_ccy: The dom_ccy of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def strike(self): + """Gets the strike of this ExchangeTradedOptionContractDetails. # noqa: E501 + + The option strike, this can be negative for some options. # noqa: E501 + + :return: The strike of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: float + """ + return self._strike + + @strike.setter + def strike(self, strike): + """Sets the strike of this ExchangeTradedOptionContractDetails. + + The option strike, this can be negative for some options. # noqa: E501 + + :param strike: The strike of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type strike: float + """ + if self.local_vars_configuration.client_side_validation and strike is None: # noqa: E501 + raise ValueError("Invalid value for `strike`, must not be `None`") # noqa: E501 + + self._strike = strike + + @property + def contract_size(self): + """Gets the contract_size of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. # noqa: E501 + + :return: The contract_size of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: float + """ + return self._contract_size + + @contract_size.setter + def contract_size(self, contract_size): + """Sets the contract_size of this ExchangeTradedOptionContractDetails. + + Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. # noqa: E501 + + :param contract_size: The contract_size of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type contract_size: float + """ + if self.local_vars_configuration.client_side_validation and contract_size is None: # noqa: E501 + raise ValueError("Invalid value for `contract_size`, must not be `None`") # noqa: E501 + + self._contract_size = contract_size + + @property + def country(self): + """Gets the country of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Country (code) for the exchange. # noqa: E501 + + :return: The country of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this ExchangeTradedOptionContractDetails. + + Country (code) for the exchange. # noqa: E501 + + :param country: The country of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type country: str + """ + if self.local_vars_configuration.client_side_validation and country is None: # noqa: E501 + raise ValueError("Invalid value for `country`, must not be `None`") # noqa: E501 + + self._country = country + + @property + def delivery_type(self): + """Gets the delivery_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + + The delivery type, cash or physical. An option on a future is physically settled if upon exercising the holder receives a future. Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :return: The delivery_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._delivery_type + + @delivery_type.setter + def delivery_type(self, delivery_type): + """Sets the delivery_type of this ExchangeTradedOptionContractDetails. + + The delivery type, cash or physical. An option on a future is physically settled if upon exercising the holder receives a future. Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :param delivery_type: The delivery_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type delivery_type: str + """ + if self.local_vars_configuration.client_side_validation and delivery_type is None: # noqa: E501 + raise ValueError("Invalid value for `delivery_type`, must not be `None`") # noqa: E501 + + self._delivery_type = delivery_type + + @property + def description(self): + """Gets the description of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Description of contract # noqa: E501 + + :return: The description of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ExchangeTradedOptionContractDetails. + + Description of contract # noqa: E501 + + :param description: The description of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type description: str + """ + if self.local_vars_configuration.client_side_validation and description is None: # noqa: E501 + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def exchange_code(self): + """Gets the exchange_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. # noqa: E501 + + :return: The exchange_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._exchange_code + + @exchange_code.setter + def exchange_code(self, exchange_code): + """Sets the exchange_code of this ExchangeTradedOptionContractDetails. + + Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. # noqa: E501 + + :param exchange_code: The exchange_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type exchange_code: str + """ + if self.local_vars_configuration.client_side_validation and exchange_code is None: # noqa: E501 + raise ValueError("Invalid value for `exchange_code`, must not be `None`") # noqa: E501 + + self._exchange_code = exchange_code + + @property + def exercise_date(self): + """Gets the exercise_date of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Exercise Date. # noqa: E501 + + :return: The exercise_date of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: datetime + """ + return self._exercise_date + + @exercise_date.setter + def exercise_date(self, exercise_date): + """Sets the exercise_date of this ExchangeTradedOptionContractDetails. + + Exercise Date. # noqa: E501 + + :param exercise_date: The exercise_date of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type exercise_date: datetime + """ + if self.local_vars_configuration.client_side_validation and exercise_date is None: # noqa: E501 + raise ValueError("Invalid value for `exercise_date`, must not be `None`") # noqa: E501 + + self._exercise_date = exercise_date + + @property + def exercise_type(self): + """Gets the exercise_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + + The exercise type, European, American or Bermudan. Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :return: The exercise_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._exercise_type + + @exercise_type.setter + def exercise_type(self, exercise_type): + """Sets the exercise_type of this ExchangeTradedOptionContractDetails. + + The exercise type, European, American or Bermudan. Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :param exercise_type: The exercise_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type exercise_type: str + """ + if self.local_vars_configuration.client_side_validation and exercise_type is None: # noqa: E501 + raise ValueError("Invalid value for `exercise_type`, must not be `None`") # noqa: E501 + + self._exercise_type = exercise_type + + @property + def option_code(self): + """Gets the option_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Option Contract Code, typically one or two letters, e.g. OG => Option on Gold. # noqa: E501 + + :return: The option_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._option_code + + @option_code.setter + def option_code(self, option_code): + """Sets the option_code of this ExchangeTradedOptionContractDetails. + + Option Contract Code, typically one or two letters, e.g. OG => Option on Gold. # noqa: E501 + + :param option_code: The option_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type option_code: str + """ + if self.local_vars_configuration.client_side_validation and option_code is None: # noqa: E501 + raise ValueError("Invalid value for `option_code`, must not be `None`") # noqa: E501 + + self._option_code = option_code + + @property + def option_type(self): + """Gets the option_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + + The option type, Call or Put. Supported string (enumeration) values are: [Call, Put]. # noqa: E501 + + :return: The option_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._option_type + + @option_type.setter + def option_type(self, option_type): + """Sets the option_type of this ExchangeTradedOptionContractDetails. + + The option type, Call or Put. Supported string (enumeration) values are: [Call, Put]. # noqa: E501 + + :param option_type: The option_type of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type option_type: str + """ + if self.local_vars_configuration.client_side_validation and option_type is None: # noqa: E501 + raise ValueError("Invalid value for `option_type`, must not be `None`") # noqa: E501 + + self._option_type = option_type + + @property + def underlying(self): + """Gets the underlying of this ExchangeTradedOptionContractDetails. # noqa: E501 + + + :return: The underlying of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: lusid.LusidInstrument + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this ExchangeTradedOptionContractDetails. + + + :param underlying: The underlying of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type underlying: lusid.LusidInstrument + """ + if self.local_vars_configuration.client_side_validation and underlying is None: # noqa: E501 + raise ValueError("Invalid value for `underlying`, must not be `None`") # noqa: E501 + + self._underlying = underlying + + @property + def underlying_code(self): + """Gets the underlying_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + + Code of the underlying, for an option on futures this should be the futures code. # noqa: E501 + + :return: The underlying_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + :rtype: str + """ + return self._underlying_code + + @underlying_code.setter + def underlying_code(self, underlying_code): + """Sets the underlying_code of this ExchangeTradedOptionContractDetails. + + Code of the underlying, for an option on futures this should be the futures code. # noqa: E501 + + :param underlying_code: The underlying_code of this ExchangeTradedOptionContractDetails. # noqa: E501 + :type underlying_code: str + """ + if self.local_vars_configuration.client_side_validation and underlying_code is None: # noqa: E501 + raise ValueError("Invalid value for `underlying_code`, must not be `None`") # noqa: E501 + + self._underlying_code = underlying_code + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExchangeTradedOptionContractDetails): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExchangeTradedOptionContractDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/exotic_instrument.py b/sdk/lusid/models/exotic_instrument.py new file mode 100644 index 00000000000..b89e7814a17 --- /dev/null +++ b/sdk/lusid/models/exotic_instrument.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ExoticInstrument(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instrument_format': 'InstrumentDefinitionFormat', + 'content': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'instrument_format': 'instrumentFormat', + 'content': 'content', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'instrument_format': 'required', + 'content': 'required', + 'instrument_type': 'required' + } + + def __init__(self, instrument_format=None, content=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ExoticInstrument - a model defined in OpenAPI" + + :param instrument_format: (required) + :type instrument_format: lusid.InstrumentDefinitionFormat + :param content: 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. (required) + :type content: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instrument_format = None + self._content = None + self._instrument_type = None + self.discriminator = None + + self.instrument_format = instrument_format + self.content = content + self.instrument_type = instrument_type + + @property + def instrument_format(self): + """Gets the instrument_format of this ExoticInstrument. # noqa: E501 + + + :return: The instrument_format of this ExoticInstrument. # noqa: E501 + :rtype: lusid.InstrumentDefinitionFormat + """ + return self._instrument_format + + @instrument_format.setter + def instrument_format(self, instrument_format): + """Sets the instrument_format of this ExoticInstrument. + + + :param instrument_format: The instrument_format of this ExoticInstrument. # noqa: E501 + :type instrument_format: lusid.InstrumentDefinitionFormat + """ + if self.local_vars_configuration.client_side_validation and instrument_format is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_format`, must not be `None`") # noqa: E501 + + self._instrument_format = instrument_format + + @property + def content(self): + """Gets the content of this ExoticInstrument. # noqa: E501 + + 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. # noqa: E501 + + :return: The content of this ExoticInstrument. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ExoticInstrument. + + 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. # noqa: E501 + + :param content: The content of this ExoticInstrument. # noqa: E501 + :type content: str + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def instrument_type(self): + """Gets the instrument_type of this ExoticInstrument. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ExoticInstrument. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ExoticInstrument. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ExoticInstrument. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExoticInstrument): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExoticInstrument): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/exotic_instrument_all_of.py b/sdk/lusid/models/exotic_instrument_all_of.py new file mode 100644 index 00000000000..ac8e5e74bc3 --- /dev/null +++ b/sdk/lusid/models/exotic_instrument_all_of.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ExoticInstrumentAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instrument_format': 'InstrumentDefinitionFormat', + 'content': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'instrument_format': 'instrumentFormat', + 'content': 'content', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'instrument_format': 'required', + 'content': 'required', + 'instrument_type': 'required' + } + + def __init__(self, instrument_format=None, content=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ExoticInstrumentAllOf - a model defined in OpenAPI" + + :param instrument_format: (required) + :type instrument_format: lusid.InstrumentDefinitionFormat + :param content: 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. (required) + :type content: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instrument_format = None + self._content = None + self._instrument_type = None + self.discriminator = None + + self.instrument_format = instrument_format + self.content = content + self.instrument_type = instrument_type + + @property + def instrument_format(self): + """Gets the instrument_format of this ExoticInstrumentAllOf. # noqa: E501 + + + :return: The instrument_format of this ExoticInstrumentAllOf. # noqa: E501 + :rtype: lusid.InstrumentDefinitionFormat + """ + return self._instrument_format + + @instrument_format.setter + def instrument_format(self, instrument_format): + """Sets the instrument_format of this ExoticInstrumentAllOf. + + + :param instrument_format: The instrument_format of this ExoticInstrumentAllOf. # noqa: E501 + :type instrument_format: lusid.InstrumentDefinitionFormat + """ + if self.local_vars_configuration.client_side_validation and instrument_format is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_format`, must not be `None`") # noqa: E501 + + self._instrument_format = instrument_format + + @property + def content(self): + """Gets the content of this ExoticInstrumentAllOf. # noqa: E501 + + 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. # noqa: E501 + + :return: The content of this ExoticInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ExoticInstrumentAllOf. + + 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. # noqa: E501 + + :param content: The content of this ExoticInstrumentAllOf. # noqa: E501 + :type content: str + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def instrument_type(self): + """Gets the instrument_type of this ExoticInstrumentAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ExoticInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ExoticInstrumentAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ExoticInstrumentAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExoticInstrumentAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExoticInstrumentAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fixed_leg.py b/sdk/lusid/models/fixed_leg.py new file mode 100644 index 00000000000..28f32b4494a --- /dev/null +++ b/sdk/lusid/models/fixed_leg.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FixedLeg(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'leg_definition': 'LegDefinition', + 'notional': 'float', + 'overrides': 'FixedLegAllOfOverrides', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'leg_definition': 'legDefinition', + 'notional': 'notional', + 'overrides': 'overrides', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'leg_definition': 'required', + 'notional': 'required', + 'overrides': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, leg_definition=None, notional=None, overrides=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FixedLeg - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param leg_definition: (required) + :type leg_definition: lusid.LegDefinition + :param notional: (required) + :type notional: float + :param overrides: + :type overrides: lusid.FixedLegAllOfOverrides + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._leg_definition = None + self._notional = None + self._overrides = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.leg_definition = leg_definition + self.notional = notional + self.overrides = overrides + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FixedLeg. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FixedLeg. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FixedLeg. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FixedLeg. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FixedLeg. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FixedLeg. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FixedLeg. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FixedLeg. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def leg_definition(self): + """Gets the leg_definition of this FixedLeg. # noqa: E501 + + + :return: The leg_definition of this FixedLeg. # noqa: E501 + :rtype: lusid.LegDefinition + """ + return self._leg_definition + + @leg_definition.setter + def leg_definition(self, leg_definition): + """Sets the leg_definition of this FixedLeg. + + + :param leg_definition: The leg_definition of this FixedLeg. # noqa: E501 + :type leg_definition: lusid.LegDefinition + """ + if self.local_vars_configuration.client_side_validation and leg_definition is None: # noqa: E501 + raise ValueError("Invalid value for `leg_definition`, must not be `None`") # noqa: E501 + + self._leg_definition = leg_definition + + @property + def notional(self): + """Gets the notional of this FixedLeg. # noqa: E501 + + + :return: The notional of this FixedLeg. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this FixedLeg. + + + :param notional: The notional of this FixedLeg. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def overrides(self): + """Gets the overrides of this FixedLeg. # noqa: E501 + + + :return: The overrides of this FixedLeg. # noqa: E501 + :rtype: lusid.FixedLegAllOfOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """Sets the overrides of this FixedLeg. + + + :param overrides: The overrides of this FixedLeg. # noqa: E501 + :type overrides: lusid.FixedLegAllOfOverrides + """ + + self._overrides = overrides + + @property + def instrument_type(self): + """Gets the instrument_type of this FixedLeg. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FixedLeg. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FixedLeg. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FixedLeg. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedLeg): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FixedLeg): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fixed_leg_all_of.py b/sdk/lusid/models/fixed_leg_all_of.py new file mode 100644 index 00000000000..5c92bf88a57 --- /dev/null +++ b/sdk/lusid/models/fixed_leg_all_of.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FixedLegAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'leg_definition': 'LegDefinition', + 'notional': 'float', + 'overrides': 'FixedLegAllOfOverrides', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'leg_definition': 'legDefinition', + 'notional': 'notional', + 'overrides': 'overrides', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'leg_definition': 'required', + 'notional': 'required', + 'overrides': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, leg_definition=None, notional=None, overrides=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FixedLegAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param leg_definition: (required) + :type leg_definition: lusid.LegDefinition + :param notional: (required) + :type notional: float + :param overrides: + :type overrides: lusid.FixedLegAllOfOverrides + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._leg_definition = None + self._notional = None + self._overrides = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.leg_definition = leg_definition + self.notional = notional + self.overrides = overrides + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FixedLegAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FixedLegAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FixedLegAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FixedLegAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FixedLegAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FixedLegAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FixedLegAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FixedLegAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def leg_definition(self): + """Gets the leg_definition of this FixedLegAllOf. # noqa: E501 + + + :return: The leg_definition of this FixedLegAllOf. # noqa: E501 + :rtype: lusid.LegDefinition + """ + return self._leg_definition + + @leg_definition.setter + def leg_definition(self, leg_definition): + """Sets the leg_definition of this FixedLegAllOf. + + + :param leg_definition: The leg_definition of this FixedLegAllOf. # noqa: E501 + :type leg_definition: lusid.LegDefinition + """ + if self.local_vars_configuration.client_side_validation and leg_definition is None: # noqa: E501 + raise ValueError("Invalid value for `leg_definition`, must not be `None`") # noqa: E501 + + self._leg_definition = leg_definition + + @property + def notional(self): + """Gets the notional of this FixedLegAllOf. # noqa: E501 + + + :return: The notional of this FixedLegAllOf. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this FixedLegAllOf. + + + :param notional: The notional of this FixedLegAllOf. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def overrides(self): + """Gets the overrides of this FixedLegAllOf. # noqa: E501 + + + :return: The overrides of this FixedLegAllOf. # noqa: E501 + :rtype: lusid.FixedLegAllOfOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """Sets the overrides of this FixedLegAllOf. + + + :param overrides: The overrides of this FixedLegAllOf. # noqa: E501 + :type overrides: lusid.FixedLegAllOfOverrides + """ + + self._overrides = overrides + + @property + def instrument_type(self): + """Gets the instrument_type of this FixedLegAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FixedLegAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FixedLegAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FixedLegAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedLegAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FixedLegAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fixed_leg_all_of_overrides.py b/sdk/lusid/models/fixed_leg_all_of_overrides.py new file mode 100644 index 00000000000..e33833ce2a0 --- /dev/null +++ b/sdk/lusid/models/fixed_leg_all_of_overrides.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FixedLegAllOfOverrides(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'amortization': 'list[float]', + 'spreads': 'list[float]' + } + + attribute_map = { + 'amortization': 'Amortization', + 'spreads': 'Spreads' + } + + required_map = { + 'amortization': 'optional', + 'spreads': 'optional' + } + + def __init__(self, amortization=None, spreads=None, local_vars_configuration=None): # noqa: E501 + """FixedLegAllOfOverrides - a model defined in OpenAPI" + + :param amortization: + :type amortization: list[float] + :param spreads: + :type spreads: list[float] + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._amortization = None + self._spreads = None + self.discriminator = None + + if amortization is not None: + self.amortization = amortization + if spreads is not None: + self.spreads = spreads + + @property + def amortization(self): + """Gets the amortization of this FixedLegAllOfOverrides. # noqa: E501 + + + :return: The amortization of this FixedLegAllOfOverrides. # noqa: E501 + :rtype: list[float] + """ + return self._amortization + + @amortization.setter + def amortization(self, amortization): + """Sets the amortization of this FixedLegAllOfOverrides. + + + :param amortization: The amortization of this FixedLegAllOfOverrides. # noqa: E501 + :type amortization: list[float] + """ + + self._amortization = amortization + + @property + def spreads(self): + """Gets the spreads of this FixedLegAllOfOverrides. # noqa: E501 + + + :return: The spreads of this FixedLegAllOfOverrides. # noqa: E501 + :rtype: list[float] + """ + return self._spreads + + @spreads.setter + def spreads(self, spreads): + """Sets the spreads of this FixedLegAllOfOverrides. + + + :param spreads: The spreads of this FixedLegAllOfOverrides. # noqa: E501 + :type spreads: list[float] + """ + + self._spreads = spreads + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedLegAllOfOverrides): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FixedLegAllOfOverrides): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/floating_leg.py b/sdk/lusid/models/floating_leg.py new file mode 100644 index 00000000000..c0985430f3b --- /dev/null +++ b/sdk/lusid/models/floating_leg.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FloatingLeg(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'leg_definition': 'LegDefinition', + 'notional': 'float', + 'overrides': 'FixedLegAllOfOverrides', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'leg_definition': 'legDefinition', + 'notional': 'notional', + 'overrides': 'overrides', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'leg_definition': 'required', + 'notional': 'required', + 'overrides': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, leg_definition=None, notional=None, overrides=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FloatingLeg - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param leg_definition: (required) + :type leg_definition: lusid.LegDefinition + :param notional: Scaling factor to apply to leg quantities. (required) + :type notional: float + :param overrides: + :type overrides: lusid.FixedLegAllOfOverrides + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._leg_definition = None + self._notional = None + self._overrides = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.leg_definition = leg_definition + self.notional = notional + self.overrides = overrides + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FloatingLeg. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FloatingLeg. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FloatingLeg. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FloatingLeg. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FloatingLeg. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FloatingLeg. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FloatingLeg. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FloatingLeg. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def leg_definition(self): + """Gets the leg_definition of this FloatingLeg. # noqa: E501 + + + :return: The leg_definition of this FloatingLeg. # noqa: E501 + :rtype: lusid.LegDefinition + """ + return self._leg_definition + + @leg_definition.setter + def leg_definition(self, leg_definition): + """Sets the leg_definition of this FloatingLeg. + + + :param leg_definition: The leg_definition of this FloatingLeg. # noqa: E501 + :type leg_definition: lusid.LegDefinition + """ + if self.local_vars_configuration.client_side_validation and leg_definition is None: # noqa: E501 + raise ValueError("Invalid value for `leg_definition`, must not be `None`") # noqa: E501 + + self._leg_definition = leg_definition + + @property + def notional(self): + """Gets the notional of this FloatingLeg. # noqa: E501 + + Scaling factor to apply to leg quantities. # noqa: E501 + + :return: The notional of this FloatingLeg. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this FloatingLeg. + + Scaling factor to apply to leg quantities. # noqa: E501 + + :param notional: The notional of this FloatingLeg. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def overrides(self): + """Gets the overrides of this FloatingLeg. # noqa: E501 + + + :return: The overrides of this FloatingLeg. # noqa: E501 + :rtype: lusid.FixedLegAllOfOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """Sets the overrides of this FloatingLeg. + + + :param overrides: The overrides of this FloatingLeg. # noqa: E501 + :type overrides: lusid.FixedLegAllOfOverrides + """ + + self._overrides = overrides + + @property + def instrument_type(self): + """Gets the instrument_type of this FloatingLeg. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FloatingLeg. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FloatingLeg. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FloatingLeg. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FloatingLeg): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FloatingLeg): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/floating_leg_all_of.py b/sdk/lusid/models/floating_leg_all_of.py new file mode 100644 index 00000000000..42a899c734b --- /dev/null +++ b/sdk/lusid/models/floating_leg_all_of.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FloatingLegAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'leg_definition': 'LegDefinition', + 'notional': 'float', + 'overrides': 'FixedLegAllOfOverrides', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'leg_definition': 'legDefinition', + 'notional': 'notional', + 'overrides': 'overrides', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'leg_definition': 'required', + 'notional': 'required', + 'overrides': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, leg_definition=None, notional=None, overrides=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FloatingLegAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param leg_definition: (required) + :type leg_definition: lusid.LegDefinition + :param notional: Scaling factor to apply to leg quantities. (required) + :type notional: float + :param overrides: + :type overrides: lusid.FixedLegAllOfOverrides + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._leg_definition = None + self._notional = None + self._overrides = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.leg_definition = leg_definition + self.notional = notional + self.overrides = overrides + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FloatingLegAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FloatingLegAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FloatingLegAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FloatingLegAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FloatingLegAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FloatingLegAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FloatingLegAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FloatingLegAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def leg_definition(self): + """Gets the leg_definition of this FloatingLegAllOf. # noqa: E501 + + + :return: The leg_definition of this FloatingLegAllOf. # noqa: E501 + :rtype: lusid.LegDefinition + """ + return self._leg_definition + + @leg_definition.setter + def leg_definition(self, leg_definition): + """Sets the leg_definition of this FloatingLegAllOf. + + + :param leg_definition: The leg_definition of this FloatingLegAllOf. # noqa: E501 + :type leg_definition: lusid.LegDefinition + """ + if self.local_vars_configuration.client_side_validation and leg_definition is None: # noqa: E501 + raise ValueError("Invalid value for `leg_definition`, must not be `None`") # noqa: E501 + + self._leg_definition = leg_definition + + @property + def notional(self): + """Gets the notional of this FloatingLegAllOf. # noqa: E501 + + Scaling factor to apply to leg quantities. # noqa: E501 + + :return: The notional of this FloatingLegAllOf. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this FloatingLegAllOf. + + Scaling factor to apply to leg quantities. # noqa: E501 + + :param notional: The notional of this FloatingLegAllOf. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def overrides(self): + """Gets the overrides of this FloatingLegAllOf. # noqa: E501 + + + :return: The overrides of this FloatingLegAllOf. # noqa: E501 + :rtype: lusid.FixedLegAllOfOverrides + """ + return self._overrides + + @overrides.setter + def overrides(self, overrides): + """Sets the overrides of this FloatingLegAllOf. + + + :param overrides: The overrides of this FloatingLegAllOf. # noqa: E501 + :type overrides: lusid.FixedLegAllOfOverrides + """ + + self._overrides = overrides + + @property + def instrument_type(self): + """Gets the instrument_type of this FloatingLegAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FloatingLegAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FloatingLegAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FloatingLegAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FloatingLegAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FloatingLegAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/flow_convention_name.py b/sdk/lusid/models/flow_convention_name.py new file mode 100644 index 00000000000..90556856218 --- /dev/null +++ b/sdk/lusid/models/flow_convention_name.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FlowConventionName(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'currency': 'str', + 'index_name': 'str', + 'tenor': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'index_name': 'indexName', + 'tenor': 'tenor' + } + + required_map = { + 'currency': 'required', + 'index_name': 'optional', + 'tenor': 'required' + } + + def __init__(self, currency=None, index_name=None, tenor=None, local_vars_configuration=None): # noqa: E501 + """FlowConventionName - a model defined in OpenAPI" + + :param currency: Currency of the flow convention name. (required) + :type currency: str + :param index_name: The index, if present, that is required. e.g. \"IBOR\", \"OIS\" or \"SONIA\". + :type index_name: str + :param tenor: Tenor for the convention name. (required) + :type tenor: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._index_name = None + self._tenor = None + self.discriminator = None + + self.currency = currency + self.index_name = index_name + self.tenor = tenor + + @property + def currency(self): + """Gets the currency of this FlowConventionName. # noqa: E501 + + Currency of the flow convention name. # noqa: E501 + + :return: The currency of this FlowConventionName. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this FlowConventionName. + + Currency of the flow convention name. # noqa: E501 + + :param currency: The currency of this FlowConventionName. # noqa: E501 + :type currency: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def index_name(self): + """Gets the index_name of this FlowConventionName. # noqa: E501 + + The index, if present, that is required. e.g. \"IBOR\", \"OIS\" or \"SONIA\". # noqa: E501 + + :return: The index_name of this FlowConventionName. # noqa: E501 + :rtype: str + """ + return self._index_name + + @index_name.setter + def index_name(self, index_name): + """Sets the index_name of this FlowConventionName. + + The index, if present, that is required. e.g. \"IBOR\", \"OIS\" or \"SONIA\". # noqa: E501 + + :param index_name: The index_name of this FlowConventionName. # noqa: E501 + :type index_name: str + """ + + self._index_name = index_name + + @property + def tenor(self): + """Gets the tenor of this FlowConventionName. # noqa: E501 + + Tenor for the convention name. # noqa: E501 + + :return: The tenor of this FlowConventionName. # noqa: E501 + :rtype: str + """ + return self._tenor + + @tenor.setter + def tenor(self, tenor): + """Sets the tenor of this FlowConventionName. + + Tenor for the convention name. # noqa: E501 + + :param tenor: The tenor of this FlowConventionName. # noqa: E501 + :type tenor: str + """ + if self.local_vars_configuration.client_side_validation and tenor is None: # noqa: E501 + raise ValueError("Invalid value for `tenor`, must not be `None`") # noqa: E501 + + self._tenor = tenor + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FlowConventionName): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlowConventionName): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/flow_conventions.py b/sdk/lusid/models/flow_conventions.py new file mode 100644 index 00000000000..404d444222a --- /dev/null +++ b/sdk/lusid/models/flow_conventions.py @@ -0,0 +1,496 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FlowConventions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'currency': 'str', + 'payment_frequency': 'str', + 'day_count_convention': 'str', + 'roll_convention': 'str', + 'payment_calendars': 'list[str]', + 'reset_calendars': 'list[str]', + 'settle_days': 'int', + 'reset_days': 'int', + 'leap_days_included': 'bool', + 'scope': 'str', + 'code': 'str' + } + + attribute_map = { + 'currency': 'currency', + 'payment_frequency': 'paymentFrequency', + 'day_count_convention': 'dayCountConvention', + 'roll_convention': 'rollConvention', + 'payment_calendars': 'paymentCalendars', + 'reset_calendars': 'resetCalendars', + 'settle_days': 'settleDays', + 'reset_days': 'resetDays', + 'leap_days_included': 'leapDaysIncluded', + 'scope': 'scope', + 'code': 'code' + } + + required_map = { + 'currency': 'required', + 'payment_frequency': 'required', + 'day_count_convention': 'required', + 'roll_convention': 'required', + 'payment_calendars': 'required', + 'reset_calendars': 'required', + 'settle_days': 'required', + 'reset_days': 'required', + 'leap_days_included': 'optional', + 'scope': 'optional', + 'code': 'optional' + } + + def __init__(self, currency=None, payment_frequency=None, day_count_convention=None, roll_convention=None, payment_calendars=None, reset_calendars=None, settle_days=None, reset_days=None, leap_days_included=None, scope=None, code=None, local_vars_configuration=None): # noqa: E501 + """FlowConventions - a model defined in OpenAPI" + + :param currency: Currency of the flow convention. (required) + :type currency: str + :param payment_frequency: When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. (required) + :type payment_frequency: str + :param day_count_convention: when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. (required) + :type day_count_convention: str + :param roll_convention: When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing]. (required) + :type roll_convention: str + :param payment_calendars: An array of strings denoting holiday calendars that apply to generation of payment schedules. (required) + :type payment_calendars: list[str] + :param reset_calendars: An array of strings denoting holiday calendars that apply to generation of reset schedules. (required) + :type reset_calendars: list[str] + :param settle_days: Number of Good Business Days between the trade date and the effective or settlement date of the instrument. (required) + :type settle_days: int + :param reset_days: The number of Good Business Days between determination and payment of reset. (required) + :type reset_days: int + :param leap_days_included: If this flag is set to true, the 29th of February is included in the date schedule when the business roll convention is applied. If this flag is set to false, the business roll convention ignores February 29 for date schedules, cash flow payments etc. This flag defaults to true if not specified, i.e., leap days are included in a date schedule generation. + :type leap_days_included: bool + :param scope: The scope used when updating or inserting the convention. + :type scope: str + :param code: The code of the convention. + :type code: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._currency = None + self._payment_frequency = None + self._day_count_convention = None + self._roll_convention = None + self._payment_calendars = None + self._reset_calendars = None + self._settle_days = None + self._reset_days = None + self._leap_days_included = None + self._scope = None + self._code = None + self.discriminator = None + + self.currency = currency + self.payment_frequency = payment_frequency + self.day_count_convention = day_count_convention + self.roll_convention = roll_convention + self.payment_calendars = payment_calendars + self.reset_calendars = reset_calendars + self.settle_days = settle_days + self.reset_days = reset_days + self.leap_days_included = leap_days_included + self.scope = scope + self.code = code + + @property + def currency(self): + """Gets the currency of this FlowConventions. # noqa: E501 + + Currency of the flow convention. # noqa: E501 + + :return: The currency of this FlowConventions. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this FlowConventions. + + Currency of the flow convention. # noqa: E501 + + :param currency: The currency of this FlowConventions. # noqa: E501 + :type currency: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def payment_frequency(self): + """Gets the payment_frequency of this FlowConventions. # noqa: E501 + + When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. # noqa: E501 + + :return: The payment_frequency of this FlowConventions. # noqa: E501 + :rtype: str + """ + return self._payment_frequency + + @payment_frequency.setter + def payment_frequency(self, payment_frequency): + """Sets the payment_frequency of this FlowConventions. + + When generating a multiperiod flow, or when the maturity of the flow is not given but the start date is, the tenor is the time-step from the anchor-date to the nominal maturity of the flow prior to any adjustment. # noqa: E501 + + :param payment_frequency: The payment_frequency of this FlowConventions. # noqa: E501 + :type payment_frequency: str + """ + if self.local_vars_configuration.client_side_validation and payment_frequency is None: # noqa: E501 + raise ValueError("Invalid value for `payment_frequency`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + payment_frequency is not None and len(payment_frequency) > 50): + raise ValueError("Invalid value for `payment_frequency`, length must be less than or equal to `50`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + payment_frequency is not None and len(payment_frequency) < 0): + raise ValueError("Invalid value for `payment_frequency`, length must be greater than or equal to `0`") # noqa: E501 + + self._payment_frequency = payment_frequency + + @property + def day_count_convention(self): + """Gets the day_count_convention of this FlowConventions. # noqa: E501 + + when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :return: The day_count_convention of this FlowConventions. # noqa: E501 + :rtype: str + """ + return self._day_count_convention + + @day_count_convention.setter + def day_count_convention(self, day_count_convention): + """Sets the day_count_convention of this FlowConventions. + + when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :param day_count_convention: The day_count_convention of this FlowConventions. # noqa: E501 + :type day_count_convention: str + """ + if self.local_vars_configuration.client_side_validation and day_count_convention is None: # noqa: E501 + raise ValueError("Invalid value for `day_count_convention`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + day_count_convention is not None and len(day_count_convention) > 50): + raise ValueError("Invalid value for `day_count_convention`, length must be less than or equal to `50`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + day_count_convention is not None and len(day_count_convention) < 0): + raise ValueError("Invalid value for `day_count_convention`, length must be greater than or equal to `0`") # noqa: E501 + + self._day_count_convention = day_count_convention + + @property + def roll_convention(self): + """Gets the roll_convention of this FlowConventions. # noqa: E501 + + When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing]. # noqa: E501 + + :return: The roll_convention of this FlowConventions. # noqa: E501 + :rtype: str + """ + return self._roll_convention + + @roll_convention.setter + def roll_convention(self, roll_convention): + """Sets the roll_convention of this FlowConventions. + + When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing]. # noqa: E501 + + :param roll_convention: The roll_convention of this FlowConventions. # noqa: E501 + :type roll_convention: str + """ + if self.local_vars_configuration.client_side_validation and roll_convention is None: # noqa: E501 + raise ValueError("Invalid value for `roll_convention`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + roll_convention is not None and len(roll_convention) > 50): + raise ValueError("Invalid value for `roll_convention`, length must be less than or equal to `50`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + roll_convention is not None and len(roll_convention) < 0): + raise ValueError("Invalid value for `roll_convention`, length must be greater than or equal to `0`") # noqa: E501 + + self._roll_convention = roll_convention + + @property + def payment_calendars(self): + """Gets the payment_calendars of this FlowConventions. # noqa: E501 + + An array of strings denoting holiday calendars that apply to generation of payment schedules. # noqa: E501 + + :return: The payment_calendars of this FlowConventions. # noqa: E501 + :rtype: list[str] + """ + return self._payment_calendars + + @payment_calendars.setter + def payment_calendars(self, payment_calendars): + """Sets the payment_calendars of this FlowConventions. + + An array of strings denoting holiday calendars that apply to generation of payment schedules. # noqa: E501 + + :param payment_calendars: The payment_calendars of this FlowConventions. # noqa: E501 + :type payment_calendars: list[str] + """ + if self.local_vars_configuration.client_side_validation and payment_calendars is None: # noqa: E501 + raise ValueError("Invalid value for `payment_calendars`, must not be `None`") # noqa: E501 + + self._payment_calendars = payment_calendars + + @property + def reset_calendars(self): + """Gets the reset_calendars of this FlowConventions. # noqa: E501 + + An array of strings denoting holiday calendars that apply to generation of reset schedules. # noqa: E501 + + :return: The reset_calendars of this FlowConventions. # noqa: E501 + :rtype: list[str] + """ + return self._reset_calendars + + @reset_calendars.setter + def reset_calendars(self, reset_calendars): + """Sets the reset_calendars of this FlowConventions. + + An array of strings denoting holiday calendars that apply to generation of reset schedules. # noqa: E501 + + :param reset_calendars: The reset_calendars of this FlowConventions. # noqa: E501 + :type reset_calendars: list[str] + """ + if self.local_vars_configuration.client_side_validation and reset_calendars is None: # noqa: E501 + raise ValueError("Invalid value for `reset_calendars`, must not be `None`") # noqa: E501 + + self._reset_calendars = reset_calendars + + @property + def settle_days(self): + """Gets the settle_days of this FlowConventions. # noqa: E501 + + Number of Good Business Days between the trade date and the effective or settlement date of the instrument. # noqa: E501 + + :return: The settle_days of this FlowConventions. # noqa: E501 + :rtype: int + """ + return self._settle_days + + @settle_days.setter + def settle_days(self, settle_days): + """Sets the settle_days of this FlowConventions. + + Number of Good Business Days between the trade date and the effective or settlement date of the instrument. # noqa: E501 + + :param settle_days: The settle_days of this FlowConventions. # noqa: E501 + :type settle_days: int + """ + if self.local_vars_configuration.client_side_validation and settle_days is None: # noqa: E501 + raise ValueError("Invalid value for `settle_days`, must not be `None`") # noqa: E501 + + self._settle_days = settle_days + + @property + def reset_days(self): + """Gets the reset_days of this FlowConventions. # noqa: E501 + + The number of Good Business Days between determination and payment of reset. # noqa: E501 + + :return: The reset_days of this FlowConventions. # noqa: E501 + :rtype: int + """ + return self._reset_days + + @reset_days.setter + def reset_days(self, reset_days): + """Sets the reset_days of this FlowConventions. + + The number of Good Business Days between determination and payment of reset. # noqa: E501 + + :param reset_days: The reset_days of this FlowConventions. # noqa: E501 + :type reset_days: int + """ + if self.local_vars_configuration.client_side_validation and reset_days is None: # noqa: E501 + raise ValueError("Invalid value for `reset_days`, must not be `None`") # noqa: E501 + + self._reset_days = reset_days + + @property + def leap_days_included(self): + """Gets the leap_days_included of this FlowConventions. # noqa: E501 + + If this flag is set to true, the 29th of February is included in the date schedule when the business roll convention is applied. If this flag is set to false, the business roll convention ignores February 29 for date schedules, cash flow payments etc. This flag defaults to true if not specified, i.e., leap days are included in a date schedule generation. # noqa: E501 + + :return: The leap_days_included of this FlowConventions. # noqa: E501 + :rtype: bool + """ + return self._leap_days_included + + @leap_days_included.setter + def leap_days_included(self, leap_days_included): + """Sets the leap_days_included of this FlowConventions. + + If this flag is set to true, the 29th of February is included in the date schedule when the business roll convention is applied. If this flag is set to false, the business roll convention ignores February 29 for date schedules, cash flow payments etc. This flag defaults to true if not specified, i.e., leap days are included in a date schedule generation. # noqa: E501 + + :param leap_days_included: The leap_days_included of this FlowConventions. # noqa: E501 + :type leap_days_included: bool + """ + + self._leap_days_included = leap_days_included + + @property + def scope(self): + """Gets the scope of this FlowConventions. # noqa: E501 + + The scope used when updating or inserting the convention. # noqa: E501 + + :return: The scope of this FlowConventions. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this FlowConventions. + + The scope used when updating or inserting the convention. # noqa: E501 + + :param scope: The scope of this FlowConventions. # noqa: E501 + :type scope: str + """ + if (self.local_vars_configuration.client_side_validation and + scope is not None and len(scope) > 256): + raise ValueError("Invalid value for `scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + scope is not None and len(scope) < 1): + raise ValueError("Invalid value for `scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', scope)): # noqa: E501 + raise ValueError(r"Invalid value for `scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._scope = scope + + @property + def code(self): + """Gets the code of this FlowConventions. # noqa: E501 + + The code of the convention. # noqa: E501 + + :return: The code of this FlowConventions. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this FlowConventions. + + The code of the convention. # noqa: E501 + + :param code: The code of this FlowConventions. # noqa: E501 + :type code: str + """ + if (self.local_vars_configuration.client_side_validation and + code is not None and len(code) > 256): + raise ValueError("Invalid value for `code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and len(code) < 1): + raise ValueError("Invalid value for `code`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', code)): # noqa: E501 + raise ValueError(r"Invalid value for `code`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._code = code + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FlowConventions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlowConventions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/forward_rate_agreement.py b/sdk/lusid/models/forward_rate_agreement.py new file mode 100644 index 00000000000..5df0ce4aee7 --- /dev/null +++ b/sdk/lusid/models/forward_rate_agreement.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ForwardRateAgreement(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'fixing_date': 'datetime', + 'fra_rate': 'float', + 'notional': 'float', + 'index_convention': 'IndexConvention', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'fixing_date': 'fixingDate', + 'fra_rate': 'fraRate', + 'notional': 'notional', + 'index_convention': 'indexConvention', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_ccy': 'required', + 'fixing_date': 'required', + 'fra_rate': 'required', + 'notional': 'required', + 'index_convention': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_ccy=None, fixing_date=None, fra_rate=None, notional=None, index_convention=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ForwardRateAgreement - a model defined in OpenAPI" + + :param start_date: The settlement date of the FRA (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. (required) + :type maturity_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param fixing_date: The date at which the rate to be paid, the reference rate, is confirmed/observed. (required) + :type fixing_date: datetime + :param fra_rate: The rate at which the FRA is traded. (required) + :type fra_rate: float + :param notional: The amount for which the FRA is traded. (required) + :type notional: float + :param index_convention: + :type index_convention: lusid.IndexConvention + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_ccy = None + self._fixing_date = None + self._fra_rate = None + self._notional = None + self._index_convention = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.fixing_date = fixing_date + self.fra_rate = fra_rate + self.notional = notional + if index_convention is not None: + self.index_convention = index_convention + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this ForwardRateAgreement. # noqa: E501 + + The settlement date of the FRA # noqa: E501 + + :return: The start_date of this ForwardRateAgreement. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this ForwardRateAgreement. + + The settlement date of the FRA # noqa: E501 + + :param start_date: The start_date of this ForwardRateAgreement. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this ForwardRateAgreement. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :return: The maturity_date of this ForwardRateAgreement. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this ForwardRateAgreement. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :param maturity_date: The maturity_date of this ForwardRateAgreement. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this ForwardRateAgreement. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this ForwardRateAgreement. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this ForwardRateAgreement. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this ForwardRateAgreement. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fixing_date(self): + """Gets the fixing_date of this ForwardRateAgreement. # noqa: E501 + + The date at which the rate to be paid, the reference rate, is confirmed/observed. # noqa: E501 + + :return: The fixing_date of this ForwardRateAgreement. # noqa: E501 + :rtype: datetime + """ + return self._fixing_date + + @fixing_date.setter + def fixing_date(self, fixing_date): + """Sets the fixing_date of this ForwardRateAgreement. + + The date at which the rate to be paid, the reference rate, is confirmed/observed. # noqa: E501 + + :param fixing_date: The fixing_date of this ForwardRateAgreement. # noqa: E501 + :type fixing_date: datetime + """ + if self.local_vars_configuration.client_side_validation and fixing_date is None: # noqa: E501 + raise ValueError("Invalid value for `fixing_date`, must not be `None`") # noqa: E501 + + self._fixing_date = fixing_date + + @property + def fra_rate(self): + """Gets the fra_rate of this ForwardRateAgreement. # noqa: E501 + + The rate at which the FRA is traded. # noqa: E501 + + :return: The fra_rate of this ForwardRateAgreement. # noqa: E501 + :rtype: float + """ + return self._fra_rate + + @fra_rate.setter + def fra_rate(self, fra_rate): + """Sets the fra_rate of this ForwardRateAgreement. + + The rate at which the FRA is traded. # noqa: E501 + + :param fra_rate: The fra_rate of this ForwardRateAgreement. # noqa: E501 + :type fra_rate: float + """ + if self.local_vars_configuration.client_side_validation and fra_rate is None: # noqa: E501 + raise ValueError("Invalid value for `fra_rate`, must not be `None`") # noqa: E501 + + self._fra_rate = fra_rate + + @property + def notional(self): + """Gets the notional of this ForwardRateAgreement. # noqa: E501 + + The amount for which the FRA is traded. # noqa: E501 + + :return: The notional of this ForwardRateAgreement. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this ForwardRateAgreement. + + The amount for which the FRA is traded. # noqa: E501 + + :param notional: The notional of this ForwardRateAgreement. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def index_convention(self): + """Gets the index_convention of this ForwardRateAgreement. # noqa: E501 + + + :return: The index_convention of this ForwardRateAgreement. # noqa: E501 + :rtype: lusid.IndexConvention + """ + return self._index_convention + + @index_convention.setter + def index_convention(self, index_convention): + """Sets the index_convention of this ForwardRateAgreement. + + + :param index_convention: The index_convention of this ForwardRateAgreement. # noqa: E501 + :type index_convention: lusid.IndexConvention + """ + + self._index_convention = index_convention + + @property + def instrument_type(self): + """Gets the instrument_type of this ForwardRateAgreement. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ForwardRateAgreement. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ForwardRateAgreement. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ForwardRateAgreement. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ForwardRateAgreement): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ForwardRateAgreement): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/forward_rate_agreement_all_of.py b/sdk/lusid/models/forward_rate_agreement_all_of.py new file mode 100644 index 00000000000..8d816c14baf --- /dev/null +++ b/sdk/lusid/models/forward_rate_agreement_all_of.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ForwardRateAgreementAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'fixing_date': 'datetime', + 'fra_rate': 'float', + 'notional': 'float', + 'index_convention': 'IndexConvention', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'fixing_date': 'fixingDate', + 'fra_rate': 'fraRate', + 'notional': 'notional', + 'index_convention': 'indexConvention', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_ccy': 'required', + 'fixing_date': 'required', + 'fra_rate': 'required', + 'notional': 'required', + 'index_convention': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_ccy=None, fixing_date=None, fra_rate=None, notional=None, index_convention=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ForwardRateAgreementAllOf - a model defined in OpenAPI" + + :param start_date: The settlement date of the FRA (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. (required) + :type maturity_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param fixing_date: The date at which the rate to be paid, the reference rate, is confirmed/observed. (required) + :type fixing_date: datetime + :param fra_rate: The rate at which the FRA is traded. (required) + :type fra_rate: float + :param notional: The amount for which the FRA is traded. (required) + :type notional: float + :param index_convention: + :type index_convention: lusid.IndexConvention + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_ccy = None + self._fixing_date = None + self._fra_rate = None + self._notional = None + self._index_convention = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.fixing_date = fixing_date + self.fra_rate = fra_rate + self.notional = notional + if index_convention is not None: + self.index_convention = index_convention + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this ForwardRateAgreementAllOf. # noqa: E501 + + The settlement date of the FRA # noqa: E501 + + :return: The start_date of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this ForwardRateAgreementAllOf. + + The settlement date of the FRA # noqa: E501 + + :param start_date: The start_date of this ForwardRateAgreementAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this ForwardRateAgreementAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :return: The maturity_date of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this ForwardRateAgreementAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :param maturity_date: The maturity_date of this ForwardRateAgreementAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this ForwardRateAgreementAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this ForwardRateAgreementAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this ForwardRateAgreementAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fixing_date(self): + """Gets the fixing_date of this ForwardRateAgreementAllOf. # noqa: E501 + + The date at which the rate to be paid, the reference rate, is confirmed/observed. # noqa: E501 + + :return: The fixing_date of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: datetime + """ + return self._fixing_date + + @fixing_date.setter + def fixing_date(self, fixing_date): + """Sets the fixing_date of this ForwardRateAgreementAllOf. + + The date at which the rate to be paid, the reference rate, is confirmed/observed. # noqa: E501 + + :param fixing_date: The fixing_date of this ForwardRateAgreementAllOf. # noqa: E501 + :type fixing_date: datetime + """ + if self.local_vars_configuration.client_side_validation and fixing_date is None: # noqa: E501 + raise ValueError("Invalid value for `fixing_date`, must not be `None`") # noqa: E501 + + self._fixing_date = fixing_date + + @property + def fra_rate(self): + """Gets the fra_rate of this ForwardRateAgreementAllOf. # noqa: E501 + + The rate at which the FRA is traded. # noqa: E501 + + :return: The fra_rate of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: float + """ + return self._fra_rate + + @fra_rate.setter + def fra_rate(self, fra_rate): + """Sets the fra_rate of this ForwardRateAgreementAllOf. + + The rate at which the FRA is traded. # noqa: E501 + + :param fra_rate: The fra_rate of this ForwardRateAgreementAllOf. # noqa: E501 + :type fra_rate: float + """ + if self.local_vars_configuration.client_side_validation and fra_rate is None: # noqa: E501 + raise ValueError("Invalid value for `fra_rate`, must not be `None`") # noqa: E501 + + self._fra_rate = fra_rate + + @property + def notional(self): + """Gets the notional of this ForwardRateAgreementAllOf. # noqa: E501 + + The amount for which the FRA is traded. # noqa: E501 + + :return: The notional of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this ForwardRateAgreementAllOf. + + The amount for which the FRA is traded. # noqa: E501 + + :param notional: The notional of this ForwardRateAgreementAllOf. # noqa: E501 + :type notional: float + """ + if self.local_vars_configuration.client_side_validation and notional is None: # noqa: E501 + raise ValueError("Invalid value for `notional`, must not be `None`") # noqa: E501 + + self._notional = notional + + @property + def index_convention(self): + """Gets the index_convention of this ForwardRateAgreementAllOf. # noqa: E501 + + + :return: The index_convention of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: lusid.IndexConvention + """ + return self._index_convention + + @index_convention.setter + def index_convention(self, index_convention): + """Sets the index_convention of this ForwardRateAgreementAllOf. + + + :param index_convention: The index_convention of this ForwardRateAgreementAllOf. # noqa: E501 + :type index_convention: lusid.IndexConvention + """ + + self._index_convention = index_convention + + @property + def instrument_type(self): + """Gets the instrument_type of this ForwardRateAgreementAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ForwardRateAgreementAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ForwardRateAgreementAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ForwardRateAgreementAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ForwardRateAgreementAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ForwardRateAgreementAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/funding_leg.py b/sdk/lusid/models/funding_leg.py new file mode 100644 index 00000000000..4892f6162d3 --- /dev/null +++ b/sdk/lusid/models/funding_leg.py @@ -0,0 +1,276 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FundingLeg(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'leg_definition': 'LegDefinition', + 'notional': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'leg_definition': 'legDefinition', + 'notional': 'notional', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'leg_definition': 'required', + 'notional': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, leg_definition=None, notional=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FundingLeg - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. (required) + :type maturity_date: datetime + :param leg_definition: (required) + :type leg_definition: lusid.LegDefinition + :param notional: The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ + :type notional: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._leg_definition = None + self._notional = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.leg_definition = leg_definition + self.notional = notional + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FundingLeg. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FundingLeg. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FundingLeg. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FundingLeg. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FundingLeg. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :return: The maturity_date of this FundingLeg. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FundingLeg. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :param maturity_date: The maturity_date of this FundingLeg. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def leg_definition(self): + """Gets the leg_definition of this FundingLeg. # noqa: E501 + + + :return: The leg_definition of this FundingLeg. # noqa: E501 + :rtype: lusid.LegDefinition + """ + return self._leg_definition + + @leg_definition.setter + def leg_definition(self, leg_definition): + """Sets the leg_definition of this FundingLeg. + + + :param leg_definition: The leg_definition of this FundingLeg. # noqa: E501 + :type leg_definition: lusid.LegDefinition + """ + if self.local_vars_configuration.client_side_validation and leg_definition is None: # noqa: E501 + raise ValueError("Invalid value for `leg_definition`, must not be `None`") # noqa: E501 + + self._leg_definition = leg_definition + + @property + def notional(self): + """Gets the notional of this FundingLeg. # noqa: E501 + + The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ # noqa: E501 + + :return: The notional of this FundingLeg. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this FundingLeg. + + The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ # noqa: E501 + + :param notional: The notional of this FundingLeg. # noqa: E501 + :type notional: float + """ + + self._notional = notional + + @property + def instrument_type(self): + """Gets the instrument_type of this FundingLeg. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FundingLeg. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FundingLeg. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FundingLeg. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FundingLeg): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FundingLeg): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/funding_leg_all_of.py b/sdk/lusid/models/funding_leg_all_of.py new file mode 100644 index 00000000000..b6b14d71822 --- /dev/null +++ b/sdk/lusid/models/funding_leg_all_of.py @@ -0,0 +1,276 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FundingLegAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'leg_definition': 'LegDefinition', + 'notional': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'leg_definition': 'legDefinition', + 'notional': 'notional', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'leg_definition': 'required', + 'notional': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, leg_definition=None, notional=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FundingLegAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. (required) + :type maturity_date: datetime + :param leg_definition: (required) + :type leg_definition: lusid.LegDefinition + :param notional: The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ + :type notional: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._leg_definition = None + self._notional = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.leg_definition = leg_definition + self.notional = notional + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FundingLegAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FundingLegAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FundingLegAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FundingLegAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FundingLegAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :return: The maturity_date of this FundingLegAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FundingLegAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date. # noqa: E501 + + :param maturity_date: The maturity_date of this FundingLegAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def leg_definition(self): + """Gets the leg_definition of this FundingLegAllOf. # noqa: E501 + + + :return: The leg_definition of this FundingLegAllOf. # noqa: E501 + :rtype: lusid.LegDefinition + """ + return self._leg_definition + + @leg_definition.setter + def leg_definition(self, leg_definition): + """Sets the leg_definition of this FundingLegAllOf. + + + :param leg_definition: The leg_definition of this FundingLegAllOf. # noqa: E501 + :type leg_definition: lusid.LegDefinition + """ + if self.local_vars_configuration.client_side_validation and leg_definition is None: # noqa: E501 + raise ValueError("Invalid value for `leg_definition`, must not be `None`") # noqa: E501 + + self._leg_definition = leg_definition + + @property + def notional(self): + """Gets the notional of this FundingLegAllOf. # noqa: E501 + + The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ # noqa: E501 + + :return: The notional of this FundingLegAllOf. # noqa: E501 + :rtype: float + """ + return self._notional + + @notional.setter + def notional(self, notional): + """Sets the notional of this FundingLegAllOf. + + The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/ # noqa: E501 + + :param notional: The notional of this FundingLegAllOf. # noqa: E501 + :type notional: float + """ + + self._notional = notional + + @property + def instrument_type(self): + """Gets the instrument_type of this FundingLegAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FundingLegAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FundingLegAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FundingLegAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FundingLegAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FundingLegAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/future.py b/sdk/lusid/models/future.py new file mode 100644 index 00000000000..6c8fb5c639f --- /dev/null +++ b/sdk/lusid/models/future.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Future(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'identifiers': 'dict(str, str)', + 'contract_details': 'FuturesContractDetails', + 'contracts': 'float', + 'ref_spot_price': 'float', + 'underlying': 'LusidInstrument', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'identifiers': 'identifiers', + 'contract_details': 'contractDetails', + 'contracts': 'contracts', + 'ref_spot_price': 'refSpotPrice', + 'underlying': 'underlying', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'identifiers': 'required', + 'contract_details': 'required', + 'contracts': 'optional', + 'ref_spot_price': 'optional', + 'underlying': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, identifiers=None, contract_details=None, contracts=None, ref_spot_price=None, underlying=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """Future - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param identifiers: External market codes and identifiers for the bond, e.g. ISIN. (required) + :type identifiers: dict(str, str) + :param contract_details: (required) + :type contract_details: lusid.FuturesContractDetails + :param contracts: The number of contracts held. + :type contracts: float + :param ref_spot_price: The reference spot price for the future at which the contract was entered into. + :type ref_spot_price: float + :param underlying: + :type underlying: lusid.LusidInstrument + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._identifiers = None + self._contract_details = None + self._contracts = None + self._ref_spot_price = None + self._underlying = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.identifiers = identifiers + self.contract_details = contract_details + if contracts is not None: + self.contracts = contracts + if ref_spot_price is not None: + self.ref_spot_price = ref_spot_price + if underlying is not None: + self.underlying = underlying + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this Future. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this Future. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this Future. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this Future. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this Future. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this Future. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this Future. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this Future. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def identifiers(self): + """Gets the identifiers of this Future. # noqa: E501 + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this Future. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this Future. + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this Future. # noqa: E501 + :type identifiers: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and identifiers is None: # noqa: E501 + raise ValueError("Invalid value for `identifiers`, must not be `None`") # noqa: E501 + + self._identifiers = identifiers + + @property + def contract_details(self): + """Gets the contract_details of this Future. # noqa: E501 + + + :return: The contract_details of this Future. # noqa: E501 + :rtype: lusid.FuturesContractDetails + """ + return self._contract_details + + @contract_details.setter + def contract_details(self, contract_details): + """Sets the contract_details of this Future. + + + :param contract_details: The contract_details of this Future. # noqa: E501 + :type contract_details: lusid.FuturesContractDetails + """ + if self.local_vars_configuration.client_side_validation and contract_details is None: # noqa: E501 + raise ValueError("Invalid value for `contract_details`, must not be `None`") # noqa: E501 + + self._contract_details = contract_details + + @property + def contracts(self): + """Gets the contracts of this Future. # noqa: E501 + + The number of contracts held. # noqa: E501 + + :return: The contracts of this Future. # noqa: E501 + :rtype: float + """ + return self._contracts + + @contracts.setter + def contracts(self, contracts): + """Sets the contracts of this Future. + + The number of contracts held. # noqa: E501 + + :param contracts: The contracts of this Future. # noqa: E501 + :type contracts: float + """ + + self._contracts = contracts + + @property + def ref_spot_price(self): + """Gets the ref_spot_price of this Future. # noqa: E501 + + The reference spot price for the future at which the contract was entered into. # noqa: E501 + + :return: The ref_spot_price of this Future. # noqa: E501 + :rtype: float + """ + return self._ref_spot_price + + @ref_spot_price.setter + def ref_spot_price(self, ref_spot_price): + """Sets the ref_spot_price of this Future. + + The reference spot price for the future at which the contract was entered into. # noqa: E501 + + :param ref_spot_price: The ref_spot_price of this Future. # noqa: E501 + :type ref_spot_price: float + """ + + self._ref_spot_price = ref_spot_price + + @property + def underlying(self): + """Gets the underlying of this Future. # noqa: E501 + + + :return: The underlying of this Future. # noqa: E501 + :rtype: lusid.LusidInstrument + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this Future. + + + :param underlying: The underlying of this Future. # noqa: E501 + :type underlying: lusid.LusidInstrument + """ + + self._underlying = underlying + + @property + def instrument_type(self): + """Gets the instrument_type of this Future. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this Future. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this Future. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this Future. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Future): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Future): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/future_all_of.py b/sdk/lusid/models/future_all_of.py new file mode 100644 index 00000000000..54cf3ed22e3 --- /dev/null +++ b/sdk/lusid/models/future_all_of.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FutureAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'identifiers': 'dict(str, str)', + 'contract_details': 'FuturesContractDetails', + 'contracts': 'float', + 'ref_spot_price': 'float', + 'underlying': 'LusidInstrument', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'identifiers': 'identifiers', + 'contract_details': 'contractDetails', + 'contracts': 'contracts', + 'ref_spot_price': 'refSpotPrice', + 'underlying': 'underlying', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'identifiers': 'required', + 'contract_details': 'required', + 'contracts': 'optional', + 'ref_spot_price': 'optional', + 'underlying': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, identifiers=None, contract_details=None, contracts=None, ref_spot_price=None, underlying=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FutureAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param identifiers: External market codes and identifiers for the bond, e.g. ISIN. (required) + :type identifiers: dict(str, str) + :param contract_details: (required) + :type contract_details: lusid.FuturesContractDetails + :param contracts: The number of contracts held. + :type contracts: float + :param ref_spot_price: The reference spot price for the future at which the contract was entered into. + :type ref_spot_price: float + :param underlying: + :type underlying: lusid.LusidInstrument + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._identifiers = None + self._contract_details = None + self._contracts = None + self._ref_spot_price = None + self._underlying = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.identifiers = identifiers + self.contract_details = contract_details + if contracts is not None: + self.contracts = contracts + if ref_spot_price is not None: + self.ref_spot_price = ref_spot_price + if underlying is not None: + self.underlying = underlying + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FutureAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FutureAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FutureAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FutureAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FutureAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FutureAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FutureAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FutureAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def identifiers(self): + """Gets the identifiers of this FutureAllOf. # noqa: E501 + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this FutureAllOf. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this FutureAllOf. + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this FutureAllOf. # noqa: E501 + :type identifiers: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and identifiers is None: # noqa: E501 + raise ValueError("Invalid value for `identifiers`, must not be `None`") # noqa: E501 + + self._identifiers = identifiers + + @property + def contract_details(self): + """Gets the contract_details of this FutureAllOf. # noqa: E501 + + + :return: The contract_details of this FutureAllOf. # noqa: E501 + :rtype: lusid.FuturesContractDetails + """ + return self._contract_details + + @contract_details.setter + def contract_details(self, contract_details): + """Sets the contract_details of this FutureAllOf. + + + :param contract_details: The contract_details of this FutureAllOf. # noqa: E501 + :type contract_details: lusid.FuturesContractDetails + """ + if self.local_vars_configuration.client_side_validation and contract_details is None: # noqa: E501 + raise ValueError("Invalid value for `contract_details`, must not be `None`") # noqa: E501 + + self._contract_details = contract_details + + @property + def contracts(self): + """Gets the contracts of this FutureAllOf. # noqa: E501 + + The number of contracts held. # noqa: E501 + + :return: The contracts of this FutureAllOf. # noqa: E501 + :rtype: float + """ + return self._contracts + + @contracts.setter + def contracts(self, contracts): + """Sets the contracts of this FutureAllOf. + + The number of contracts held. # noqa: E501 + + :param contracts: The contracts of this FutureAllOf. # noqa: E501 + :type contracts: float + """ + + self._contracts = contracts + + @property + def ref_spot_price(self): + """Gets the ref_spot_price of this FutureAllOf. # noqa: E501 + + The reference spot price for the future at which the contract was entered into. # noqa: E501 + + :return: The ref_spot_price of this FutureAllOf. # noqa: E501 + :rtype: float + """ + return self._ref_spot_price + + @ref_spot_price.setter + def ref_spot_price(self, ref_spot_price): + """Sets the ref_spot_price of this FutureAllOf. + + The reference spot price for the future at which the contract was entered into. # noqa: E501 + + :param ref_spot_price: The ref_spot_price of this FutureAllOf. # noqa: E501 + :type ref_spot_price: float + """ + + self._ref_spot_price = ref_spot_price + + @property + def underlying(self): + """Gets the underlying of this FutureAllOf. # noqa: E501 + + + :return: The underlying of this FutureAllOf. # noqa: E501 + :rtype: lusid.LusidInstrument + """ + return self._underlying + + @underlying.setter + def underlying(self, underlying): + """Sets the underlying of this FutureAllOf. + + + :param underlying: The underlying of this FutureAllOf. # noqa: E501 + :type underlying: lusid.LusidInstrument + """ + + self._underlying = underlying + + @property + def instrument_type(self): + """Gets the instrument_type of this FutureAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FutureAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FutureAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FutureAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FutureAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FutureAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/futures_contract_details.py b/sdk/lusid/models/futures_contract_details.py new file mode 100644 index 00000000000..994750987a1 --- /dev/null +++ b/sdk/lusid/models/futures_contract_details.py @@ -0,0 +1,526 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FuturesContractDetails(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'asset_class': 'str', + 'contract_code': 'str', + 'contract_month': 'str', + 'contract_size': 'float', + 'convention': 'str', + 'country': 'str', + 'description': 'str', + 'exchange_code': 'str', + 'exchange_name': 'str', + 'ticker_step': 'float', + 'unit_value': 'float' + } + + attribute_map = { + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'asset_class': 'assetClass', + 'contract_code': 'contractCode', + 'contract_month': 'contractMonth', + 'contract_size': 'contractSize', + 'convention': 'convention', + 'country': 'country', + 'description': 'description', + 'exchange_code': 'exchangeCode', + 'exchange_name': 'exchangeName', + 'ticker_step': 'tickerStep', + 'unit_value': 'unitValue' + } + + required_map = { + 'dom_ccy': 'required', + 'fgn_ccy': 'optional', + 'asset_class': 'optional', + 'contract_code': 'required', + 'contract_month': 'required', + 'contract_size': 'required', + 'convention': 'required', + 'country': 'required', + 'description': 'required', + 'exchange_code': 'required', + 'exchange_name': 'required', + 'ticker_step': 'required', + 'unit_value': 'required' + } + + def __init__(self, dom_ccy=None, fgn_ccy=None, asset_class=None, contract_code=None, contract_month=None, contract_size=None, convention=None, country=None, description=None, exchange_code=None, exchange_name=None, ticker_step=None, unit_value=None, local_vars_configuration=None): # noqa: E501 + """FuturesContractDetails - a model defined in OpenAPI" + + :param dom_ccy: Currency in which the contract is paid. (required) + :type dom_ccy: str + :param fgn_ccy: Currency of the underlying, for use with FX Futures + :type fgn_ccy: str + :param asset_class: The asset class of the underlying. Optional and will default to Unknown if not set. Supported string (enumeration) values are: [InterestRates, FX, Inflation, Equities, Credit, Commodities, Money]. + :type asset_class: str + :param contract_code: The contract code used by the exchange, e.g. “CL” for Crude Oil, “ES” for E-mini SP 500, “FGBL” for Bund Futures, etc. (required) + :type contract_code: str + :param contract_month: Which month does the contract trade for. Supported string (enumeration) values are: [F, G, H, J, K, M, N, Q, U, V, X, Z]. (required) + :type contract_month: str + :param contract_size: Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. (required) + :type contract_size: float + :param convention: If appropriate, the day count convention method used in pricing (rates futures). For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. (required) + :type convention: str + :param country: Country (code) for the exchange. (required) + :type country: str + :param description: Description of contract. (required) + :type description: str + :param exchange_code: Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. (required) + :type exchange_code: str + :param exchange_name: Exchange name (for when code is not automatically recognised). (required) + :type exchange_name: str + :param ticker_step: Minimal step size change in ticker. (required) + :type ticker_step: float + :param unit_value: The value in the currency of a 1 unit change in the contract price. (required) + :type unit_value: float + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._dom_ccy = None + self._fgn_ccy = None + self._asset_class = None + self._contract_code = None + self._contract_month = None + self._contract_size = None + self._convention = None + self._country = None + self._description = None + self._exchange_code = None + self._exchange_name = None + self._ticker_step = None + self._unit_value = None + self.discriminator = None + + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.asset_class = asset_class + self.contract_code = contract_code + self.contract_month = contract_month + self.contract_size = contract_size + self.convention = convention + self.country = country + self.description = description + self.exchange_code = exchange_code + self.exchange_name = exchange_name + self.ticker_step = ticker_step + self.unit_value = unit_value + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FuturesContractDetails. # noqa: E501 + + Currency in which the contract is paid. # noqa: E501 + + :return: The dom_ccy of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FuturesContractDetails. + + Currency in which the contract is paid. # noqa: E501 + + :param dom_ccy: The dom_ccy of this FuturesContractDetails. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FuturesContractDetails. # noqa: E501 + + Currency of the underlying, for use with FX Futures # noqa: E501 + + :return: The fgn_ccy of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FuturesContractDetails. + + Currency of the underlying, for use with FX Futures # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FuturesContractDetails. # noqa: E501 + :type fgn_ccy: str + """ + + self._fgn_ccy = fgn_ccy + + @property + def asset_class(self): + """Gets the asset_class of this FuturesContractDetails. # noqa: E501 + + The asset class of the underlying. Optional and will default to Unknown if not set. Supported string (enumeration) values are: [InterestRates, FX, Inflation, Equities, Credit, Commodities, Money]. # noqa: E501 + + :return: The asset_class of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._asset_class + + @asset_class.setter + def asset_class(self, asset_class): + """Sets the asset_class of this FuturesContractDetails. + + The asset class of the underlying. Optional and will default to Unknown if not set. Supported string (enumeration) values are: [InterestRates, FX, Inflation, Equities, Credit, Commodities, Money]. # noqa: E501 + + :param asset_class: The asset_class of this FuturesContractDetails. # noqa: E501 + :type asset_class: str + """ + + self._asset_class = asset_class + + @property + def contract_code(self): + """Gets the contract_code of this FuturesContractDetails. # noqa: E501 + + The contract code used by the exchange, e.g. “CL” for Crude Oil, “ES” for E-mini SP 500, “FGBL” for Bund Futures, etc. # noqa: E501 + + :return: The contract_code of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._contract_code + + @contract_code.setter + def contract_code(self, contract_code): + """Sets the contract_code of this FuturesContractDetails. + + The contract code used by the exchange, e.g. “CL” for Crude Oil, “ES” for E-mini SP 500, “FGBL” for Bund Futures, etc. # noqa: E501 + + :param contract_code: The contract_code of this FuturesContractDetails. # noqa: E501 + :type contract_code: str + """ + if self.local_vars_configuration.client_side_validation and contract_code is None: # noqa: E501 + raise ValueError("Invalid value for `contract_code`, must not be `None`") # noqa: E501 + + self._contract_code = contract_code + + @property + def contract_month(self): + """Gets the contract_month of this FuturesContractDetails. # noqa: E501 + + Which month does the contract trade for. Supported string (enumeration) values are: [F, G, H, J, K, M, N, Q, U, V, X, Z]. # noqa: E501 + + :return: The contract_month of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._contract_month + + @contract_month.setter + def contract_month(self, contract_month): + """Sets the contract_month of this FuturesContractDetails. + + Which month does the contract trade for. Supported string (enumeration) values are: [F, G, H, J, K, M, N, Q, U, V, X, Z]. # noqa: E501 + + :param contract_month: The contract_month of this FuturesContractDetails. # noqa: E501 + :type contract_month: str + """ + if self.local_vars_configuration.client_side_validation and contract_month is None: # noqa: E501 + raise ValueError("Invalid value for `contract_month`, must not be `None`") # noqa: E501 + + self._contract_month = contract_month + + @property + def contract_size(self): + """Gets the contract_size of this FuturesContractDetails. # noqa: E501 + + Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. # noqa: E501 + + :return: The contract_size of this FuturesContractDetails. # noqa: E501 + :rtype: float + """ + return self._contract_size + + @contract_size.setter + def contract_size(self, contract_size): + """Sets the contract_size of this FuturesContractDetails. + + Size of a single contract. By default this should be set to 1000 if otherwise unknown and is defaulted to such. # noqa: E501 + + :param contract_size: The contract_size of this FuturesContractDetails. # noqa: E501 + :type contract_size: float + """ + if self.local_vars_configuration.client_side_validation and contract_size is None: # noqa: E501 + raise ValueError("Invalid value for `contract_size`, must not be `None`") # noqa: E501 + + self._contract_size = contract_size + + @property + def convention(self): + """Gets the convention of this FuturesContractDetails. # noqa: E501 + + If appropriate, the day count convention method used in pricing (rates futures). For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :return: The convention of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._convention + + @convention.setter + def convention(self, convention): + """Sets the convention of this FuturesContractDetails. + + If appropriate, the day count convention method used in pricing (rates futures). For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :param convention: The convention of this FuturesContractDetails. # noqa: E501 + :type convention: str + """ + if self.local_vars_configuration.client_side_validation and convention is None: # noqa: E501 + raise ValueError("Invalid value for `convention`, must not be `None`") # noqa: E501 + + self._convention = convention + + @property + def country(self): + """Gets the country of this FuturesContractDetails. # noqa: E501 + + Country (code) for the exchange. # noqa: E501 + + :return: The country of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this FuturesContractDetails. + + Country (code) for the exchange. # noqa: E501 + + :param country: The country of this FuturesContractDetails. # noqa: E501 + :type country: str + """ + if self.local_vars_configuration.client_side_validation and country is None: # noqa: E501 + raise ValueError("Invalid value for `country`, must not be `None`") # noqa: E501 + + self._country = country + + @property + def description(self): + """Gets the description of this FuturesContractDetails. # noqa: E501 + + Description of contract. # noqa: E501 + + :return: The description of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this FuturesContractDetails. + + Description of contract. # noqa: E501 + + :param description: The description of this FuturesContractDetails. # noqa: E501 + :type description: str + """ + if self.local_vars_configuration.client_side_validation and description is None: # noqa: E501 + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def exchange_code(self): + """Gets the exchange_code of this FuturesContractDetails. # noqa: E501 + + Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. # noqa: E501 + + :return: The exchange_code of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._exchange_code + + @exchange_code.setter + def exchange_code(self, exchange_code): + """Sets the exchange_code of this FuturesContractDetails. + + Exchange code for contract Supported string (enumeration) values are: [ASX, CBOT, CBF, CME, CMX, EOP, HKG, KFE, MFM, OSE, SGX, NYBOT, KCBT, MGE, MATIF, SFE, NYFE, NYM, LIFFE, EUREX, ICE, MSE, NASDAQ, EEX, LME, MIL, MEXDER]. # noqa: E501 + + :param exchange_code: The exchange_code of this FuturesContractDetails. # noqa: E501 + :type exchange_code: str + """ + if self.local_vars_configuration.client_side_validation and exchange_code is None: # noqa: E501 + raise ValueError("Invalid value for `exchange_code`, must not be `None`") # noqa: E501 + + self._exchange_code = exchange_code + + @property + def exchange_name(self): + """Gets the exchange_name of this FuturesContractDetails. # noqa: E501 + + Exchange name (for when code is not automatically recognised). # noqa: E501 + + :return: The exchange_name of this FuturesContractDetails. # noqa: E501 + :rtype: str + """ + return self._exchange_name + + @exchange_name.setter + def exchange_name(self, exchange_name): + """Sets the exchange_name of this FuturesContractDetails. + + Exchange name (for when code is not automatically recognised). # noqa: E501 + + :param exchange_name: The exchange_name of this FuturesContractDetails. # noqa: E501 + :type exchange_name: str + """ + if self.local_vars_configuration.client_side_validation and exchange_name is None: # noqa: E501 + raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 + + self._exchange_name = exchange_name + + @property + def ticker_step(self): + """Gets the ticker_step of this FuturesContractDetails. # noqa: E501 + + Minimal step size change in ticker. # noqa: E501 + + :return: The ticker_step of this FuturesContractDetails. # noqa: E501 + :rtype: float + """ + return self._ticker_step + + @ticker_step.setter + def ticker_step(self, ticker_step): + """Sets the ticker_step of this FuturesContractDetails. + + Minimal step size change in ticker. # noqa: E501 + + :param ticker_step: The ticker_step of this FuturesContractDetails. # noqa: E501 + :type ticker_step: float + """ + if self.local_vars_configuration.client_side_validation and ticker_step is None: # noqa: E501 + raise ValueError("Invalid value for `ticker_step`, must not be `None`") # noqa: E501 + + self._ticker_step = ticker_step + + @property + def unit_value(self): + """Gets the unit_value of this FuturesContractDetails. # noqa: E501 + + The value in the currency of a 1 unit change in the contract price. # noqa: E501 + + :return: The unit_value of this FuturesContractDetails. # noqa: E501 + :rtype: float + """ + return self._unit_value + + @unit_value.setter + def unit_value(self, unit_value): + """Sets the unit_value of this FuturesContractDetails. + + The value in the currency of a 1 unit change in the contract price. # noqa: E501 + + :param unit_value: The unit_value of this FuturesContractDetails. # noqa: E501 + :type unit_value: float + """ + if self.local_vars_configuration.client_side_validation and unit_value is None: # noqa: E501 + raise ValueError("Invalid value for `unit_value`, must not be `None`") # noqa: E501 + + self._unit_value = unit_value + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FuturesContractDetails): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FuturesContractDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward.py b/sdk/lusid/models/fx_forward.py new file mode 100644 index 00000000000..870f407a34f --- /dev/null +++ b/sdk/lusid/models/fx_forward.py @@ -0,0 +1,467 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForward(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_amount': 'float', + 'dom_ccy': 'str', + 'fgn_amount': 'float', + 'fgn_ccy': 'str', + 'ref_spot_rate': 'float', + 'is_ndf': 'bool', + 'fixing_date': 'datetime', + 'settlement_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_amount': 'domAmount', + 'dom_ccy': 'domCcy', + 'fgn_amount': 'fgnAmount', + 'fgn_ccy': 'fgnCcy', + 'ref_spot_rate': 'refSpotRate', + 'is_ndf': 'isNdf', + 'fixing_date': 'fixingDate', + 'settlement_ccy': 'settlementCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_amount': 'required', + 'dom_ccy': 'required', + 'fgn_amount': 'required', + 'fgn_ccy': 'required', + 'ref_spot_rate': 'optional', + 'is_ndf': 'optional', + 'fixing_date': 'optional', + 'settlement_ccy': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_amount=None, dom_ccy=None, fgn_amount=None, fgn_ccy=None, ref_spot_rate=None, is_ndf=None, fixing_date=None, settlement_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FxForward - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param dom_amount: The amount that is to be paid in the domestic currency on the maturity date. (required) + :type dom_amount: float + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param fgn_amount: The amount that is to be paid in the foreign currency on the maturity date. (required) + :type fgn_amount: float + :param fgn_ccy: The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. (required) + :type fgn_ccy: str + :param ref_spot_rate: The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). + :type ref_spot_rate: float + :param is_ndf: Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. + :type is_ndf: bool + :param fixing_date: The fixing date. + :type fixing_date: datetime + :param settlement_ccy: The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. + :type settlement_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_amount = None + self._dom_ccy = None + self._fgn_amount = None + self._fgn_ccy = None + self._ref_spot_rate = None + self._is_ndf = None + self._fixing_date = None + self._settlement_ccy = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_amount = dom_amount + self.dom_ccy = dom_ccy + self.fgn_amount = fgn_amount + self.fgn_ccy = fgn_ccy + if ref_spot_rate is not None: + self.ref_spot_rate = ref_spot_rate + if is_ndf is not None: + self.is_ndf = is_ndf + if fixing_date is not None: + self.fixing_date = fixing_date + self.settlement_ccy = settlement_ccy + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FxForward. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FxForward. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FxForward. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FxForward. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FxForward. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FxForward. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FxForward. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FxForward. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_amount(self): + """Gets the dom_amount of this FxForward. # noqa: E501 + + The amount that is to be paid in the domestic currency on the maturity date. # noqa: E501 + + :return: The dom_amount of this FxForward. # noqa: E501 + :rtype: float + """ + return self._dom_amount + + @dom_amount.setter + def dom_amount(self, dom_amount): + """Sets the dom_amount of this FxForward. + + The amount that is to be paid in the domestic currency on the maturity date. # noqa: E501 + + :param dom_amount: The dom_amount of this FxForward. # noqa: E501 + :type dom_amount: float + """ + if self.local_vars_configuration.client_side_validation and dom_amount is None: # noqa: E501 + raise ValueError("Invalid value for `dom_amount`, must not be `None`") # noqa: E501 + + self._dom_amount = dom_amount + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForward. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this FxForward. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForward. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForward. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_amount(self): + """Gets the fgn_amount of this FxForward. # noqa: E501 + + The amount that is to be paid in the foreign currency on the maturity date. # noqa: E501 + + :return: The fgn_amount of this FxForward. # noqa: E501 + :rtype: float + """ + return self._fgn_amount + + @fgn_amount.setter + def fgn_amount(self, fgn_amount): + """Sets the fgn_amount of this FxForward. + + The amount that is to be paid in the foreign currency on the maturity date. # noqa: E501 + + :param fgn_amount: The fgn_amount of this FxForward. # noqa: E501 + :type fgn_amount: float + """ + if self.local_vars_configuration.client_side_validation and fgn_amount is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_amount`, must not be `None`") # noqa: E501 + + self._fgn_amount = fgn_amount + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForward. # noqa: E501 + + The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. # noqa: E501 + + :return: The fgn_ccy of this FxForward. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForward. + + The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForward. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def ref_spot_rate(self): + """Gets the ref_spot_rate of this FxForward. # noqa: E501 + + The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). # noqa: E501 + + :return: The ref_spot_rate of this FxForward. # noqa: E501 + :rtype: float + """ + return self._ref_spot_rate + + @ref_spot_rate.setter + def ref_spot_rate(self, ref_spot_rate): + """Sets the ref_spot_rate of this FxForward. + + The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). # noqa: E501 + + :param ref_spot_rate: The ref_spot_rate of this FxForward. # noqa: E501 + :type ref_spot_rate: float + """ + + self._ref_spot_rate = ref_spot_rate + + @property + def is_ndf(self): + """Gets the is_ndf of this FxForward. # noqa: E501 + + Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. # noqa: E501 + + :return: The is_ndf of this FxForward. # noqa: E501 + :rtype: bool + """ + return self._is_ndf + + @is_ndf.setter + def is_ndf(self, is_ndf): + """Sets the is_ndf of this FxForward. + + Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. # noqa: E501 + + :param is_ndf: The is_ndf of this FxForward. # noqa: E501 + :type is_ndf: bool + """ + + self._is_ndf = is_ndf + + @property + def fixing_date(self): + """Gets the fixing_date of this FxForward. # noqa: E501 + + The fixing date. # noqa: E501 + + :return: The fixing_date of this FxForward. # noqa: E501 + :rtype: datetime + """ + return self._fixing_date + + @fixing_date.setter + def fixing_date(self, fixing_date): + """Sets the fixing_date of this FxForward. + + The fixing date. # noqa: E501 + + :param fixing_date: The fixing_date of this FxForward. # noqa: E501 + :type fixing_date: datetime + """ + + self._fixing_date = fixing_date + + @property + def settlement_ccy(self): + """Gets the settlement_ccy of this FxForward. # noqa: E501 + + The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. # noqa: E501 + + :return: The settlement_ccy of this FxForward. # noqa: E501 + :rtype: str + """ + return self._settlement_ccy + + @settlement_ccy.setter + def settlement_ccy(self, settlement_ccy): + """Sets the settlement_ccy of this FxForward. + + The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. # noqa: E501 + + :param settlement_ccy: The settlement_ccy of this FxForward. # noqa: E501 + :type settlement_ccy: str + """ + + self._settlement_ccy = settlement_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this FxForward. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FxForward. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FxForward. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FxForward. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForward): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForward): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_all_of.py b/sdk/lusid/models/fx_forward_all_of.py new file mode 100644 index 00000000000..c4c6dd7151a --- /dev/null +++ b/sdk/lusid/models/fx_forward_all_of.py @@ -0,0 +1,467 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_amount': 'float', + 'dom_ccy': 'str', + 'fgn_amount': 'float', + 'fgn_ccy': 'str', + 'ref_spot_rate': 'float', + 'is_ndf': 'bool', + 'fixing_date': 'datetime', + 'settlement_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_amount': 'domAmount', + 'dom_ccy': 'domCcy', + 'fgn_amount': 'fgnAmount', + 'fgn_ccy': 'fgnCcy', + 'ref_spot_rate': 'refSpotRate', + 'is_ndf': 'isNdf', + 'fixing_date': 'fixingDate', + 'settlement_ccy': 'settlementCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_amount': 'required', + 'dom_ccy': 'required', + 'fgn_amount': 'required', + 'fgn_ccy': 'required', + 'ref_spot_rate': 'optional', + 'is_ndf': 'optional', + 'fixing_date': 'optional', + 'settlement_ccy': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_amount=None, dom_ccy=None, fgn_amount=None, fgn_ccy=None, ref_spot_rate=None, is_ndf=None, fixing_date=None, settlement_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param dom_amount: The amount that is to be paid in the domestic currency on the maturity date. (required) + :type dom_amount: float + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param fgn_amount: The amount that is to be paid in the foreign currency on the maturity date. (required) + :type fgn_amount: float + :param fgn_ccy: The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. (required) + :type fgn_ccy: str + :param ref_spot_rate: The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). + :type ref_spot_rate: float + :param is_ndf: Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. + :type is_ndf: bool + :param fixing_date: The fixing date. + :type fixing_date: datetime + :param settlement_ccy: The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. + :type settlement_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_amount = None + self._dom_ccy = None + self._fgn_amount = None + self._fgn_ccy = None + self._ref_spot_rate = None + self._is_ndf = None + self._fixing_date = None + self._settlement_ccy = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_amount = dom_amount + self.dom_ccy = dom_ccy + self.fgn_amount = fgn_amount + self.fgn_ccy = fgn_ccy + if ref_spot_rate is not None: + self.ref_spot_rate = ref_spot_rate + if is_ndf is not None: + self.is_ndf = is_ndf + if fixing_date is not None: + self.fixing_date = fixing_date + self.settlement_ccy = settlement_ccy + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FxForwardAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FxForwardAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FxForwardAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FxForwardAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this FxForwardAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this FxForwardAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this FxForwardAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this FxForwardAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_amount(self): + """Gets the dom_amount of this FxForwardAllOf. # noqa: E501 + + The amount that is to be paid in the domestic currency on the maturity date. # noqa: E501 + + :return: The dom_amount of this FxForwardAllOf. # noqa: E501 + :rtype: float + """ + return self._dom_amount + + @dom_amount.setter + def dom_amount(self, dom_amount): + """Sets the dom_amount of this FxForwardAllOf. + + The amount that is to be paid in the domestic currency on the maturity date. # noqa: E501 + + :param dom_amount: The dom_amount of this FxForwardAllOf. # noqa: E501 + :type dom_amount: float + """ + if self.local_vars_configuration.client_side_validation and dom_amount is None: # noqa: E501 + raise ValueError("Invalid value for `dom_amount`, must not be `None`") # noqa: E501 + + self._dom_amount = dom_amount + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this FxForwardAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_amount(self): + """Gets the fgn_amount of this FxForwardAllOf. # noqa: E501 + + The amount that is to be paid in the foreign currency on the maturity date. # noqa: E501 + + :return: The fgn_amount of this FxForwardAllOf. # noqa: E501 + :rtype: float + """ + return self._fgn_amount + + @fgn_amount.setter + def fgn_amount(self, fgn_amount): + """Sets the fgn_amount of this FxForwardAllOf. + + The amount that is to be paid in the foreign currency on the maturity date. # noqa: E501 + + :param fgn_amount: The fgn_amount of this FxForwardAllOf. # noqa: E501 + :type fgn_amount: float + """ + if self.local_vars_configuration.client_side_validation and fgn_amount is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_amount`, must not be `None`") # noqa: E501 + + self._fgn_amount = fgn_amount + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardAllOf. # noqa: E501 + + The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. # noqa: E501 + + :return: The fgn_ccy of this FxForwardAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardAllOf. + + The foreign (other) currency of the instrument. In the NDF case, only payments are made in the domestic currency. For the outright forward, currencies are exchanged. By domestic is then that of the portfolio. # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def ref_spot_rate(self): + """Gets the ref_spot_rate of this FxForwardAllOf. # noqa: E501 + + The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). # noqa: E501 + + :return: The ref_spot_rate of this FxForwardAllOf. # noqa: E501 + :rtype: float + """ + return self._ref_spot_rate + + @ref_spot_rate.setter + def ref_spot_rate(self, ref_spot_rate): + """Sets the ref_spot_rate of this FxForwardAllOf. + + The reference Fx Spot rate for currency pair Foreign-Domestic that was seen on the trade start date (time). # noqa: E501 + + :param ref_spot_rate: The ref_spot_rate of this FxForwardAllOf. # noqa: E501 + :type ref_spot_rate: float + """ + + self._ref_spot_rate = ref_spot_rate + + @property + def is_ndf(self): + """Gets the is_ndf of this FxForwardAllOf. # noqa: E501 + + Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. # noqa: E501 + + :return: The is_ndf of this FxForwardAllOf. # noqa: E501 + :rtype: bool + """ + return self._is_ndf + + @is_ndf.setter + def is_ndf(self, is_ndf): + """Sets the is_ndf of this FxForwardAllOf. + + Is the contract an Fx-Forward of \"Non-Deliverable\" type, meaning a single payment in the domestic currency based on the change in fx-rate vs a reference rate is used. # noqa: E501 + + :param is_ndf: The is_ndf of this FxForwardAllOf. # noqa: E501 + :type is_ndf: bool + """ + + self._is_ndf = is_ndf + + @property + def fixing_date(self): + """Gets the fixing_date of this FxForwardAllOf. # noqa: E501 + + The fixing date. # noqa: E501 + + :return: The fixing_date of this FxForwardAllOf. # noqa: E501 + :rtype: datetime + """ + return self._fixing_date + + @fixing_date.setter + def fixing_date(self, fixing_date): + """Sets the fixing_date of this FxForwardAllOf. + + The fixing date. # noqa: E501 + + :param fixing_date: The fixing_date of this FxForwardAllOf. # noqa: E501 + :type fixing_date: datetime + """ + + self._fixing_date = fixing_date + + @property + def settlement_ccy(self): + """Gets the settlement_ccy of this FxForwardAllOf. # noqa: E501 + + The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. # noqa: E501 + + :return: The settlement_ccy of this FxForwardAllOf. # noqa: E501 + :rtype: str + """ + return self._settlement_ccy + + @settlement_ccy.setter + def settlement_ccy(self, settlement_ccy): + """Sets the settlement_ccy of this FxForwardAllOf. + + The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards. # noqa: E501 + + :param settlement_ccy: The settlement_ccy of this FxForwardAllOf. # noqa: E501 + :type settlement_ccy: str + """ + + self._settlement_ccy = settlement_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this FxForwardAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FxForwardAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FxForwardAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FxForwardAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_curve_by_quote_reference.py b/sdk/lusid/models/fx_forward_curve_by_quote_reference.py new file mode 100644 index 00000000000..beee550aa41 --- /dev/null +++ b/sdk/lusid/models/fx_forward_curve_by_quote_reference.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardCurveByQuoteReference(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'tenors': 'list[str]', + 'quote_references': 'list[dict(str, str)]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'tenors': 'tenors', + 'quote_references': 'quoteReferences', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'tenors': 'required', + 'quote_references': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, dom_ccy=None, fgn_ccy=None, tenors=None, quote_references=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardCurveByQuoteReference - a model defined in OpenAPI" + + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param tenors: Tenors for which the forward rates apply (required) + :type tenors: list[str] + :param quote_references: For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. (required) + :type quote_references: list[dict(str, str)] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._dom_ccy = None + self._fgn_ccy = None + self._tenors = None + self._quote_references = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.tenors = tenors + self.quote_references = quote_references + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardCurveByQuoteReference. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardCurveByQuoteReference. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardCurveByQuoteReference. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardCurveByQuoteReference. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardCurveByQuoteReference. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardCurveByQuoteReference. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardCurveByQuoteReference. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardCurveByQuoteReference. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def tenors(self): + """Gets the tenors of this FxForwardCurveByQuoteReference. # noqa: E501 + + Tenors for which the forward rates apply # noqa: E501 + + :return: The tenors of this FxForwardCurveByQuoteReference. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this FxForwardCurveByQuoteReference. + + Tenors for which the forward rates apply # noqa: E501 + + :param tenors: The tenors of this FxForwardCurveByQuoteReference. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def quote_references(self): + """Gets the quote_references of this FxForwardCurveByQuoteReference. # noqa: E501 + + For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. # noqa: E501 + + :return: The quote_references of this FxForwardCurveByQuoteReference. # noqa: E501 + :rtype: list[dict(str, str)] + """ + return self._quote_references + + @quote_references.setter + def quote_references(self, quote_references): + """Sets the quote_references of this FxForwardCurveByQuoteReference. + + For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. # noqa: E501 + + :param quote_references: The quote_references of this FxForwardCurveByQuoteReference. # noqa: E501 + :type quote_references: list[dict(str, str)] + """ + if self.local_vars_configuration.client_side_validation and quote_references is None: # noqa: E501 + raise ValueError("Invalid value for `quote_references`, must not be `None`") # noqa: E501 + + self._quote_references = quote_references + + @property + def lineage(self): + """Gets the lineage of this FxForwardCurveByQuoteReference. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardCurveByQuoteReference. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardCurveByQuoteReference. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardCurveByQuoteReference. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardCurveByQuoteReference. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardCurveByQuoteReference. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardCurveByQuoteReference. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardCurveByQuoteReference. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardCurveByQuoteReference): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardCurveByQuoteReference): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_curve_by_quote_reference_all_of.py b/sdk/lusid/models/fx_forward_curve_by_quote_reference_all_of.py new file mode 100644 index 00000000000..d04ee27ef16 --- /dev/null +++ b/sdk/lusid/models/fx_forward_curve_by_quote_reference_all_of.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardCurveByQuoteReferenceAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'tenors': 'list[str]', + 'quote_references': 'list[dict(str, str)]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'tenors': 'tenors', + 'quote_references': 'quoteReferences', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'tenors': 'required', + 'quote_references': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, dom_ccy=None, fgn_ccy=None, tenors=None, quote_references=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardCurveByQuoteReferenceAllOf - a model defined in OpenAPI" + + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param tenors: Tenors for which the forward rates apply (required) + :type tenors: list[str] + :param quote_references: For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. (required) + :type quote_references: list[dict(str, str)] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._dom_ccy = None + self._fgn_ccy = None + self._tenors = None + self._quote_references = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.tenors = tenors + self.quote_references = quote_references + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardCurveByQuoteReferenceAllOf. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardCurveByQuoteReferenceAllOf. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def tenors(self): + """Gets the tenors of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + + Tenors for which the forward rates apply # noqa: E501 + + :return: The tenors of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this FxForwardCurveByQuoteReferenceAllOf. + + Tenors for which the forward rates apply # noqa: E501 + + :param tenors: The tenors of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def quote_references(self): + """Gets the quote_references of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + + For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. # noqa: E501 + + :return: The quote_references of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :rtype: list[dict(str, str)] + """ + return self._quote_references + + @quote_references.setter + def quote_references(self, quote_references): + """Sets the quote_references of this FxForwardCurveByQuoteReferenceAllOf. + + For each tenor, a list of identifiers. These will be looked up in the quotes store to resolve the actual rates. # noqa: E501 + + :param quote_references: The quote_references of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :type quote_references: list[dict(str, str)] + """ + if self.local_vars_configuration.client_side_validation and quote_references is None: # noqa: E501 + raise ValueError("Invalid value for `quote_references`, must not be `None`") # noqa: E501 + + self._quote_references = quote_references + + @property + def lineage(self): + """Gets the lineage of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardCurveByQuoteReferenceAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardCurveByQuoteReferenceAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardCurveByQuoteReferenceAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardCurveByQuoteReferenceAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardCurveByQuoteReferenceAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_curve_data.py b/sdk/lusid/models/fx_forward_curve_data.py new file mode 100644 index 00000000000..7bcc0a5d3b1 --- /dev/null +++ b/sdk/lusid/models/fx_forward_curve_data.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'dates': 'list[datetime]', + 'rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'dates': 'dates', + 'rates': 'rates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'dates': 'required', + 'rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, dates=None, rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardCurveData - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param dates: Dates for which the forward rates apply (required) + :type dates: list[datetime] + :param rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) (required) + :type rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._dates = None + self._rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.dates = dates + self.rates = rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardCurveData. # noqa: E501 + + EffectiveAt date of the quoted rates # noqa: E501 + + :return: The base_date of this FxForwardCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardCurveData. + + EffectiveAt date of the quoted rates # noqa: E501 + + :param base_date: The base_date of this FxForwardCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardCurveData. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardCurveData. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardCurveData. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardCurveData. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardCurveData. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardCurveData. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardCurveData. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardCurveData. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def dates(self): + """Gets the dates of this FxForwardCurveData. # noqa: E501 + + Dates for which the forward rates apply # noqa: E501 + + :return: The dates of this FxForwardCurveData. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this FxForwardCurveData. + + Dates for which the forward rates apply # noqa: E501 + + :param dates: The dates of this FxForwardCurveData. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def rates(self): + """Gets the rates of this FxForwardCurveData. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :return: The rates of this FxForwardCurveData. # noqa: E501 + :rtype: list[float] + """ + return self._rates + + @rates.setter + def rates(self, rates): + """Sets the rates of this FxForwardCurveData. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :param rates: The rates of this FxForwardCurveData. # noqa: E501 + :type rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and rates is None: # noqa: E501 + raise ValueError("Invalid value for `rates`, must not be `None`") # noqa: E501 + + self._rates = rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_curve_data_all_of.py b/sdk/lusid/models/fx_forward_curve_data_all_of.py new file mode 100644 index 00000000000..c64953ec5f2 --- /dev/null +++ b/sdk/lusid/models/fx_forward_curve_data_all_of.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'dates': 'list[datetime]', + 'rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'dates': 'dates', + 'rates': 'rates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'dates': 'required', + 'rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, dates=None, rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param dates: Dates for which the forward rates apply (required) + :type dates: list[datetime] + :param rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) (required) + :type rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._dates = None + self._rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.dates = dates + self.rates = rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardCurveDataAllOf. # noqa: E501 + + EffectiveAt date of the quoted rates # noqa: E501 + + :return: The base_date of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardCurveDataAllOf. + + EffectiveAt date of the quoted rates # noqa: E501 + + :param base_date: The base_date of this FxForwardCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardCurveDataAllOf. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardCurveDataAllOf. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardCurveDataAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardCurveDataAllOf. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardCurveDataAllOf. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardCurveDataAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def dates(self): + """Gets the dates of this FxForwardCurveDataAllOf. # noqa: E501 + + Dates for which the forward rates apply # noqa: E501 + + :return: The dates of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this FxForwardCurveDataAllOf. + + Dates for which the forward rates apply # noqa: E501 + + :param dates: The dates of this FxForwardCurveDataAllOf. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def rates(self): + """Gets the rates of this FxForwardCurveDataAllOf. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :return: The rates of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._rates + + @rates.setter + def rates(self, rates): + """Sets the rates of this FxForwardCurveDataAllOf. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :param rates: The rates of this FxForwardCurveDataAllOf. # noqa: E501 + :type rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and rates is None: # noqa: E501 + raise ValueError("Invalid value for `rates`, must not be `None`") # noqa: E501 + + self._rates = rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_model_options.py b/sdk/lusid/models/fx_forward_model_options.py new file mode 100644 index 00000000000..d0c7a2c4798 --- /dev/null +++ b/sdk/lusid/models/fx_forward_model_options.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardModelOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'forward_rate_observable_type': 'str', + 'discounting_method': 'str', + 'convert_to_report_ccy': 'bool', + 'model_options_type': 'str' + } + + attribute_map = { + 'forward_rate_observable_type': 'forwardRateObservableType', + 'discounting_method': 'discountingMethod', + 'convert_to_report_ccy': 'convertToReportCcy', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'forward_rate_observable_type': 'required', + 'discounting_method': 'required', + 'convert_to_report_ccy': 'required', + 'model_options_type': 'required' + } + + def __init__(self, forward_rate_observable_type=None, discounting_method=None, convert_to_report_ccy=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardModelOptions - a model defined in OpenAPI" + + :param forward_rate_observable_type: The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid (required) + :type forward_rate_observable_type: str + :param discounting_method: The available values are: Standard, ConstantTimeValueOfMoney, Invalid (required) + :type discounting_method: str + :param convert_to_report_ccy: Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. (required) + :type convert_to_report_ccy: bool + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._forward_rate_observable_type = None + self._discounting_method = None + self._convert_to_report_ccy = None + self._model_options_type = None + self.discriminator = None + + self.forward_rate_observable_type = forward_rate_observable_type + self.discounting_method = discounting_method + self.convert_to_report_ccy = convert_to_report_ccy + self.model_options_type = model_options_type + + @property + def forward_rate_observable_type(self): + """Gets the forward_rate_observable_type of this FxForwardModelOptions. # noqa: E501 + + The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid # noqa: E501 + + :return: The forward_rate_observable_type of this FxForwardModelOptions. # noqa: E501 + :rtype: str + """ + return self._forward_rate_observable_type + + @forward_rate_observable_type.setter + def forward_rate_observable_type(self, forward_rate_observable_type): + """Sets the forward_rate_observable_type of this FxForwardModelOptions. + + The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid # noqa: E501 + + :param forward_rate_observable_type: The forward_rate_observable_type of this FxForwardModelOptions. # noqa: E501 + :type forward_rate_observable_type: str + """ + if self.local_vars_configuration.client_side_validation and forward_rate_observable_type is None: # noqa: E501 + raise ValueError("Invalid value for `forward_rate_observable_type`, must not be `None`") # noqa: E501 + allowed_values = ["ForwardPoints", "ForwardRate", "RatesCurve", "FxForwardCurve", "Invalid"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and forward_rate_observable_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `forward_rate_observable_type` ({0}), must be one of {1}" # noqa: E501 + .format(forward_rate_observable_type, allowed_values) + ) + + self._forward_rate_observable_type = forward_rate_observable_type + + @property + def discounting_method(self): + """Gets the discounting_method of this FxForwardModelOptions. # noqa: E501 + + The available values are: Standard, ConstantTimeValueOfMoney, Invalid # noqa: E501 + + :return: The discounting_method of this FxForwardModelOptions. # noqa: E501 + :rtype: str + """ + return self._discounting_method + + @discounting_method.setter + def discounting_method(self, discounting_method): + """Sets the discounting_method of this FxForwardModelOptions. + + The available values are: Standard, ConstantTimeValueOfMoney, Invalid # noqa: E501 + + :param discounting_method: The discounting_method of this FxForwardModelOptions. # noqa: E501 + :type discounting_method: str + """ + if self.local_vars_configuration.client_side_validation and discounting_method is None: # noqa: E501 + raise ValueError("Invalid value for `discounting_method`, must not be `None`") # noqa: E501 + allowed_values = ["Standard", "ConstantTimeValueOfMoney", "Invalid"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and discounting_method not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `discounting_method` ({0}), must be one of {1}" # noqa: E501 + .format(discounting_method, allowed_values) + ) + + self._discounting_method = discounting_method + + @property + def convert_to_report_ccy(self): + """Gets the convert_to_report_ccy of this FxForwardModelOptions. # noqa: E501 + + Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. # noqa: E501 + + :return: The convert_to_report_ccy of this FxForwardModelOptions. # noqa: E501 + :rtype: bool + """ + return self._convert_to_report_ccy + + @convert_to_report_ccy.setter + def convert_to_report_ccy(self, convert_to_report_ccy): + """Sets the convert_to_report_ccy of this FxForwardModelOptions. + + Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. # noqa: E501 + + :param convert_to_report_ccy: The convert_to_report_ccy of this FxForwardModelOptions. # noqa: E501 + :type convert_to_report_ccy: bool + """ + if self.local_vars_configuration.client_side_validation and convert_to_report_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `convert_to_report_ccy`, must not be `None`") # noqa: E501 + + self._convert_to_report_ccy = convert_to_report_ccy + + @property + def model_options_type(self): + """Gets the model_options_type of this FxForwardModelOptions. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this FxForwardModelOptions. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this FxForwardModelOptions. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this FxForwardModelOptions. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardModelOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardModelOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_model_options_all_of.py b/sdk/lusid/models/fx_forward_model_options_all_of.py new file mode 100644 index 00000000000..b0e4c571043 --- /dev/null +++ b/sdk/lusid/models/fx_forward_model_options_all_of.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardModelOptionsAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'forward_rate_observable_type': 'str', + 'discounting_method': 'str', + 'convert_to_report_ccy': 'bool', + 'model_options_type': 'str' + } + + attribute_map = { + 'forward_rate_observable_type': 'forwardRateObservableType', + 'discounting_method': 'discountingMethod', + 'convert_to_report_ccy': 'convertToReportCcy', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'forward_rate_observable_type': 'required', + 'discounting_method': 'required', + 'convert_to_report_ccy': 'required', + 'model_options_type': 'required' + } + + def __init__(self, forward_rate_observable_type=None, discounting_method=None, convert_to_report_ccy=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardModelOptionsAllOf - a model defined in OpenAPI" + + :param forward_rate_observable_type: The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid (required) + :type forward_rate_observable_type: str + :param discounting_method: The available values are: Standard, ConstantTimeValueOfMoney, Invalid (required) + :type discounting_method: str + :param convert_to_report_ccy: Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. (required) + :type convert_to_report_ccy: bool + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._forward_rate_observable_type = None + self._discounting_method = None + self._convert_to_report_ccy = None + self._model_options_type = None + self.discriminator = None + + self.forward_rate_observable_type = forward_rate_observable_type + self.discounting_method = discounting_method + self.convert_to_report_ccy = convert_to_report_ccy + self.model_options_type = model_options_type + + @property + def forward_rate_observable_type(self): + """Gets the forward_rate_observable_type of this FxForwardModelOptionsAllOf. # noqa: E501 + + The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid # noqa: E501 + + :return: The forward_rate_observable_type of this FxForwardModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._forward_rate_observable_type + + @forward_rate_observable_type.setter + def forward_rate_observable_type(self, forward_rate_observable_type): + """Sets the forward_rate_observable_type of this FxForwardModelOptionsAllOf. + + The available values are: ForwardPoints, ForwardRate, RatesCurve, FxForwardCurve, Invalid # noqa: E501 + + :param forward_rate_observable_type: The forward_rate_observable_type of this FxForwardModelOptionsAllOf. # noqa: E501 + :type forward_rate_observable_type: str + """ + if self.local_vars_configuration.client_side_validation and forward_rate_observable_type is None: # noqa: E501 + raise ValueError("Invalid value for `forward_rate_observable_type`, must not be `None`") # noqa: E501 + allowed_values = ["ForwardPoints", "ForwardRate", "RatesCurve", "FxForwardCurve", "Invalid"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and forward_rate_observable_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `forward_rate_observable_type` ({0}), must be one of {1}" # noqa: E501 + .format(forward_rate_observable_type, allowed_values) + ) + + self._forward_rate_observable_type = forward_rate_observable_type + + @property + def discounting_method(self): + """Gets the discounting_method of this FxForwardModelOptionsAllOf. # noqa: E501 + + The available values are: Standard, ConstantTimeValueOfMoney, Invalid # noqa: E501 + + :return: The discounting_method of this FxForwardModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._discounting_method + + @discounting_method.setter + def discounting_method(self, discounting_method): + """Sets the discounting_method of this FxForwardModelOptionsAllOf. + + The available values are: Standard, ConstantTimeValueOfMoney, Invalid # noqa: E501 + + :param discounting_method: The discounting_method of this FxForwardModelOptionsAllOf. # noqa: E501 + :type discounting_method: str + """ + if self.local_vars_configuration.client_side_validation and discounting_method is None: # noqa: E501 + raise ValueError("Invalid value for `discounting_method`, must not be `None`") # noqa: E501 + allowed_values = ["Standard", "ConstantTimeValueOfMoney", "Invalid"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and discounting_method not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `discounting_method` ({0}), must be one of {1}" # noqa: E501 + .format(discounting_method, allowed_values) + ) + + self._discounting_method = discounting_method + + @property + def convert_to_report_ccy(self): + """Gets the convert_to_report_ccy of this FxForwardModelOptionsAllOf. # noqa: E501 + + Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. # noqa: E501 + + :return: The convert_to_report_ccy of this FxForwardModelOptionsAllOf. # noqa: E501 + :rtype: bool + """ + return self._convert_to_report_ccy + + @convert_to_report_ccy.setter + def convert_to_report_ccy(self, convert_to_report_ccy): + """Sets the convert_to_report_ccy of this FxForwardModelOptionsAllOf. + + Convert all FX flows to the report currency By setting this all FX forwards will be priced using Forward Curves that have Report Currency as the base. # noqa: E501 + + :param convert_to_report_ccy: The convert_to_report_ccy of this FxForwardModelOptionsAllOf. # noqa: E501 + :type convert_to_report_ccy: bool + """ + if self.local_vars_configuration.client_side_validation and convert_to_report_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `convert_to_report_ccy`, must not be `None`") # noqa: E501 + + self._convert_to_report_ccy = convert_to_report_ccy + + @property + def model_options_type(self): + """Gets the model_options_type of this FxForwardModelOptionsAllOf. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this FxForwardModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this FxForwardModelOptionsAllOf. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this FxForwardModelOptionsAllOf. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardModelOptionsAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardModelOptionsAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_pips_curve_data.py b/sdk/lusid/models/fx_forward_pips_curve_data.py new file mode 100644 index 00000000000..5f25b5db976 --- /dev/null +++ b/sdk/lusid/models/fx_forward_pips_curve_data.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardPipsCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'dates': 'list[datetime]', + 'pip_rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'dates': 'dates', + 'pip_rates': 'pipRates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'dates': 'required', + 'pip_rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, dates=None, pip_rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardPipsCurveData - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted pip rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param dates: Dates for which the forward rates apply (required) + :type dates: list[datetime] + :param pip_rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips (required) + :type pip_rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._dates = None + self._pip_rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.dates = dates + self.pip_rates = pip_rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardPipsCurveData. # noqa: E501 + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :return: The base_date of this FxForwardPipsCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardPipsCurveData. + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :param base_date: The base_date of this FxForwardPipsCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardPipsCurveData. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardPipsCurveData. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardPipsCurveData. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardPipsCurveData. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardPipsCurveData. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardPipsCurveData. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def dates(self): + """Gets the dates of this FxForwardPipsCurveData. # noqa: E501 + + Dates for which the forward rates apply # noqa: E501 + + :return: The dates of this FxForwardPipsCurveData. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this FxForwardPipsCurveData. + + Dates for which the forward rates apply # noqa: E501 + + :param dates: The dates of this FxForwardPipsCurveData. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def pip_rates(self): + """Gets the pip_rates of this FxForwardPipsCurveData. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :return: The pip_rates of this FxForwardPipsCurveData. # noqa: E501 + :rtype: list[float] + """ + return self._pip_rates + + @pip_rates.setter + def pip_rates(self, pip_rates): + """Sets the pip_rates of this FxForwardPipsCurveData. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :param pip_rates: The pip_rates of this FxForwardPipsCurveData. # noqa: E501 + :type pip_rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and pip_rates is None: # noqa: E501 + raise ValueError("Invalid value for `pip_rates`, must not be `None`") # noqa: E501 + + self._pip_rates = pip_rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardPipsCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardPipsCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardPipsCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardPipsCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardPipsCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardPipsCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardPipsCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardPipsCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_pips_curve_data_all_of.py b/sdk/lusid/models/fx_forward_pips_curve_data_all_of.py new file mode 100644 index 00000000000..1dd99df8fca --- /dev/null +++ b/sdk/lusid/models/fx_forward_pips_curve_data_all_of.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardPipsCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'dates': 'list[datetime]', + 'pip_rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'dates': 'dates', + 'pip_rates': 'pipRates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'dates': 'required', + 'pip_rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, dates=None, pip_rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardPipsCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted pip rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param dates: Dates for which the forward rates apply (required) + :type dates: list[datetime] + :param pip_rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips (required) + :type pip_rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._dates = None + self._pip_rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.dates = dates + self.pip_rates = pip_rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :return: The base_date of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardPipsCurveDataAllOf. + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :param base_date: The base_date of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardPipsCurveDataAllOf. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardPipsCurveDataAllOf. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def dates(self): + """Gets the dates of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + Dates for which the forward rates apply # noqa: E501 + + :return: The dates of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: list[datetime] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this FxForwardPipsCurveDataAllOf. + + Dates for which the forward rates apply # noqa: E501 + + :param dates: The dates of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type dates: list[datetime] + """ + if self.local_vars_configuration.client_side_validation and dates is None: # noqa: E501 + raise ValueError("Invalid value for `dates`, must not be `None`") # noqa: E501 + + self._dates = dates + + @property + def pip_rates(self): + """Gets the pip_rates of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :return: The pip_rates of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._pip_rates + + @pip_rates.setter + def pip_rates(self, pip_rates): + """Sets the pip_rates of this FxForwardPipsCurveDataAllOf. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :param pip_rates: The pip_rates of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type pip_rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and pip_rates is None: # noqa: E501 + raise ValueError("Invalid value for `pip_rates`, must not be `None`") # noqa: E501 + + self._pip_rates = pip_rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardPipsCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardPipsCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardPipsCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardPipsCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardPipsCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardPipsCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_tenor_curve_data.py b/sdk/lusid/models/fx_forward_tenor_curve_data.py new file mode 100644 index 00000000000..7dce524393f --- /dev/null +++ b/sdk/lusid/models/fx_forward_tenor_curve_data.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardTenorCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'tenors': 'list[str]', + 'rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'tenors': 'tenors', + 'rates': 'rates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'tenors': 'required', + 'rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, tenors=None, rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardTenorCurveData - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param tenors: Tenors for which the forward rates apply (required) + :type tenors: list[str] + :param rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) (required) + :type rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._tenors = None + self._rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.tenors = tenors + self.rates = rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardTenorCurveData. # noqa: E501 + + EffectiveAt date of the quoted rates # noqa: E501 + + :return: The base_date of this FxForwardTenorCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardTenorCurveData. + + EffectiveAt date of the quoted rates # noqa: E501 + + :param base_date: The base_date of this FxForwardTenorCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardTenorCurveData. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardTenorCurveData. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardTenorCurveData. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardTenorCurveData. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardTenorCurveData. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardTenorCurveData. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardTenorCurveData. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardTenorCurveData. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def tenors(self): + """Gets the tenors of this FxForwardTenorCurveData. # noqa: E501 + + Tenors for which the forward rates apply # noqa: E501 + + :return: The tenors of this FxForwardTenorCurveData. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this FxForwardTenorCurveData. + + Tenors for which the forward rates apply # noqa: E501 + + :param tenors: The tenors of this FxForwardTenorCurveData. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def rates(self): + """Gets the rates of this FxForwardTenorCurveData. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :return: The rates of this FxForwardTenorCurveData. # noqa: E501 + :rtype: list[float] + """ + return self._rates + + @rates.setter + def rates(self, rates): + """Sets the rates of this FxForwardTenorCurveData. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :param rates: The rates of this FxForwardTenorCurveData. # noqa: E501 + :type rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and rates is None: # noqa: E501 + raise ValueError("Invalid value for `rates`, must not be `None`") # noqa: E501 + + self._rates = rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardTenorCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardTenorCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardTenorCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardTenorCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardTenorCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardTenorCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardTenorCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardTenorCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardTenorCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardTenorCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_tenor_curve_data_all_of.py b/sdk/lusid/models/fx_forward_tenor_curve_data_all_of.py new file mode 100644 index 00000000000..16c73a6cf3e --- /dev/null +++ b/sdk/lusid/models/fx_forward_tenor_curve_data_all_of.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardTenorCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'tenors': 'list[str]', + 'rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'tenors': 'tenors', + 'rates': 'rates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'tenors': 'required', + 'rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, tenors=None, rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardTenorCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param tenors: Tenors for which the forward rates apply (required) + :type tenors: list[str] + :param rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) (required) + :type rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._tenors = None + self._rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.tenors = tenors + self.rates = rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + EffectiveAt date of the quoted rates # noqa: E501 + + :return: The base_date of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardTenorCurveDataAllOf. + + EffectiveAt date of the quoted rates # noqa: E501 + + :param base_date: The base_date of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardTenorCurveDataAllOf. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardTenorCurveDataAllOf. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def tenors(self): + """Gets the tenors of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + Tenors for which the forward rates apply # noqa: E501 + + :return: The tenors of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this FxForwardTenorCurveDataAllOf. + + Tenors for which the forward rates apply # noqa: E501 + + :param tenors: The tenors of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def rates(self): + """Gets the rates of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :return: The rates of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._rates + + @rates.setter + def rates(self, rates): + """Sets the rates of this FxForwardTenorCurveDataAllOf. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy) # noqa: E501 + + :param rates: The rates of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and rates is None: # noqa: E501 + raise ValueError("Invalid value for `rates`, must not be `None`") # noqa: E501 + + self._rates = rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardTenorCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardTenorCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardTenorCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardTenorCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardTenorCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardTenorCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_tenor_pips_curve_data.py b/sdk/lusid/models/fx_forward_tenor_pips_curve_data.py new file mode 100644 index 00000000000..66bfef76d76 --- /dev/null +++ b/sdk/lusid/models/fx_forward_tenor_pips_curve_data.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardTenorPipsCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'tenors': 'list[str]', + 'pip_rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'tenors': 'tenors', + 'pip_rates': 'pipRates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'tenors': 'required', + 'pip_rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, tenors=None, pip_rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardTenorPipsCurveData - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted pip rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param tenors: Tenors for which the forward rates apply (required) + :type tenors: list[str] + :param pip_rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips (required) + :type pip_rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._tenors = None + self._pip_rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.tenors = tenors + self.pip_rates = pip_rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardTenorPipsCurveData. # noqa: E501 + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :return: The base_date of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardTenorPipsCurveData. + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :param base_date: The base_date of this FxForwardTenorPipsCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardTenorPipsCurveData. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardTenorPipsCurveData. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardTenorPipsCurveData. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardTenorPipsCurveData. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardTenorPipsCurveData. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardTenorPipsCurveData. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def tenors(self): + """Gets the tenors of this FxForwardTenorPipsCurveData. # noqa: E501 + + Tenors for which the forward rates apply # noqa: E501 + + :return: The tenors of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this FxForwardTenorPipsCurveData. + + Tenors for which the forward rates apply # noqa: E501 + + :param tenors: The tenors of this FxForwardTenorPipsCurveData. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def pip_rates(self): + """Gets the pip_rates of this FxForwardTenorPipsCurveData. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :return: The pip_rates of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: list[float] + """ + return self._pip_rates + + @pip_rates.setter + def pip_rates(self, pip_rates): + """Sets the pip_rates of this FxForwardTenorPipsCurveData. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :param pip_rates: The pip_rates of this FxForwardTenorPipsCurveData. # noqa: E501 + :type pip_rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and pip_rates is None: # noqa: E501 + raise ValueError("Invalid value for `pip_rates`, must not be `None`") # noqa: E501 + + self._pip_rates = pip_rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardTenorPipsCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardTenorPipsCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardTenorPipsCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardTenorPipsCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardTenorPipsCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardTenorPipsCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardTenorPipsCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardTenorPipsCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardTenorPipsCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_forward_tenor_pips_curve_data_all_of.py b/sdk/lusid/models/fx_forward_tenor_pips_curve_data_all_of.py new file mode 100644 index 00000000000..58cdc841df6 --- /dev/null +++ b/sdk/lusid/models/fx_forward_tenor_pips_curve_data_all_of.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxForwardTenorPipsCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'dom_ccy': 'str', + 'fgn_ccy': 'str', + 'tenors': 'list[str]', + 'pip_rates': 'list[float]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'dom_ccy': 'domCcy', + 'fgn_ccy': 'fgnCcy', + 'tenors': 'tenors', + 'pip_rates': 'pipRates', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'dom_ccy': 'required', + 'fgn_ccy': 'required', + 'tenors': 'required', + 'pip_rates': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, dom_ccy=None, fgn_ccy=None, tenors=None, pip_rates=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxForwardTenorPipsCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: EffectiveAt date of the quoted pip rates (required) + :type base_date: datetime + :param dom_ccy: Domestic currency of the fx forward (required) + :type dom_ccy: str + :param fgn_ccy: Foreign currency of the fx forward (required) + :type fgn_ccy: str + :param tenors: Tenors for which the forward rates apply (required) + :type tenors: list[str] + :param pip_rates: Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips (required) + :type pip_rates: list[float] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._dom_ccy = None + self._fgn_ccy = None + self._tenors = None + self._pip_rates = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.dom_ccy = dom_ccy + self.fgn_ccy = fgn_ccy + self.tenors = tenors + self.pip_rates = pip_rates + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :return: The base_date of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxForwardTenorPipsCurveDataAllOf. + + EffectiveAt date of the quoted pip rates # noqa: E501 + + :param base_date: The base_date of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + Domestic currency of the fx forward # noqa: E501 + + :return: The dom_ccy of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxForwardTenorPipsCurveDataAllOf. + + Domestic currency of the fx forward # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + Foreign currency of the fx forward # noqa: E501 + + :return: The fgn_ccy of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxForwardTenorPipsCurveDataAllOf. + + Foreign currency of the fx forward # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def tenors(self): + """Gets the tenors of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + Tenors for which the forward rates apply # noqa: E501 + + :return: The tenors of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: list[str] + """ + return self._tenors + + @tenors.setter + def tenors(self, tenors): + """Sets the tenors of this FxForwardTenorPipsCurveDataAllOf. + + Tenors for which the forward rates apply # noqa: E501 + + :param tenors: The tenors of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type tenors: list[str] + """ + if self.local_vars_configuration.client_side_validation and tenors is None: # noqa: E501 + raise ValueError("Invalid value for `tenors`, must not be `None`") # noqa: E501 + + self._tenors = tenors + + @property + def pip_rates(self): + """Gets the pip_rates of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :return: The pip_rates of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: list[float] + """ + return self._pip_rates + + @pip_rates.setter + def pip_rates(self, pip_rates): + """Sets the pip_rates of this FxForwardTenorPipsCurveDataAllOf. + + Rates provided for the fx forward (price in FgnCcy per unit of DomCcy), expressed in pips # noqa: E501 + + :param pip_rates: The pip_rates of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type pip_rates: list[float] + """ + if self.local_vars_configuration.client_side_validation and pip_rates is None: # noqa: E501 + raise ValueError("Invalid value for `pip_rates`, must not be `None`") # noqa: E501 + + self._pip_rates = pip_rates + + @property + def lineage(self): + """Gets the lineage of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxForwardTenorPipsCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxForwardTenorPipsCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxForwardTenorPipsCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxForwardTenorPipsCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxForwardTenorPipsCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_option.py b/sdk/lusid/models/fx_option.py new file mode 100644 index 00000000000..aab4d0f167f --- /dev/null +++ b/sdk/lusid/models/fx_option.py @@ -0,0 +1,646 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxOption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'dom_ccy': 'str', + 'dom_amount': 'float', + 'fgn_ccy': 'str', + 'fgn_amount': 'float', + 'strike': 'float', + 'barriers': 'list[Barrier]', + 'exercise_type': 'str', + 'is_call_not_put': 'bool', + 'is_delivery_not_cash': 'bool', + 'is_payoff_digital': 'bool', + 'option_maturity_date': 'datetime', + 'option_settlement_date': 'datetime', + 'payout_style': 'str', + 'premium': 'Premium', + 'touches': 'list[Touch]', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'dom_ccy': 'domCcy', + 'dom_amount': 'domAmount', + 'fgn_ccy': 'fgnCcy', + 'fgn_amount': 'fgnAmount', + 'strike': 'strike', + 'barriers': 'barriers', + 'exercise_type': 'exerciseType', + 'is_call_not_put': 'isCallNotPut', + 'is_delivery_not_cash': 'isDeliveryNotCash', + 'is_payoff_digital': 'isPayoffDigital', + 'option_maturity_date': 'optionMaturityDate', + 'option_settlement_date': 'optionSettlementDate', + 'payout_style': 'payoutStyle', + 'premium': 'premium', + 'touches': 'touches', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'dom_ccy': 'required', + 'dom_amount': 'optional', + 'fgn_ccy': 'required', + 'fgn_amount': 'optional', + 'strike': 'optional', + 'barriers': 'optional', + 'exercise_type': 'optional', + 'is_call_not_put': 'required', + 'is_delivery_not_cash': 'required', + 'is_payoff_digital': 'optional', + 'option_maturity_date': 'required', + 'option_settlement_date': 'required', + 'payout_style': 'optional', + 'premium': 'optional', + 'touches': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, dom_ccy=None, dom_amount=None, fgn_ccy=None, fgn_amount=None, strike=None, barriers=None, exercise_type=None, is_call_not_put=None, is_delivery_not_cash=None, is_payoff_digital=None, option_maturity_date=None, option_settlement_date=None, payout_style=None, premium=None, touches=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FxOption - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param dom_amount: The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. + :type dom_amount: float + :param fgn_ccy: The foreign currency of the FX. (required) + :type fgn_ccy: str + :param fgn_amount: For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. + :type fgn_amount: float + :param strike: The strike of the option. + :type strike: float + :param barriers: For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. + :type barriers: list[lusid.Barrier] + :param exercise_type: Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. + :type exercise_type: str + :param is_call_not_put: True if the option is a call, false if the option is a put. (required) + :type is_call_not_put: bool + :param is_delivery_not_cash: True if the option is settled in cash, false if delivery. (required) + :type is_delivery_not_cash: bool + :param is_payoff_digital: By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). + :type is_payoff_digital: bool + :param option_maturity_date: The maturity date of the option. (required) + :type option_maturity_date: datetime + :param option_settlement_date: The settlement date of the option. (required) + :type option_settlement_date: datetime + :param payout_style: PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. + :type payout_style: str + :param premium: + :type premium: lusid.Premium + :param touches: For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. + :type touches: list[lusid.Touch] + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._dom_ccy = None + self._dom_amount = None + self._fgn_ccy = None + self._fgn_amount = None + self._strike = None + self._barriers = None + self._exercise_type = None + self._is_call_not_put = None + self._is_delivery_not_cash = None + self._is_payoff_digital = None + self._option_maturity_date = None + self._option_settlement_date = None + self._payout_style = None + self._premium = None + self._touches = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.dom_ccy = dom_ccy + self.dom_amount = dom_amount + self.fgn_ccy = fgn_ccy + self.fgn_amount = fgn_amount + self.strike = strike + self.barriers = barriers + self.exercise_type = exercise_type + self.is_call_not_put = is_call_not_put + self.is_delivery_not_cash = is_delivery_not_cash + if is_payoff_digital is not None: + self.is_payoff_digital = is_payoff_digital + self.option_maturity_date = option_maturity_date + self.option_settlement_date = option_settlement_date + self.payout_style = payout_style + if premium is not None: + self.premium = premium + self.touches = touches + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FxOption. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FxOption. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FxOption. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FxOption. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxOption. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this FxOption. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxOption. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxOption. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def dom_amount(self): + """Gets the dom_amount of this FxOption. # noqa: E501 + + The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. # noqa: E501 + + :return: The dom_amount of this FxOption. # noqa: E501 + :rtype: float + """ + return self._dom_amount + + @dom_amount.setter + def dom_amount(self, dom_amount): + """Sets the dom_amount of this FxOption. + + The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. # noqa: E501 + + :param dom_amount: The dom_amount of this FxOption. # noqa: E501 + :type dom_amount: float + """ + + self._dom_amount = dom_amount + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxOption. # noqa: E501 + + The foreign currency of the FX. # noqa: E501 + + :return: The fgn_ccy of this FxOption. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxOption. + + The foreign currency of the FX. # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxOption. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def fgn_amount(self): + """Gets the fgn_amount of this FxOption. # noqa: E501 + + For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. # noqa: E501 + + :return: The fgn_amount of this FxOption. # noqa: E501 + :rtype: float + """ + return self._fgn_amount + + @fgn_amount.setter + def fgn_amount(self, fgn_amount): + """Sets the fgn_amount of this FxOption. + + For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. # noqa: E501 + + :param fgn_amount: The fgn_amount of this FxOption. # noqa: E501 + :type fgn_amount: float + """ + + self._fgn_amount = fgn_amount + + @property + def strike(self): + """Gets the strike of this FxOption. # noqa: E501 + + The strike of the option. # noqa: E501 + + :return: The strike of this FxOption. # noqa: E501 + :rtype: float + """ + return self._strike + + @strike.setter + def strike(self, strike): + """Sets the strike of this FxOption. + + The strike of the option. # noqa: E501 + + :param strike: The strike of this FxOption. # noqa: E501 + :type strike: float + """ + + self._strike = strike + + @property + def barriers(self): + """Gets the barriers of this FxOption. # noqa: E501 + + For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :return: The barriers of this FxOption. # noqa: E501 + :rtype: list[lusid.Barrier] + """ + return self._barriers + + @barriers.setter + def barriers(self, barriers): + """Sets the barriers of this FxOption. + + For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :param barriers: The barriers of this FxOption. # noqa: E501 + :type barriers: list[lusid.Barrier] + """ + + self._barriers = barriers + + @property + def exercise_type(self): + """Gets the exercise_type of this FxOption. # noqa: E501 + + Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :return: The exercise_type of this FxOption. # noqa: E501 + :rtype: str + """ + return self._exercise_type + + @exercise_type.setter + def exercise_type(self, exercise_type): + """Sets the exercise_type of this FxOption. + + Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :param exercise_type: The exercise_type of this FxOption. # noqa: E501 + :type exercise_type: str + """ + + self._exercise_type = exercise_type + + @property + def is_call_not_put(self): + """Gets the is_call_not_put of this FxOption. # noqa: E501 + + True if the option is a call, false if the option is a put. # noqa: E501 + + :return: The is_call_not_put of this FxOption. # noqa: E501 + :rtype: bool + """ + return self._is_call_not_put + + @is_call_not_put.setter + def is_call_not_put(self, is_call_not_put): + """Sets the is_call_not_put of this FxOption. + + True if the option is a call, false if the option is a put. # noqa: E501 + + :param is_call_not_put: The is_call_not_put of this FxOption. # noqa: E501 + :type is_call_not_put: bool + """ + if self.local_vars_configuration.client_side_validation and is_call_not_put is None: # noqa: E501 + raise ValueError("Invalid value for `is_call_not_put`, must not be `None`") # noqa: E501 + + self._is_call_not_put = is_call_not_put + + @property + def is_delivery_not_cash(self): + """Gets the is_delivery_not_cash of this FxOption. # noqa: E501 + + True if the option is settled in cash, false if delivery. # noqa: E501 + + :return: The is_delivery_not_cash of this FxOption. # noqa: E501 + :rtype: bool + """ + return self._is_delivery_not_cash + + @is_delivery_not_cash.setter + def is_delivery_not_cash(self, is_delivery_not_cash): + """Sets the is_delivery_not_cash of this FxOption. + + True if the option is settled in cash, false if delivery. # noqa: E501 + + :param is_delivery_not_cash: The is_delivery_not_cash of this FxOption. # noqa: E501 + :type is_delivery_not_cash: bool + """ + if self.local_vars_configuration.client_side_validation and is_delivery_not_cash is None: # noqa: E501 + raise ValueError("Invalid value for `is_delivery_not_cash`, must not be `None`") # noqa: E501 + + self._is_delivery_not_cash = is_delivery_not_cash + + @property + def is_payoff_digital(self): + """Gets the is_payoff_digital of this FxOption. # noqa: E501 + + By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). # noqa: E501 + + :return: The is_payoff_digital of this FxOption. # noqa: E501 + :rtype: bool + """ + return self._is_payoff_digital + + @is_payoff_digital.setter + def is_payoff_digital(self, is_payoff_digital): + """Sets the is_payoff_digital of this FxOption. + + By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). # noqa: E501 + + :param is_payoff_digital: The is_payoff_digital of this FxOption. # noqa: E501 + :type is_payoff_digital: bool + """ + + self._is_payoff_digital = is_payoff_digital + + @property + def option_maturity_date(self): + """Gets the option_maturity_date of this FxOption. # noqa: E501 + + The maturity date of the option. # noqa: E501 + + :return: The option_maturity_date of this FxOption. # noqa: E501 + :rtype: datetime + """ + return self._option_maturity_date + + @option_maturity_date.setter + def option_maturity_date(self, option_maturity_date): + """Sets the option_maturity_date of this FxOption. + + The maturity date of the option. # noqa: E501 + + :param option_maturity_date: The option_maturity_date of this FxOption. # noqa: E501 + :type option_maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_maturity_date`, must not be `None`") # noqa: E501 + + self._option_maturity_date = option_maturity_date + + @property + def option_settlement_date(self): + """Gets the option_settlement_date of this FxOption. # noqa: E501 + + The settlement date of the option. # noqa: E501 + + :return: The option_settlement_date of this FxOption. # noqa: E501 + :rtype: datetime + """ + return self._option_settlement_date + + @option_settlement_date.setter + def option_settlement_date(self, option_settlement_date): + """Sets the option_settlement_date of this FxOption. + + The settlement date of the option. # noqa: E501 + + :param option_settlement_date: The option_settlement_date of this FxOption. # noqa: E501 + :type option_settlement_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_settlement_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_settlement_date`, must not be `None`") # noqa: E501 + + self._option_settlement_date = option_settlement_date + + @property + def payout_style(self): + """Gets the payout_style of this FxOption. # noqa: E501 + + PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. # noqa: E501 + + :return: The payout_style of this FxOption. # noqa: E501 + :rtype: str + """ + return self._payout_style + + @payout_style.setter + def payout_style(self, payout_style): + """Sets the payout_style of this FxOption. + + PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. # noqa: E501 + + :param payout_style: The payout_style of this FxOption. # noqa: E501 + :type payout_style: str + """ + + self._payout_style = payout_style + + @property + def premium(self): + """Gets the premium of this FxOption. # noqa: E501 + + + :return: The premium of this FxOption. # noqa: E501 + :rtype: lusid.Premium + """ + return self._premium + + @premium.setter + def premium(self, premium): + """Sets the premium of this FxOption. + + + :param premium: The premium of this FxOption. # noqa: E501 + :type premium: lusid.Premium + """ + + self._premium = premium + + @property + def touches(self): + """Gets the touches of this FxOption. # noqa: E501 + + For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :return: The touches of this FxOption. # noqa: E501 + :rtype: list[lusid.Touch] + """ + return self._touches + + @touches.setter + def touches(self, touches): + """Sets the touches of this FxOption. + + For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :param touches: The touches of this FxOption. # noqa: E501 + :type touches: list[lusid.Touch] + """ + + self._touches = touches + + @property + def instrument_type(self): + """Gets the instrument_type of this FxOption. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FxOption. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FxOption. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FxOption. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_option_all_of.py b/sdk/lusid/models/fx_option_all_of.py new file mode 100644 index 00000000000..9455520ea98 --- /dev/null +++ b/sdk/lusid/models/fx_option_all_of.py @@ -0,0 +1,646 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxOptionAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'dom_ccy': 'str', + 'dom_amount': 'float', + 'fgn_ccy': 'str', + 'fgn_amount': 'float', + 'strike': 'float', + 'barriers': 'list[Barrier]', + 'exercise_type': 'str', + 'is_call_not_put': 'bool', + 'is_delivery_not_cash': 'bool', + 'is_payoff_digital': 'bool', + 'option_maturity_date': 'datetime', + 'option_settlement_date': 'datetime', + 'payout_style': 'str', + 'premium': 'Premium', + 'touches': 'list[Touch]', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'dom_ccy': 'domCcy', + 'dom_amount': 'domAmount', + 'fgn_ccy': 'fgnCcy', + 'fgn_amount': 'fgnAmount', + 'strike': 'strike', + 'barriers': 'barriers', + 'exercise_type': 'exerciseType', + 'is_call_not_put': 'isCallNotPut', + 'is_delivery_not_cash': 'isDeliveryNotCash', + 'is_payoff_digital': 'isPayoffDigital', + 'option_maturity_date': 'optionMaturityDate', + 'option_settlement_date': 'optionSettlementDate', + 'payout_style': 'payoutStyle', + 'premium': 'premium', + 'touches': 'touches', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'dom_ccy': 'required', + 'dom_amount': 'optional', + 'fgn_ccy': 'required', + 'fgn_amount': 'optional', + 'strike': 'optional', + 'barriers': 'optional', + 'exercise_type': 'optional', + 'is_call_not_put': 'required', + 'is_delivery_not_cash': 'required', + 'is_payoff_digital': 'optional', + 'option_maturity_date': 'required', + 'option_settlement_date': 'required', + 'payout_style': 'optional', + 'premium': 'optional', + 'touches': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, dom_ccy=None, dom_amount=None, fgn_ccy=None, fgn_amount=None, strike=None, barriers=None, exercise_type=None, is_call_not_put=None, is_delivery_not_cash=None, is_payoff_digital=None, option_maturity_date=None, option_settlement_date=None, payout_style=None, premium=None, touches=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FxOptionAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param dom_amount: The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. + :type dom_amount: float + :param fgn_ccy: The foreign currency of the FX. (required) + :type fgn_ccy: str + :param fgn_amount: For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. + :type fgn_amount: float + :param strike: The strike of the option. + :type strike: float + :param barriers: For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. + :type barriers: list[lusid.Barrier] + :param exercise_type: Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. + :type exercise_type: str + :param is_call_not_put: True if the option is a call, false if the option is a put. (required) + :type is_call_not_put: bool + :param is_delivery_not_cash: True if the option is settled in cash, false if delivery. (required) + :type is_delivery_not_cash: bool + :param is_payoff_digital: By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). + :type is_payoff_digital: bool + :param option_maturity_date: The maturity date of the option. (required) + :type option_maturity_date: datetime + :param option_settlement_date: The settlement date of the option. (required) + :type option_settlement_date: datetime + :param payout_style: PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. + :type payout_style: str + :param premium: + :type premium: lusid.Premium + :param touches: For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. + :type touches: list[lusid.Touch] + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._dom_ccy = None + self._dom_amount = None + self._fgn_ccy = None + self._fgn_amount = None + self._strike = None + self._barriers = None + self._exercise_type = None + self._is_call_not_put = None + self._is_delivery_not_cash = None + self._is_payoff_digital = None + self._option_maturity_date = None + self._option_settlement_date = None + self._payout_style = None + self._premium = None + self._touches = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.dom_ccy = dom_ccy + self.dom_amount = dom_amount + self.fgn_ccy = fgn_ccy + self.fgn_amount = fgn_amount + self.strike = strike + self.barriers = barriers + self.exercise_type = exercise_type + self.is_call_not_put = is_call_not_put + self.is_delivery_not_cash = is_delivery_not_cash + if is_payoff_digital is not None: + self.is_payoff_digital = is_payoff_digital + self.option_maturity_date = option_maturity_date + self.option_settlement_date = option_settlement_date + self.payout_style = payout_style + if premium is not None: + self.premium = premium + self.touches = touches + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this FxOptionAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this FxOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this FxOptionAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this FxOptionAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this FxOptionAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this FxOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this FxOptionAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this FxOptionAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def dom_amount(self): + """Gets the dom_amount of this FxOptionAllOf. # noqa: E501 + + The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. # noqa: E501 + + :return: The dom_amount of this FxOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._dom_amount + + @dom_amount.setter + def dom_amount(self, dom_amount): + """Sets the dom_amount of this FxOptionAllOf. + + The Amount of DomCcy that will be exchanged if the option is exercised. This amount should be a positive number, with the Call/Put flag used to indicate direction. The corresponding amount of FgnCcy that will be exchanged is this amount times the strike. Note there is no rounding performed on this computed value. This is an optional field, if not set the option ContractSize will default to 1. # noqa: E501 + + :param dom_amount: The dom_amount of this FxOptionAllOf. # noqa: E501 + :type dom_amount: float + """ + + self._dom_amount = dom_amount + + @property + def fgn_ccy(self): + """Gets the fgn_ccy of this FxOptionAllOf. # noqa: E501 + + The foreign currency of the FX. # noqa: E501 + + :return: The fgn_ccy of this FxOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._fgn_ccy + + @fgn_ccy.setter + def fgn_ccy(self, fgn_ccy): + """Sets the fgn_ccy of this FxOptionAllOf. + + The foreign currency of the FX. # noqa: E501 + + :param fgn_ccy: The fgn_ccy of this FxOptionAllOf. # noqa: E501 + :type fgn_ccy: str + """ + if self.local_vars_configuration.client_side_validation and fgn_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `fgn_ccy`, must not be `None`") # noqa: E501 + + self._fgn_ccy = fgn_ccy + + @property + def fgn_amount(self): + """Gets the fgn_amount of this FxOptionAllOf. # noqa: E501 + + For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. # noqa: E501 + + :return: The fgn_amount of this FxOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._fgn_amount + + @fgn_amount.setter + def fgn_amount(self, fgn_amount): + """Sets the fgn_amount of this FxOptionAllOf. + + For a vanilla FxOption contract, FgnAmount cannot be set. In case of a digital FxOption (IsPayoffDigital==true) a payoff (if the option is in the money) can be either in domestic or in foreign currency - for the latter FgnAmount must be set. Note: It is invalid to have FgnAmount and DomAmount at the same time. # noqa: E501 + + :param fgn_amount: The fgn_amount of this FxOptionAllOf. # noqa: E501 + :type fgn_amount: float + """ + + self._fgn_amount = fgn_amount + + @property + def strike(self): + """Gets the strike of this FxOptionAllOf. # noqa: E501 + + The strike of the option. # noqa: E501 + + :return: The strike of this FxOptionAllOf. # noqa: E501 + :rtype: float + """ + return self._strike + + @strike.setter + def strike(self, strike): + """Sets the strike of this FxOptionAllOf. + + The strike of the option. # noqa: E501 + + :param strike: The strike of this FxOptionAllOf. # noqa: E501 + :type strike: float + """ + + self._strike = strike + + @property + def barriers(self): + """Gets the barriers of this FxOptionAllOf. # noqa: E501 + + For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :return: The barriers of this FxOptionAllOf. # noqa: E501 + :rtype: list[lusid.Barrier] + """ + return self._barriers + + @barriers.setter + def barriers(self, barriers): + """Sets the barriers of this FxOptionAllOf. + + For a barrier option the list should not be empty. Up to two barriers are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :param barriers: The barriers of this FxOptionAllOf. # noqa: E501 + :type barriers: list[lusid.Barrier] + """ + + self._barriers = barriers + + @property + def exercise_type(self): + """Gets the exercise_type of this FxOptionAllOf. # noqa: E501 + + Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :return: The exercise_type of this FxOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._exercise_type + + @exercise_type.setter + def exercise_type(self, exercise_type): + """Sets the exercise_type of this FxOptionAllOf. + + Type of optionality that is present; European, Bermudan, American. Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :param exercise_type: The exercise_type of this FxOptionAllOf. # noqa: E501 + :type exercise_type: str + """ + + self._exercise_type = exercise_type + + @property + def is_call_not_put(self): + """Gets the is_call_not_put of this FxOptionAllOf. # noqa: E501 + + True if the option is a call, false if the option is a put. # noqa: E501 + + :return: The is_call_not_put of this FxOptionAllOf. # noqa: E501 + :rtype: bool + """ + return self._is_call_not_put + + @is_call_not_put.setter + def is_call_not_put(self, is_call_not_put): + """Sets the is_call_not_put of this FxOptionAllOf. + + True if the option is a call, false if the option is a put. # noqa: E501 + + :param is_call_not_put: The is_call_not_put of this FxOptionAllOf. # noqa: E501 + :type is_call_not_put: bool + """ + if self.local_vars_configuration.client_side_validation and is_call_not_put is None: # noqa: E501 + raise ValueError("Invalid value for `is_call_not_put`, must not be `None`") # noqa: E501 + + self._is_call_not_put = is_call_not_put + + @property + def is_delivery_not_cash(self): + """Gets the is_delivery_not_cash of this FxOptionAllOf. # noqa: E501 + + True if the option is settled in cash, false if delivery. # noqa: E501 + + :return: The is_delivery_not_cash of this FxOptionAllOf. # noqa: E501 + :rtype: bool + """ + return self._is_delivery_not_cash + + @is_delivery_not_cash.setter + def is_delivery_not_cash(self, is_delivery_not_cash): + """Sets the is_delivery_not_cash of this FxOptionAllOf. + + True if the option is settled in cash, false if delivery. # noqa: E501 + + :param is_delivery_not_cash: The is_delivery_not_cash of this FxOptionAllOf. # noqa: E501 + :type is_delivery_not_cash: bool + """ + if self.local_vars_configuration.client_side_validation and is_delivery_not_cash is None: # noqa: E501 + raise ValueError("Invalid value for `is_delivery_not_cash`, must not be `None`") # noqa: E501 + + self._is_delivery_not_cash = is_delivery_not_cash + + @property + def is_payoff_digital(self): + """Gets the is_payoff_digital of this FxOptionAllOf. # noqa: E501 + + By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). # noqa: E501 + + :return: The is_payoff_digital of this FxOptionAllOf. # noqa: E501 + :rtype: bool + """ + return self._is_payoff_digital + + @is_payoff_digital.setter + def is_payoff_digital(self, is_payoff_digital): + """Sets the is_payoff_digital of this FxOptionAllOf. + + By default IsPayoffDigital is false. If IsPayoffDigital=true, the option is 'digital', and the option payoff is 0 or 1 unit of currency, instead of a vanilla CallPayoff=max(spot-strike,0) or PutPayoff=max(strike-spot,0). # noqa: E501 + + :param is_payoff_digital: The is_payoff_digital of this FxOptionAllOf. # noqa: E501 + :type is_payoff_digital: bool + """ + + self._is_payoff_digital = is_payoff_digital + + @property + def option_maturity_date(self): + """Gets the option_maturity_date of this FxOptionAllOf. # noqa: E501 + + The maturity date of the option. # noqa: E501 + + :return: The option_maturity_date of this FxOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._option_maturity_date + + @option_maturity_date.setter + def option_maturity_date(self, option_maturity_date): + """Sets the option_maturity_date of this FxOptionAllOf. + + The maturity date of the option. # noqa: E501 + + :param option_maturity_date: The option_maturity_date of this FxOptionAllOf. # noqa: E501 + :type option_maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_maturity_date`, must not be `None`") # noqa: E501 + + self._option_maturity_date = option_maturity_date + + @property + def option_settlement_date(self): + """Gets the option_settlement_date of this FxOptionAllOf. # noqa: E501 + + The settlement date of the option. # noqa: E501 + + :return: The option_settlement_date of this FxOptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._option_settlement_date + + @option_settlement_date.setter + def option_settlement_date(self, option_settlement_date): + """Sets the option_settlement_date of this FxOptionAllOf. + + The settlement date of the option. # noqa: E501 + + :param option_settlement_date: The option_settlement_date of this FxOptionAllOf. # noqa: E501 + :type option_settlement_date: datetime + """ + if self.local_vars_configuration.client_side_validation and option_settlement_date is None: # noqa: E501 + raise ValueError("Invalid value for `option_settlement_date`, must not be `None`") # noqa: E501 + + self._option_settlement_date = option_settlement_date + + @property + def payout_style(self): + """Gets the payout_style of this FxOptionAllOf. # noqa: E501 + + PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. # noqa: E501 + + :return: The payout_style of this FxOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._payout_style + + @payout_style.setter + def payout_style(self, payout_style): + """Sets the payout_style of this FxOptionAllOf. + + PayoutStyle for touch options. For options without touch optionality (IsTouch==false), PayoutStyle should not be set (ot it can be set to None) For options with touch optionality (IsTouch==true), PayoutStyle cannot be None. Supported string (enumeration) values are: [Deferred, Immediate]. # noqa: E501 + + :param payout_style: The payout_style of this FxOptionAllOf. # noqa: E501 + :type payout_style: str + """ + + self._payout_style = payout_style + + @property + def premium(self): + """Gets the premium of this FxOptionAllOf. # noqa: E501 + + + :return: The premium of this FxOptionAllOf. # noqa: E501 + :rtype: lusid.Premium + """ + return self._premium + + @premium.setter + def premium(self, premium): + """Sets the premium of this FxOptionAllOf. + + + :param premium: The premium of this FxOptionAllOf. # noqa: E501 + :type premium: lusid.Premium + """ + + self._premium = premium + + @property + def touches(self): + """Gets the touches of this FxOptionAllOf. # noqa: E501 + + For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :return: The touches of this FxOptionAllOf. # noqa: E501 + :rtype: list[lusid.Touch] + """ + return self._touches + + @touches.setter + def touches(self, touches): + """Sets the touches of this FxOptionAllOf. + + For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty. # noqa: E501 + + :param touches: The touches of this FxOptionAllOf. # noqa: E501 + :type touches: list[lusid.Touch] + """ + + self._touches = touches + + @property + def instrument_type(self): + """Gets the instrument_type of this FxOptionAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FxOptionAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FxOptionAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FxOptionAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxOptionAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxOptionAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_swap.py b/sdk/lusid/models/fx_swap.py new file mode 100644 index 00000000000..083d258dac8 --- /dev/null +++ b/sdk/lusid/models/fx_swap.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxSwap(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'near_fx_forward': 'FxForward', + 'far_fx_forward': 'FxForward', + 'notional_symmetry': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'near_fx_forward': 'nearFxForward', + 'far_fx_forward': 'farFxForward', + 'notional_symmetry': 'notionalSymmetry', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'near_fx_forward': 'required', + 'far_fx_forward': 'required', + 'notional_symmetry': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, near_fx_forward=None, far_fx_forward=None, notional_symmetry=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FxSwap - a model defined in OpenAPI" + + :param near_fx_forward: (required) + :type near_fx_forward: lusid.FxForward + :param far_fx_forward: (required) + :type far_fx_forward: lusid.FxForward + :param notional_symmetry: The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. + :type notional_symmetry: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._near_fx_forward = None + self._far_fx_forward = None + self._notional_symmetry = None + self._instrument_type = None + self.discriminator = None + + self.near_fx_forward = near_fx_forward + self.far_fx_forward = far_fx_forward + self.notional_symmetry = notional_symmetry + self.instrument_type = instrument_type + + @property + def near_fx_forward(self): + """Gets the near_fx_forward of this FxSwap. # noqa: E501 + + + :return: The near_fx_forward of this FxSwap. # noqa: E501 + :rtype: lusid.FxForward + """ + return self._near_fx_forward + + @near_fx_forward.setter + def near_fx_forward(self, near_fx_forward): + """Sets the near_fx_forward of this FxSwap. + + + :param near_fx_forward: The near_fx_forward of this FxSwap. # noqa: E501 + :type near_fx_forward: lusid.FxForward + """ + if self.local_vars_configuration.client_side_validation and near_fx_forward is None: # noqa: E501 + raise ValueError("Invalid value for `near_fx_forward`, must not be `None`") # noqa: E501 + + self._near_fx_forward = near_fx_forward + + @property + def far_fx_forward(self): + """Gets the far_fx_forward of this FxSwap. # noqa: E501 + + + :return: The far_fx_forward of this FxSwap. # noqa: E501 + :rtype: lusid.FxForward + """ + return self._far_fx_forward + + @far_fx_forward.setter + def far_fx_forward(self, far_fx_forward): + """Sets the far_fx_forward of this FxSwap. + + + :param far_fx_forward: The far_fx_forward of this FxSwap. # noqa: E501 + :type far_fx_forward: lusid.FxForward + """ + if self.local_vars_configuration.client_side_validation and far_fx_forward is None: # noqa: E501 + raise ValueError("Invalid value for `far_fx_forward`, must not be `None`") # noqa: E501 + + self._far_fx_forward = far_fx_forward + + @property + def notional_symmetry(self): + """Gets the notional_symmetry of this FxSwap. # noqa: E501 + + The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. # noqa: E501 + + :return: The notional_symmetry of this FxSwap. # noqa: E501 + :rtype: str + """ + return self._notional_symmetry + + @notional_symmetry.setter + def notional_symmetry(self, notional_symmetry): + """Sets the notional_symmetry of this FxSwap. + + The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. # noqa: E501 + + :param notional_symmetry: The notional_symmetry of this FxSwap. # noqa: E501 + :type notional_symmetry: str + """ + + self._notional_symmetry = notional_symmetry + + @property + def instrument_type(self): + """Gets the instrument_type of this FxSwap. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FxSwap. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FxSwap. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FxSwap. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxSwap): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxSwap): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_swap_all_of.py b/sdk/lusid/models/fx_swap_all_of.py new file mode 100644 index 00000000000..5798891be1f --- /dev/null +++ b/sdk/lusid/models/fx_swap_all_of.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxSwapAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'near_fx_forward': 'FxForward', + 'far_fx_forward': 'FxForward', + 'notional_symmetry': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'near_fx_forward': 'nearFxForward', + 'far_fx_forward': 'farFxForward', + 'notional_symmetry': 'notionalSymmetry', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'near_fx_forward': 'required', + 'far_fx_forward': 'required', + 'notional_symmetry': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, near_fx_forward=None, far_fx_forward=None, notional_symmetry=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """FxSwapAllOf - a model defined in OpenAPI" + + :param near_fx_forward: (required) + :type near_fx_forward: lusid.FxForward + :param far_fx_forward: (required) + :type far_fx_forward: lusid.FxForward + :param notional_symmetry: The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. + :type notional_symmetry: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._near_fx_forward = None + self._far_fx_forward = None + self._notional_symmetry = None + self._instrument_type = None + self.discriminator = None + + self.near_fx_forward = near_fx_forward + self.far_fx_forward = far_fx_forward + self.notional_symmetry = notional_symmetry + self.instrument_type = instrument_type + + @property + def near_fx_forward(self): + """Gets the near_fx_forward of this FxSwapAllOf. # noqa: E501 + + + :return: The near_fx_forward of this FxSwapAllOf. # noqa: E501 + :rtype: lusid.FxForward + """ + return self._near_fx_forward + + @near_fx_forward.setter + def near_fx_forward(self, near_fx_forward): + """Sets the near_fx_forward of this FxSwapAllOf. + + + :param near_fx_forward: The near_fx_forward of this FxSwapAllOf. # noqa: E501 + :type near_fx_forward: lusid.FxForward + """ + if self.local_vars_configuration.client_side_validation and near_fx_forward is None: # noqa: E501 + raise ValueError("Invalid value for `near_fx_forward`, must not be `None`") # noqa: E501 + + self._near_fx_forward = near_fx_forward + + @property + def far_fx_forward(self): + """Gets the far_fx_forward of this FxSwapAllOf. # noqa: E501 + + + :return: The far_fx_forward of this FxSwapAllOf. # noqa: E501 + :rtype: lusid.FxForward + """ + return self._far_fx_forward + + @far_fx_forward.setter + def far_fx_forward(self, far_fx_forward): + """Sets the far_fx_forward of this FxSwapAllOf. + + + :param far_fx_forward: The far_fx_forward of this FxSwapAllOf. # noqa: E501 + :type far_fx_forward: lusid.FxForward + """ + if self.local_vars_configuration.client_side_validation and far_fx_forward is None: # noqa: E501 + raise ValueError("Invalid value for `far_fx_forward`, must not be `None`") # noqa: E501 + + self._far_fx_forward = far_fx_forward + + @property + def notional_symmetry(self): + """Gets the notional_symmetry of this FxSwapAllOf. # noqa: E501 + + The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. # noqa: E501 + + :return: The notional_symmetry of this FxSwapAllOf. # noqa: E501 + :rtype: str + """ + return self._notional_symmetry + + @notional_symmetry.setter + def notional_symmetry(self, notional_symmetry): + """Sets the notional_symmetry of this FxSwapAllOf. + + The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven]. # noqa: E501 + + :param notional_symmetry: The notional_symmetry of this FxSwapAllOf. # noqa: E501 + :type notional_symmetry: str + """ + + self._notional_symmetry = notional_symmetry + + @property + def instrument_type(self): + """Gets the instrument_type of this FxSwapAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this FxSwapAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this FxSwapAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this FxSwapAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxSwapAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxSwapAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/fx_vol_surface_data.py b/sdk/lusid/models/fx_vol_surface_data.py new file mode 100644 index 00000000000..85191f12d61 --- /dev/null +++ b/sdk/lusid/models/fx_vol_surface_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class FxVolSurfaceData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """FxVolSurfaceData - a model defined in OpenAPI" + + :param base_date: Base date of the surface (required) + :type base_date: datetime + :param instruments: The set of instruments that define the surface. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this FxVolSurfaceData. # noqa: E501 + + Base date of the surface # noqa: E501 + + :return: The base_date of this FxVolSurfaceData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this FxVolSurfaceData. + + Base date of the surface # noqa: E501 + + :param base_date: The base_date of this FxVolSurfaceData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this FxVolSurfaceData. # noqa: E501 + + The set of instruments that define the surface. # noqa: E501 + + :return: The instruments of this FxVolSurfaceData. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this FxVolSurfaceData. + + The set of instruments that define the surface. # noqa: E501 + + :param instruments: The instruments of this FxVolSurfaceData. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this FxVolSurfaceData. # noqa: E501 + + The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. # noqa: E501 + + :return: The quotes of this FxVolSurfaceData. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this FxVolSurfaceData. + + The set of market quotes that define the surface, in NormalVol or LogNormalVol terms. # noqa: E501 + + :param quotes: The quotes of this FxVolSurfaceData. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this FxVolSurfaceData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this FxVolSurfaceData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this FxVolSurfaceData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this FxVolSurfaceData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this FxVolSurfaceData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this FxVolSurfaceData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this FxVolSurfaceData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this FxVolSurfaceData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FxVolSurfaceData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FxVolSurfaceData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/index_convention.py b/sdk/lusid/models/index_convention.py new file mode 100644 index 00000000000..4797ccb0015 --- /dev/null +++ b/sdk/lusid/models/index_convention.py @@ -0,0 +1,406 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class IndexConvention(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'fixing_reference': 'str', + 'publication_day_lag': 'int', + 'payment_tenor': 'str', + 'day_count_convention': 'str', + 'currency': 'str', + 'index_name': 'str', + 'scope': 'str', + 'code': 'str' + } + + attribute_map = { + 'fixing_reference': 'fixingReference', + 'publication_day_lag': 'publicationDayLag', + 'payment_tenor': 'paymentTenor', + 'day_count_convention': 'dayCountConvention', + 'currency': 'currency', + 'index_name': 'indexName', + 'scope': 'scope', + 'code': 'code' + } + + required_map = { + 'fixing_reference': 'required', + 'publication_day_lag': 'required', + 'payment_tenor': 'required', + 'day_count_convention': 'required', + 'currency': 'required', + 'index_name': 'optional', + 'scope': 'optional', + 'code': 'optional' + } + + def __init__(self, fixing_reference=None, publication_day_lag=None, payment_tenor=None, day_count_convention=None, currency=None, index_name=None, scope=None, code=None, local_vars_configuration=None): # noqa: E501 + """IndexConvention - a model defined in OpenAPI" + + :param fixing_reference: The reference rate name for fixings. (required) + :type fixing_reference: str + :param publication_day_lag: Number of days between spot and publication of the rate. (required) + :type publication_day_lag: int + :param payment_tenor: The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year. (required) + :type payment_tenor: str + :param day_count_convention: when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. (required) + :type day_count_convention: str + :param currency: Currency of the index convention. (required) + :type currency: str + :param index_name: The name of the index for which this represents the conventions of. For instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc. Defaults to \"INDEX\" if not specified. + :type index_name: str + :param scope: The scope used when updating or inserting the convention. + :type scope: str + :param code: The code of the convention. + :type code: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._fixing_reference = None + self._publication_day_lag = None + self._payment_tenor = None + self._day_count_convention = None + self._currency = None + self._index_name = None + self._scope = None + self._code = None + self.discriminator = None + + self.fixing_reference = fixing_reference + self.publication_day_lag = publication_day_lag + self.payment_tenor = payment_tenor + self.day_count_convention = day_count_convention + self.currency = currency + self.index_name = index_name + self.scope = scope + self.code = code + + @property + def fixing_reference(self): + """Gets the fixing_reference of this IndexConvention. # noqa: E501 + + The reference rate name for fixings. # noqa: E501 + + :return: The fixing_reference of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._fixing_reference + + @fixing_reference.setter + def fixing_reference(self, fixing_reference): + """Sets the fixing_reference of this IndexConvention. + + The reference rate name for fixings. # noqa: E501 + + :param fixing_reference: The fixing_reference of this IndexConvention. # noqa: E501 + :type fixing_reference: str + """ + if self.local_vars_configuration.client_side_validation and fixing_reference is None: # noqa: E501 + raise ValueError("Invalid value for `fixing_reference`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + fixing_reference is not None and len(fixing_reference) > 64): + raise ValueError("Invalid value for `fixing_reference`, length must be less than or equal to `64`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + fixing_reference is not None and len(fixing_reference) < 0): + raise ValueError("Invalid value for `fixing_reference`, length must be greater than or equal to `0`") # noqa: E501 + + self._fixing_reference = fixing_reference + + @property + def publication_day_lag(self): + """Gets the publication_day_lag of this IndexConvention. # noqa: E501 + + Number of days between spot and publication of the rate. # noqa: E501 + + :return: The publication_day_lag of this IndexConvention. # noqa: E501 + :rtype: int + """ + return self._publication_day_lag + + @publication_day_lag.setter + def publication_day_lag(self, publication_day_lag): + """Sets the publication_day_lag of this IndexConvention. + + Number of days between spot and publication of the rate. # noqa: E501 + + :param publication_day_lag: The publication_day_lag of this IndexConvention. # noqa: E501 + :type publication_day_lag: int + """ + if self.local_vars_configuration.client_side_validation and publication_day_lag is None: # noqa: E501 + raise ValueError("Invalid value for `publication_day_lag`, must not be `None`") # noqa: E501 + + self._publication_day_lag = publication_day_lag + + @property + def payment_tenor(self): + """Gets the payment_tenor of this IndexConvention. # noqa: E501 + + The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year. # noqa: E501 + + :return: The payment_tenor of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._payment_tenor + + @payment_tenor.setter + def payment_tenor(self, payment_tenor): + """Sets the payment_tenor of this IndexConvention. + + The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year. # noqa: E501 + + :param payment_tenor: The payment_tenor of this IndexConvention. # noqa: E501 + :type payment_tenor: str + """ + if self.local_vars_configuration.client_side_validation and payment_tenor is None: # noqa: E501 + raise ValueError("Invalid value for `payment_tenor`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + payment_tenor is not None and len(payment_tenor) > 32): + raise ValueError("Invalid value for `payment_tenor`, length must be less than or equal to `32`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + payment_tenor is not None and len(payment_tenor) < 0): + raise ValueError("Invalid value for `payment_tenor`, length must be greater than or equal to `0`") # noqa: E501 + + self._payment_tenor = payment_tenor + + @property + def day_count_convention(self): + """Gets the day_count_convention of this IndexConvention. # noqa: E501 + + when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :return: The day_count_convention of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._day_count_convention + + @day_count_convention.setter + def day_count_convention(self, day_count_convention): + """Sets the day_count_convention of this IndexConvention. + + when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :param day_count_convention: The day_count_convention of this IndexConvention. # noqa: E501 + :type day_count_convention: str + """ + if self.local_vars_configuration.client_side_validation and day_count_convention is None: # noqa: E501 + raise ValueError("Invalid value for `day_count_convention`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + day_count_convention is not None and len(day_count_convention) > 32): + raise ValueError("Invalid value for `day_count_convention`, length must be less than or equal to `32`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + day_count_convention is not None and len(day_count_convention) < 0): + raise ValueError("Invalid value for `day_count_convention`, length must be greater than or equal to `0`") # noqa: E501 + + self._day_count_convention = day_count_convention + + @property + def currency(self): + """Gets the currency of this IndexConvention. # noqa: E501 + + Currency of the index convention. # noqa: E501 + + :return: The currency of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this IndexConvention. + + Currency of the index convention. # noqa: E501 + + :param currency: The currency of this IndexConvention. # noqa: E501 + :type currency: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def index_name(self): + """Gets the index_name of this IndexConvention. # noqa: E501 + + The name of the index for which this represents the conventions of. For instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc. Defaults to \"INDEX\" if not specified. # noqa: E501 + + :return: The index_name of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._index_name + + @index_name.setter + def index_name(self, index_name): + """Sets the index_name of this IndexConvention. + + The name of the index for which this represents the conventions of. For instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc. Defaults to \"INDEX\" if not specified. # noqa: E501 + + :param index_name: The index_name of this IndexConvention. # noqa: E501 + :type index_name: str + """ + if (self.local_vars_configuration.client_side_validation and + index_name is not None and len(index_name) > 16): + raise ValueError("Invalid value for `index_name`, length must be less than or equal to `16`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + index_name is not None and len(index_name) < 0): + raise ValueError("Invalid value for `index_name`, length must be greater than or equal to `0`") # noqa: E501 + + self._index_name = index_name + + @property + def scope(self): + """Gets the scope of this IndexConvention. # noqa: E501 + + The scope used when updating or inserting the convention. # noqa: E501 + + :return: The scope of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this IndexConvention. + + The scope used when updating or inserting the convention. # noqa: E501 + + :param scope: The scope of this IndexConvention. # noqa: E501 + :type scope: str + """ + if (self.local_vars_configuration.client_side_validation and + scope is not None and len(scope) > 256): + raise ValueError("Invalid value for `scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + scope is not None and len(scope) < 1): + raise ValueError("Invalid value for `scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', scope)): # noqa: E501 + raise ValueError(r"Invalid value for `scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._scope = scope + + @property + def code(self): + """Gets the code of this IndexConvention. # noqa: E501 + + The code of the convention. # noqa: E501 + + :return: The code of this IndexConvention. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this IndexConvention. + + The code of the convention. # noqa: E501 + + :param code: The code of this IndexConvention. # noqa: E501 + :type code: str + """ + if (self.local_vars_configuration.client_side_validation and + code is not None and len(code) > 256): + raise ValueError("Invalid value for `code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and len(code) < 1): + raise ValueError("Invalid value for `code`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', code)): # noqa: E501 + raise ValueError(r"Invalid value for `code`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._code = code + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndexConvention): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndexConvention): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/index_model_options.py b/sdk/lusid/models/index_model_options.py new file mode 100644 index 00000000000..5fbe29be907 --- /dev/null +++ b/sdk/lusid/models/index_model_options.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class IndexModelOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'portfolio_scaling': 'str', + 'model_options_type': 'str' + } + + attribute_map = { + 'portfolio_scaling': 'portfolioScaling', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'portfolio_scaling': 'required', + 'model_options_type': 'required' + } + + def __init__(self, portfolio_scaling=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """IndexModelOptions - a model defined in OpenAPI" + + :param portfolio_scaling: The available values are: Sum, AbsoluteSum, Unity (required) + :type portfolio_scaling: str + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._portfolio_scaling = None + self._model_options_type = None + self.discriminator = None + + self.portfolio_scaling = portfolio_scaling + self.model_options_type = model_options_type + + @property + def portfolio_scaling(self): + """Gets the portfolio_scaling of this IndexModelOptions. # noqa: E501 + + The available values are: Sum, AbsoluteSum, Unity # noqa: E501 + + :return: The portfolio_scaling of this IndexModelOptions. # noqa: E501 + :rtype: str + """ + return self._portfolio_scaling + + @portfolio_scaling.setter + def portfolio_scaling(self, portfolio_scaling): + """Sets the portfolio_scaling of this IndexModelOptions. + + The available values are: Sum, AbsoluteSum, Unity # noqa: E501 + + :param portfolio_scaling: The portfolio_scaling of this IndexModelOptions. # noqa: E501 + :type portfolio_scaling: str + """ + if self.local_vars_configuration.client_side_validation and portfolio_scaling is None: # noqa: E501 + raise ValueError("Invalid value for `portfolio_scaling`, must not be `None`") # noqa: E501 + allowed_values = ["Sum", "AbsoluteSum", "Unity"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and portfolio_scaling not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `portfolio_scaling` ({0}), must be one of {1}" # noqa: E501 + .format(portfolio_scaling, allowed_values) + ) + + self._portfolio_scaling = portfolio_scaling + + @property + def model_options_type(self): + """Gets the model_options_type of this IndexModelOptions. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this IndexModelOptions. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this IndexModelOptions. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this IndexModelOptions. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndexModelOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndexModelOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/index_model_options_all_of.py b/sdk/lusid/models/index_model_options_all_of.py new file mode 100644 index 00000000000..52c2e933675 --- /dev/null +++ b/sdk/lusid/models/index_model_options_all_of.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class IndexModelOptionsAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'portfolio_scaling': 'str', + 'model_options_type': 'str' + } + + attribute_map = { + 'portfolio_scaling': 'portfolioScaling', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'portfolio_scaling': 'required', + 'model_options_type': 'required' + } + + def __init__(self, portfolio_scaling=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """IndexModelOptionsAllOf - a model defined in OpenAPI" + + :param portfolio_scaling: The available values are: Sum, AbsoluteSum, Unity (required) + :type portfolio_scaling: str + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._portfolio_scaling = None + self._model_options_type = None + self.discriminator = None + + self.portfolio_scaling = portfolio_scaling + self.model_options_type = model_options_type + + @property + def portfolio_scaling(self): + """Gets the portfolio_scaling of this IndexModelOptionsAllOf. # noqa: E501 + + The available values are: Sum, AbsoluteSum, Unity # noqa: E501 + + :return: The portfolio_scaling of this IndexModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._portfolio_scaling + + @portfolio_scaling.setter + def portfolio_scaling(self, portfolio_scaling): + """Sets the portfolio_scaling of this IndexModelOptionsAllOf. + + The available values are: Sum, AbsoluteSum, Unity # noqa: E501 + + :param portfolio_scaling: The portfolio_scaling of this IndexModelOptionsAllOf. # noqa: E501 + :type portfolio_scaling: str + """ + if self.local_vars_configuration.client_side_validation and portfolio_scaling is None: # noqa: E501 + raise ValueError("Invalid value for `portfolio_scaling`, must not be `None`") # noqa: E501 + allowed_values = ["Sum", "AbsoluteSum", "Unity"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and portfolio_scaling not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `portfolio_scaling` ({0}), must be one of {1}" # noqa: E501 + .format(portfolio_scaling, allowed_values) + ) + + self._portfolio_scaling = portfolio_scaling + + @property + def model_options_type(self): + """Gets the model_options_type of this IndexModelOptionsAllOf. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this IndexModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this IndexModelOptionsAllOf. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this IndexModelOptionsAllOf. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndexModelOptionsAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndexModelOptionsAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/inflation_linked_bond.py b/sdk/lusid/models/inflation_linked_bond.py new file mode 100644 index 00000000000..841e4e0b873 --- /dev/null +++ b/sdk/lusid/models/inflation_linked_bond.py @@ -0,0 +1,707 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InflationLinkedBond(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'flow_conventions': 'FlowConventions', + 'coupon_rate': 'float', + 'identifiers': 'dict(str, str)', + 'dom_ccy': 'str', + 'base_cpi': 'float', + 'base_cpi_date': 'datetime', + 'calculation_type': 'str', + 'ex_dividend_days': 'int', + 'index_precision': 'int', + 'inflation_index_name': 'str', + 'inflation_interpolation': 'str', + 'inflation_roll_day': 'int', + 'observation_lag': 'str', + 'principal': 'float', + 'principal_protection': 'bool', + 'stub_type': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'flow_conventions': 'flowConventions', + 'coupon_rate': 'couponRate', + 'identifiers': 'identifiers', + 'dom_ccy': 'domCcy', + 'base_cpi': 'baseCPI', + 'base_cpi_date': 'baseCPIDate', + 'calculation_type': 'calculationType', + 'ex_dividend_days': 'exDividendDays', + 'index_precision': 'indexPrecision', + 'inflation_index_name': 'inflationIndexName', + 'inflation_interpolation': 'inflationInterpolation', + 'inflation_roll_day': 'inflationRollDay', + 'observation_lag': 'observationLag', + 'principal': 'principal', + 'principal_protection': 'principalProtection', + 'stub_type': 'stubType', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'flow_conventions': 'required', + 'coupon_rate': 'required', + 'identifiers': 'optional', + 'dom_ccy': 'required', + 'base_cpi': 'optional', + 'base_cpi_date': 'optional', + 'calculation_type': 'optional', + 'ex_dividend_days': 'optional', + 'index_precision': 'optional', + 'inflation_index_name': 'required', + 'inflation_interpolation': 'optional', + 'inflation_roll_day': 'optional', + 'observation_lag': 'optional', + 'principal': 'required', + 'principal_protection': 'optional', + 'stub_type': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, flow_conventions=None, coupon_rate=None, identifiers=None, dom_ccy=None, base_cpi=None, base_cpi_date=None, calculation_type=None, ex_dividend_days=None, index_precision=None, inflation_index_name=None, inflation_interpolation=None, inflation_roll_day=None, observation_lag=None, principal=None, principal_protection=None, stub_type=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InflationLinkedBond - a model defined in OpenAPI" + + :param start_date: The start date of the bond. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param flow_conventions: (required) + :type flow_conventions: lusid.FlowConventions + :param coupon_rate: Simple coupon rate. (required) + :type coupon_rate: float + :param identifiers: External market codes and identifiers for the bond, e.g. ISIN. + :type identifiers: dict(str, str) + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param base_cpi: BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. + :type base_cpi: float + :param base_cpi_date: BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. + :type base_cpi_date: datetime + :param calculation_type: The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. + :type calculation_type: str + :param ex_dividend_days: Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. + :type ex_dividend_days: int + :param index_precision: Number of decimal places used to round IndexRatio. This defaults to 5 if not set. + :type index_precision: int + :param inflation_index_name: Name of the index, e.g. UKRPI. (required) + :type inflation_index_name: str + :param inflation_interpolation: Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. + :type inflation_interpolation: str + :param inflation_roll_day: Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). + :type inflation_roll_day: int + :param observation_lag: Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. + :type observation_lag: str + :param principal: The face-value or principal for the bond at outset. (required) + :type principal: float + :param principal_protection: If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. + :type principal_protection: bool + :param stub_type: StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. + :type stub_type: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._flow_conventions = None + self._coupon_rate = None + self._identifiers = None + self._dom_ccy = None + self._base_cpi = None + self._base_cpi_date = None + self._calculation_type = None + self._ex_dividend_days = None + self._index_precision = None + self._inflation_index_name = None + self._inflation_interpolation = None + self._inflation_roll_day = None + self._observation_lag = None + self._principal = None + self._principal_protection = None + self._stub_type = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.flow_conventions = flow_conventions + self.coupon_rate = coupon_rate + self.identifiers = identifiers + self.dom_ccy = dom_ccy + self.base_cpi = base_cpi + self.base_cpi_date = base_cpi_date + self.calculation_type = calculation_type + self.ex_dividend_days = ex_dividend_days + if index_precision is not None: + self.index_precision = index_precision + self.inflation_index_name = inflation_index_name + self.inflation_interpolation = inflation_interpolation + if inflation_roll_day is not None: + self.inflation_roll_day = inflation_roll_day + self.observation_lag = observation_lag + self.principal = principal + if principal_protection is not None: + self.principal_protection = principal_protection + self.stub_type = stub_type + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this InflationLinkedBond. # noqa: E501 + + The start date of the bond. # noqa: E501 + + :return: The start_date of this InflationLinkedBond. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this InflationLinkedBond. + + The start date of the bond. # noqa: E501 + + :param start_date: The start_date of this InflationLinkedBond. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this InflationLinkedBond. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this InflationLinkedBond. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this InflationLinkedBond. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this InflationLinkedBond. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def flow_conventions(self): + """Gets the flow_conventions of this InflationLinkedBond. # noqa: E501 + + + :return: The flow_conventions of this InflationLinkedBond. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this InflationLinkedBond. + + + :param flow_conventions: The flow_conventions of this InflationLinkedBond. # noqa: E501 + :type flow_conventions: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and flow_conventions is None: # noqa: E501 + raise ValueError("Invalid value for `flow_conventions`, must not be `None`") # noqa: E501 + + self._flow_conventions = flow_conventions + + @property + def coupon_rate(self): + """Gets the coupon_rate of this InflationLinkedBond. # noqa: E501 + + Simple coupon rate. # noqa: E501 + + :return: The coupon_rate of this InflationLinkedBond. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this InflationLinkedBond. + + Simple coupon rate. # noqa: E501 + + :param coupon_rate: The coupon_rate of this InflationLinkedBond. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def identifiers(self): + """Gets the identifiers of this InflationLinkedBond. # noqa: E501 + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this InflationLinkedBond. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this InflationLinkedBond. + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this InflationLinkedBond. # noqa: E501 + :type identifiers: dict(str, str) + """ + + self._identifiers = identifiers + + @property + def dom_ccy(self): + """Gets the dom_ccy of this InflationLinkedBond. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this InflationLinkedBond. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this InflationLinkedBond. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def base_cpi(self): + """Gets the base_cpi of this InflationLinkedBond. # noqa: E501 + + BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. # noqa: E501 + + :return: The base_cpi of this InflationLinkedBond. # noqa: E501 + :rtype: float + """ + return self._base_cpi + + @base_cpi.setter + def base_cpi(self, base_cpi): + """Sets the base_cpi of this InflationLinkedBond. + + BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. # noqa: E501 + + :param base_cpi: The base_cpi of this InflationLinkedBond. # noqa: E501 + :type base_cpi: float + """ + + self._base_cpi = base_cpi + + @property + def base_cpi_date(self): + """Gets the base_cpi_date of this InflationLinkedBond. # noqa: E501 + + BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. # noqa: E501 + + :return: The base_cpi_date of this InflationLinkedBond. # noqa: E501 + :rtype: datetime + """ + return self._base_cpi_date + + @base_cpi_date.setter + def base_cpi_date(self, base_cpi_date): + """Sets the base_cpi_date of this InflationLinkedBond. + + BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. # noqa: E501 + + :param base_cpi_date: The base_cpi_date of this InflationLinkedBond. # noqa: E501 + :type base_cpi_date: datetime + """ + + self._base_cpi_date = base_cpi_date + + @property + def calculation_type(self): + """Gets the calculation_type of this InflationLinkedBond. # noqa: E501 + + The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. # noqa: E501 + + :return: The calculation_type of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._calculation_type + + @calculation_type.setter + def calculation_type(self, calculation_type): + """Sets the calculation_type of this InflationLinkedBond. + + The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. # noqa: E501 + + :param calculation_type: The calculation_type of this InflationLinkedBond. # noqa: E501 + :type calculation_type: str + """ + + self._calculation_type = calculation_type + + @property + def ex_dividend_days(self): + """Gets the ex_dividend_days of this InflationLinkedBond. # noqa: E501 + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. # noqa: E501 + + :return: The ex_dividend_days of this InflationLinkedBond. # noqa: E501 + :rtype: int + """ + return self._ex_dividend_days + + @ex_dividend_days.setter + def ex_dividend_days(self, ex_dividend_days): + """Sets the ex_dividend_days of this InflationLinkedBond. + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. # noqa: E501 + + :param ex_dividend_days: The ex_dividend_days of this InflationLinkedBond. # noqa: E501 + :type ex_dividend_days: int + """ + + self._ex_dividend_days = ex_dividend_days + + @property + def index_precision(self): + """Gets the index_precision of this InflationLinkedBond. # noqa: E501 + + Number of decimal places used to round IndexRatio. This defaults to 5 if not set. # noqa: E501 + + :return: The index_precision of this InflationLinkedBond. # noqa: E501 + :rtype: int + """ + return self._index_precision + + @index_precision.setter + def index_precision(self, index_precision): + """Sets the index_precision of this InflationLinkedBond. + + Number of decimal places used to round IndexRatio. This defaults to 5 if not set. # noqa: E501 + + :param index_precision: The index_precision of this InflationLinkedBond. # noqa: E501 + :type index_precision: int + """ + + self._index_precision = index_precision + + @property + def inflation_index_name(self): + """Gets the inflation_index_name of this InflationLinkedBond. # noqa: E501 + + Name of the index, e.g. UKRPI. # noqa: E501 + + :return: The inflation_index_name of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._inflation_index_name + + @inflation_index_name.setter + def inflation_index_name(self, inflation_index_name): + """Sets the inflation_index_name of this InflationLinkedBond. + + Name of the index, e.g. UKRPI. # noqa: E501 + + :param inflation_index_name: The inflation_index_name of this InflationLinkedBond. # noqa: E501 + :type inflation_index_name: str + """ + if self.local_vars_configuration.client_side_validation and inflation_index_name is None: # noqa: E501 + raise ValueError("Invalid value for `inflation_index_name`, must not be `None`") # noqa: E501 + + self._inflation_index_name = inflation_index_name + + @property + def inflation_interpolation(self): + """Gets the inflation_interpolation of this InflationLinkedBond. # noqa: E501 + + Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. # noqa: E501 + + :return: The inflation_interpolation of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._inflation_interpolation + + @inflation_interpolation.setter + def inflation_interpolation(self, inflation_interpolation): + """Sets the inflation_interpolation of this InflationLinkedBond. + + Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. # noqa: E501 + + :param inflation_interpolation: The inflation_interpolation of this InflationLinkedBond. # noqa: E501 + :type inflation_interpolation: str + """ + + self._inflation_interpolation = inflation_interpolation + + @property + def inflation_roll_day(self): + """Gets the inflation_roll_day of this InflationLinkedBond. # noqa: E501 + + Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). # noqa: E501 + + :return: The inflation_roll_day of this InflationLinkedBond. # noqa: E501 + :rtype: int + """ + return self._inflation_roll_day + + @inflation_roll_day.setter + def inflation_roll_day(self, inflation_roll_day): + """Sets the inflation_roll_day of this InflationLinkedBond. + + Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). # noqa: E501 + + :param inflation_roll_day: The inflation_roll_day of this InflationLinkedBond. # noqa: E501 + :type inflation_roll_day: int + """ + + self._inflation_roll_day = inflation_roll_day + + @property + def observation_lag(self): + """Gets the observation_lag of this InflationLinkedBond. # noqa: E501 + + Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. # noqa: E501 + + :return: The observation_lag of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._observation_lag + + @observation_lag.setter + def observation_lag(self, observation_lag): + """Sets the observation_lag of this InflationLinkedBond. + + Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. # noqa: E501 + + :param observation_lag: The observation_lag of this InflationLinkedBond. # noqa: E501 + :type observation_lag: str + """ + + self._observation_lag = observation_lag + + @property + def principal(self): + """Gets the principal of this InflationLinkedBond. # noqa: E501 + + The face-value or principal for the bond at outset. # noqa: E501 + + :return: The principal of this InflationLinkedBond. # noqa: E501 + :rtype: float + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this InflationLinkedBond. + + The face-value or principal for the bond at outset. # noqa: E501 + + :param principal: The principal of this InflationLinkedBond. # noqa: E501 + :type principal: float + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def principal_protection(self): + """Gets the principal_protection of this InflationLinkedBond. # noqa: E501 + + If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. # noqa: E501 + + :return: The principal_protection of this InflationLinkedBond. # noqa: E501 + :rtype: bool + """ + return self._principal_protection + + @principal_protection.setter + def principal_protection(self, principal_protection): + """Sets the principal_protection of this InflationLinkedBond. + + If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. # noqa: E501 + + :param principal_protection: The principal_protection of this InflationLinkedBond. # noqa: E501 + :type principal_protection: bool + """ + + self._principal_protection = principal_protection + + @property + def stub_type(self): + """Gets the stub_type of this InflationLinkedBond. # noqa: E501 + + StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. # noqa: E501 + + :return: The stub_type of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._stub_type + + @stub_type.setter + def stub_type(self, stub_type): + """Sets the stub_type of this InflationLinkedBond. + + StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. # noqa: E501 + + :param stub_type: The stub_type of this InflationLinkedBond. # noqa: E501 + :type stub_type: str + """ + + self._stub_type = stub_type + + @property + def instrument_type(self): + """Gets the instrument_type of this InflationLinkedBond. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InflationLinkedBond. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InflationLinkedBond. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InflationLinkedBond. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InflationLinkedBond): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InflationLinkedBond): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/inflation_linked_bond_all_of.py b/sdk/lusid/models/inflation_linked_bond_all_of.py new file mode 100644 index 00000000000..5643d10ca10 --- /dev/null +++ b/sdk/lusid/models/inflation_linked_bond_all_of.py @@ -0,0 +1,707 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InflationLinkedBondAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'flow_conventions': 'FlowConventions', + 'coupon_rate': 'float', + 'identifiers': 'dict(str, str)', + 'dom_ccy': 'str', + 'base_cpi': 'float', + 'base_cpi_date': 'datetime', + 'calculation_type': 'str', + 'ex_dividend_days': 'int', + 'index_precision': 'int', + 'inflation_index_name': 'str', + 'inflation_interpolation': 'str', + 'inflation_roll_day': 'int', + 'observation_lag': 'str', + 'principal': 'float', + 'principal_protection': 'bool', + 'stub_type': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'flow_conventions': 'flowConventions', + 'coupon_rate': 'couponRate', + 'identifiers': 'identifiers', + 'dom_ccy': 'domCcy', + 'base_cpi': 'baseCPI', + 'base_cpi_date': 'baseCPIDate', + 'calculation_type': 'calculationType', + 'ex_dividend_days': 'exDividendDays', + 'index_precision': 'indexPrecision', + 'inflation_index_name': 'inflationIndexName', + 'inflation_interpolation': 'inflationInterpolation', + 'inflation_roll_day': 'inflationRollDay', + 'observation_lag': 'observationLag', + 'principal': 'principal', + 'principal_protection': 'principalProtection', + 'stub_type': 'stubType', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'flow_conventions': 'required', + 'coupon_rate': 'required', + 'identifiers': 'optional', + 'dom_ccy': 'required', + 'base_cpi': 'optional', + 'base_cpi_date': 'optional', + 'calculation_type': 'optional', + 'ex_dividend_days': 'optional', + 'index_precision': 'optional', + 'inflation_index_name': 'required', + 'inflation_interpolation': 'optional', + 'inflation_roll_day': 'optional', + 'observation_lag': 'optional', + 'principal': 'required', + 'principal_protection': 'optional', + 'stub_type': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, flow_conventions=None, coupon_rate=None, identifiers=None, dom_ccy=None, base_cpi=None, base_cpi_date=None, calculation_type=None, ex_dividend_days=None, index_precision=None, inflation_index_name=None, inflation_interpolation=None, inflation_roll_day=None, observation_lag=None, principal=None, principal_protection=None, stub_type=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InflationLinkedBondAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the bond. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param flow_conventions: (required) + :type flow_conventions: lusid.FlowConventions + :param coupon_rate: Simple coupon rate. (required) + :type coupon_rate: float + :param identifiers: External market codes and identifiers for the bond, e.g. ISIN. + :type identifiers: dict(str, str) + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param base_cpi: BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. + :type base_cpi: float + :param base_cpi_date: BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. + :type base_cpi_date: datetime + :param calculation_type: The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. + :type calculation_type: str + :param ex_dividend_days: Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. + :type ex_dividend_days: int + :param index_precision: Number of decimal places used to round IndexRatio. This defaults to 5 if not set. + :type index_precision: int + :param inflation_index_name: Name of the index, e.g. UKRPI. (required) + :type inflation_index_name: str + :param inflation_interpolation: Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. + :type inflation_interpolation: str + :param inflation_roll_day: Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). + :type inflation_roll_day: int + :param observation_lag: Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. + :type observation_lag: str + :param principal: The face-value or principal for the bond at outset. (required) + :type principal: float + :param principal_protection: If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. + :type principal_protection: bool + :param stub_type: StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. + :type stub_type: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._flow_conventions = None + self._coupon_rate = None + self._identifiers = None + self._dom_ccy = None + self._base_cpi = None + self._base_cpi_date = None + self._calculation_type = None + self._ex_dividend_days = None + self._index_precision = None + self._inflation_index_name = None + self._inflation_interpolation = None + self._inflation_roll_day = None + self._observation_lag = None + self._principal = None + self._principal_protection = None + self._stub_type = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.flow_conventions = flow_conventions + self.coupon_rate = coupon_rate + self.identifiers = identifiers + self.dom_ccy = dom_ccy + self.base_cpi = base_cpi + self.base_cpi_date = base_cpi_date + self.calculation_type = calculation_type + self.ex_dividend_days = ex_dividend_days + if index_precision is not None: + self.index_precision = index_precision + self.inflation_index_name = inflation_index_name + self.inflation_interpolation = inflation_interpolation + if inflation_roll_day is not None: + self.inflation_roll_day = inflation_roll_day + self.observation_lag = observation_lag + self.principal = principal + if principal_protection is not None: + self.principal_protection = principal_protection + self.stub_type = stub_type + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this InflationLinkedBondAllOf. # noqa: E501 + + The start date of the bond. # noqa: E501 + + :return: The start_date of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this InflationLinkedBondAllOf. + + The start date of the bond. # noqa: E501 + + :param start_date: The start_date of this InflationLinkedBondAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this InflationLinkedBondAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this InflationLinkedBondAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this InflationLinkedBondAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def flow_conventions(self): + """Gets the flow_conventions of this InflationLinkedBondAllOf. # noqa: E501 + + + :return: The flow_conventions of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._flow_conventions + + @flow_conventions.setter + def flow_conventions(self, flow_conventions): + """Sets the flow_conventions of this InflationLinkedBondAllOf. + + + :param flow_conventions: The flow_conventions of this InflationLinkedBondAllOf. # noqa: E501 + :type flow_conventions: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and flow_conventions is None: # noqa: E501 + raise ValueError("Invalid value for `flow_conventions`, must not be `None`") # noqa: E501 + + self._flow_conventions = flow_conventions + + @property + def coupon_rate(self): + """Gets the coupon_rate of this InflationLinkedBondAllOf. # noqa: E501 + + Simple coupon rate. # noqa: E501 + + :return: The coupon_rate of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: float + """ + return self._coupon_rate + + @coupon_rate.setter + def coupon_rate(self, coupon_rate): + """Sets the coupon_rate of this InflationLinkedBondAllOf. + + Simple coupon rate. # noqa: E501 + + :param coupon_rate: The coupon_rate of this InflationLinkedBondAllOf. # noqa: E501 + :type coupon_rate: float + """ + if self.local_vars_configuration.client_side_validation and coupon_rate is None: # noqa: E501 + raise ValueError("Invalid value for `coupon_rate`, must not be `None`") # noqa: E501 + + self._coupon_rate = coupon_rate + + @property + def identifiers(self): + """Gets the identifiers of this InflationLinkedBondAllOf. # noqa: E501 + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :return: The identifiers of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: dict(str, str) + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this InflationLinkedBondAllOf. + + External market codes and identifiers for the bond, e.g. ISIN. # noqa: E501 + + :param identifiers: The identifiers of this InflationLinkedBondAllOf. # noqa: E501 + :type identifiers: dict(str, str) + """ + + self._identifiers = identifiers + + @property + def dom_ccy(self): + """Gets the dom_ccy of this InflationLinkedBondAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this InflationLinkedBondAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this InflationLinkedBondAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def base_cpi(self): + """Gets the base_cpi of this InflationLinkedBondAllOf. # noqa: E501 + + BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. # noqa: E501 + + :return: The base_cpi of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: float + """ + return self._base_cpi + + @base_cpi.setter + def base_cpi(self, base_cpi): + """Sets the base_cpi of this InflationLinkedBondAllOf. + + BaseCPI value. This is optional, if not provided the BaseCPI value will be calculated from the BaseCPIDate, If that too is not present the StartDate will be used. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the BaseCPIDate. # noqa: E501 + + :param base_cpi: The base_cpi of this InflationLinkedBondAllOf. # noqa: E501 + :type base_cpi: float + """ + + self._base_cpi = base_cpi + + @property + def base_cpi_date(self): + """Gets the base_cpi_date of this InflationLinkedBondAllOf. # noqa: E501 + + BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. # noqa: E501 + + :return: The base_cpi_date of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_cpi_date + + @base_cpi_date.setter + def base_cpi_date(self, base_cpi_date): + """Sets the base_cpi_date of this InflationLinkedBondAllOf. + + BaseCPIDate. This is optional, if not provided the BaseCPI value will taken from the BaseCPI property, if that too is not present than the StartDate will be used. If present, the BaseCPI is calculated for this date, note this is an un-lagged date (similar to StartDate) so the Bond ObservationLag will be applied to this date when calculating the CPI. Note that both BaseCPI and BaseCPIDate cannot be set. Some bonds are issued with a BaseCPI date that does not correspond to the StartDate CPI value, in this case the value should be provided here or with the actual BaseCPI. # noqa: E501 + + :param base_cpi_date: The base_cpi_date of this InflationLinkedBondAllOf. # noqa: E501 + :type base_cpi_date: datetime + """ + + self._base_cpi_date = base_cpi_date + + @property + def calculation_type(self): + """Gets the calculation_type of this InflationLinkedBondAllOf. # noqa: E501 + + The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. # noqa: E501 + + :return: The calculation_type of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._calculation_type + + @calculation_type.setter + def calculation_type(self, calculation_type): + """Sets the calculation_type of this InflationLinkedBondAllOf. + + The calculation type applied to the bond coupon and principal amount. The default CalculationType is `Standard` and currently this is the only value supported. Supported string (enumeration) values are: [Standard, Quarterly, Ratio]. # noqa: E501 + + :param calculation_type: The calculation_type of this InflationLinkedBondAllOf. # noqa: E501 + :type calculation_type: str + """ + + self._calculation_type = calculation_type + + @property + def ex_dividend_days(self): + """Gets the ex_dividend_days of this InflationLinkedBondAllOf. # noqa: E501 + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. # noqa: E501 + + :return: The ex_dividend_days of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: int + """ + return self._ex_dividend_days + + @ex_dividend_days.setter + def ex_dividend_days(self, ex_dividend_days): + """Sets the ex_dividend_days of this InflationLinkedBondAllOf. + + Number of Good Business Days before the next coupon payment, in which the bond goes ex-dividend. This is not common in inflation linked bonds but has been seen with (for example) bonds issued by the Bank of Thailand. # noqa: E501 + + :param ex_dividend_days: The ex_dividend_days of this InflationLinkedBondAllOf. # noqa: E501 + :type ex_dividend_days: int + """ + + self._ex_dividend_days = ex_dividend_days + + @property + def index_precision(self): + """Gets the index_precision of this InflationLinkedBondAllOf. # noqa: E501 + + Number of decimal places used to round IndexRatio. This defaults to 5 if not set. # noqa: E501 + + :return: The index_precision of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: int + """ + return self._index_precision + + @index_precision.setter + def index_precision(self, index_precision): + """Sets the index_precision of this InflationLinkedBondAllOf. + + Number of decimal places used to round IndexRatio. This defaults to 5 if not set. # noqa: E501 + + :param index_precision: The index_precision of this InflationLinkedBondAllOf. # noqa: E501 + :type index_precision: int + """ + + self._index_precision = index_precision + + @property + def inflation_index_name(self): + """Gets the inflation_index_name of this InflationLinkedBondAllOf. # noqa: E501 + + Name of the index, e.g. UKRPI. # noqa: E501 + + :return: The inflation_index_name of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._inflation_index_name + + @inflation_index_name.setter + def inflation_index_name(self, inflation_index_name): + """Sets the inflation_index_name of this InflationLinkedBondAllOf. + + Name of the index, e.g. UKRPI. # noqa: E501 + + :param inflation_index_name: The inflation_index_name of this InflationLinkedBondAllOf. # noqa: E501 + :type inflation_index_name: str + """ + if self.local_vars_configuration.client_side_validation and inflation_index_name is None: # noqa: E501 + raise ValueError("Invalid value for `inflation_index_name`, must not be `None`") # noqa: E501 + + self._inflation_index_name = inflation_index_name + + @property + def inflation_interpolation(self): + """Gets the inflation_interpolation of this InflationLinkedBondAllOf. # noqa: E501 + + Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. # noqa: E501 + + :return: The inflation_interpolation of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._inflation_interpolation + + @inflation_interpolation.setter + def inflation_interpolation(self, inflation_interpolation): + """Sets the inflation_interpolation of this InflationLinkedBondAllOf. + + Inflation Interpolation. This is optional and defaults to Linear if not set. Supported string (enumeration) values are: [Linear, Flat]. # noqa: E501 + + :param inflation_interpolation: The inflation_interpolation of this InflationLinkedBondAllOf. # noqa: E501 + :type inflation_interpolation: str + """ + + self._inflation_interpolation = inflation_interpolation + + @property + def inflation_roll_day(self): + """Gets the inflation_roll_day of this InflationLinkedBondAllOf. # noqa: E501 + + Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). # noqa: E501 + + :return: The inflation_roll_day of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: int + """ + return self._inflation_roll_day + + @inflation_roll_day.setter + def inflation_roll_day(self, inflation_roll_day): + """Sets the inflation_roll_day of this InflationLinkedBondAllOf. + + Day of the month that inflation rolls from one month to the next. This is optional and defaults to 1, which is the typically value for the majority of inflation bonds (exceptions include Japan which rolls on the 10th and some LatAm bonds which roll on the 15th). # noqa: E501 + + :param inflation_roll_day: The inflation_roll_day of this InflationLinkedBondAllOf. # noqa: E501 + :type inflation_roll_day: int + """ + + self._inflation_roll_day = inflation_roll_day + + @property + def observation_lag(self): + """Gets the observation_lag of this InflationLinkedBondAllOf. # noqa: E501 + + Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. # noqa: E501 + + :return: The observation_lag of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._observation_lag + + @observation_lag.setter + def observation_lag(self, observation_lag): + """Sets the observation_lag of this InflationLinkedBondAllOf. + + Observation lag. This is a Tenor that must have units of Month. This field is typically 3 or 4 months, but can vary, older bonds have 8 months lag. For Bonds with a calculation type of Ratio, this property, if set, must be 0Invalid. # noqa: E501 + + :param observation_lag: The observation_lag of this InflationLinkedBondAllOf. # noqa: E501 + :type observation_lag: str + """ + + self._observation_lag = observation_lag + + @property + def principal(self): + """Gets the principal of this InflationLinkedBondAllOf. # noqa: E501 + + The face-value or principal for the bond at outset. # noqa: E501 + + :return: The principal of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: float + """ + return self._principal + + @principal.setter + def principal(self, principal): + """Sets the principal of this InflationLinkedBondAllOf. + + The face-value or principal for the bond at outset. # noqa: E501 + + :param principal: The principal of this InflationLinkedBondAllOf. # noqa: E501 + :type principal: float + """ + if self.local_vars_configuration.client_side_validation and principal is None: # noqa: E501 + raise ValueError("Invalid value for `principal`, must not be `None`") # noqa: E501 + + self._principal = principal + + @property + def principal_protection(self): + """Gets the principal_protection of this InflationLinkedBondAllOf. # noqa: E501 + + If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. # noqa: E501 + + :return: The principal_protection of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: bool + """ + return self._principal_protection + + @principal_protection.setter + def principal_protection(self, principal_protection): + """Sets the principal_protection of this InflationLinkedBondAllOf. + + If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%. # noqa: E501 + + :param principal_protection: The principal_protection of this InflationLinkedBondAllOf. # noqa: E501 + :type principal_protection: bool + """ + + self._principal_protection = principal_protection + + @property + def stub_type(self): + """Gets the stub_type of this InflationLinkedBondAllOf. # noqa: E501 + + StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. # noqa: E501 + + :return: The stub_type of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._stub_type + + @stub_type.setter + def stub_type(self, stub_type): + """Sets the stub_type of this InflationLinkedBondAllOf. + + StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both]. # noqa: E501 + + :param stub_type: The stub_type of this InflationLinkedBondAllOf. # noqa: E501 + :type stub_type: str + """ + + self._stub_type = stub_type + + @property + def instrument_type(self): + """Gets the instrument_type of this InflationLinkedBondAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InflationLinkedBondAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InflationLinkedBondAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InflationLinkedBondAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InflationLinkedBondAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InflationLinkedBondAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/instrument_definition_format.py b/sdk/lusid/models/instrument_definition_format.py new file mode 100644 index 00000000000..34c43d9fbb4 --- /dev/null +++ b/sdk/lusid/models/instrument_definition_format.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InstrumentDefinitionFormat(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'source_system': 'str', + 'vendor': 'str', + 'version': 'str' + } + + attribute_map = { + 'source_system': 'sourceSystem', + 'vendor': 'vendor', + 'version': 'version' + } + + required_map = { + 'source_system': 'required', + 'vendor': 'required', + 'version': 'required' + } + + def __init__(self, source_system=None, vendor=None, version=None, local_vars_configuration=None): # noqa: E501 + """InstrumentDefinitionFormat - a model defined in OpenAPI" + + :param source_system: which source system does the format originate from (required) + :type source_system: str + :param vendor: An instrument will potentially have been created by any number of different organisations. Some will be understood completely (e.g. LUSID's), some won't. The provenance of an instrument indicates who \"owns\" the associated format. (required) + :type vendor: str + :param version: Version of the document. Would be preferable to avoid the need, but LUSID will not control other organisations' trade formats. (required) + :type version: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._source_system = None + self._vendor = None + self._version = None + self.discriminator = None + + self.source_system = source_system + self.vendor = vendor + self.version = version + + @property + def source_system(self): + """Gets the source_system of this InstrumentDefinitionFormat. # noqa: E501 + + which source system does the format originate from # noqa: E501 + + :return: The source_system of this InstrumentDefinitionFormat. # noqa: E501 + :rtype: str + """ + return self._source_system + + @source_system.setter + def source_system(self, source_system): + """Sets the source_system of this InstrumentDefinitionFormat. + + which source system does the format originate from # noqa: E501 + + :param source_system: The source_system of this InstrumentDefinitionFormat. # noqa: E501 + :type source_system: str + """ + if self.local_vars_configuration.client_side_validation and source_system is None: # noqa: E501 + raise ValueError("Invalid value for `source_system`, must not be `None`") # noqa: E501 + + self._source_system = source_system + + @property + def vendor(self): + """Gets the vendor of this InstrumentDefinitionFormat. # noqa: E501 + + An instrument will potentially have been created by any number of different organisations. Some will be understood completely (e.g. LUSID's), some won't. The provenance of an instrument indicates who \"owns\" the associated format. # noqa: E501 + + :return: The vendor of this InstrumentDefinitionFormat. # noqa: E501 + :rtype: str + """ + return self._vendor + + @vendor.setter + def vendor(self, vendor): + """Sets the vendor of this InstrumentDefinitionFormat. + + An instrument will potentially have been created by any number of different organisations. Some will be understood completely (e.g. LUSID's), some won't. The provenance of an instrument indicates who \"owns\" the associated format. # noqa: E501 + + :param vendor: The vendor of this InstrumentDefinitionFormat. # noqa: E501 + :type vendor: str + """ + if self.local_vars_configuration.client_side_validation and vendor is None: # noqa: E501 + raise ValueError("Invalid value for `vendor`, must not be `None`") # noqa: E501 + + self._vendor = vendor + + @property + def version(self): + """Gets the version of this InstrumentDefinitionFormat. # noqa: E501 + + Version of the document. Would be preferable to avoid the need, but LUSID will not control other organisations' trade formats. # noqa: E501 + + :return: The version of this InstrumentDefinitionFormat. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this InstrumentDefinitionFormat. + + Version of the document. Would be preferable to avoid the need, but LUSID will not control other organisations' trade formats. # noqa: E501 + + :param version: The version of this InstrumentDefinitionFormat. # noqa: E501 + :type version: str + """ + if self.local_vars_configuration.client_side_validation and version is None: # noqa: E501 + raise ValueError("Invalid value for `version`, must not be `None`") # noqa: E501 + + self._version = version + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InstrumentDefinitionFormat): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstrumentDefinitionFormat): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/instrument_leg.py b/sdk/lusid/models/instrument_leg.py new file mode 100644 index 00000000000..5820af4c84c --- /dev/null +++ b/sdk/lusid/models/instrument_leg.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InstrumentLeg(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instrument_type': 'str' + } + + attribute_map = { + 'instrument_type': 'instrumentType' + } + + required_map = { + 'instrument_type': 'required' + } + + discriminator_value_class_map = { + 'FundingLeg': 'FundingLeg', + 'FloatingLeg': 'FloatingLeg', + 'FixedLeg': 'FixedLeg' + } + + def __init__(self, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InstrumentLeg - a model defined in OpenAPI" + + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instrument_type = None + self.discriminator = 'instrument_type' + + self.instrument_type = instrument_type + + @property + def instrument_type(self): + """Gets the instrument_type of this InstrumentLeg. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InstrumentLeg. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InstrumentLeg. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InstrumentLeg. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def get_real_child_model(self, data): + """Returns the real base class specified by the discriminator""" + discriminator_key = self.attribute_map[self.discriminator] + discriminator_value = data[discriminator_key] + return self.discriminator_value_class_map.get(discriminator_value) + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InstrumentLeg): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstrumentLeg): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/instrument_leg_all_of.py b/sdk/lusid/models/instrument_leg_all_of.py new file mode 100644 index 00000000000..05ce5257796 --- /dev/null +++ b/sdk/lusid/models/instrument_leg_all_of.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InstrumentLegAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instrument_type': 'str' + } + + attribute_map = { + 'instrument_type': 'instrumentType' + } + + required_map = { + 'instrument_type': 'required' + } + + def __init__(self, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InstrumentLegAllOf - a model defined in OpenAPI" + + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instrument_type = None + self.discriminator = None + + self.instrument_type = instrument_type + + @property + def instrument_type(self): + """Gets the instrument_type of this InstrumentLegAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InstrumentLegAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InstrumentLegAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InstrumentLegAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InstrumentLegAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InstrumentLegAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/interest_rate_swap.py b/sdk/lusid/models/interest_rate_swap.py new file mode 100644 index 00000000000..bb40d19ae75 --- /dev/null +++ b/sdk/lusid/models/interest_rate_swap.py @@ -0,0 +1,309 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InterestRateSwap(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'is_non_deliverable': 'bool', + 'legs': 'list[InstrumentLeg]', + 'settlement_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'is_non_deliverable': 'isNonDeliverable', + 'legs': 'legs', + 'settlement_ccy': 'settlementCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'is_non_deliverable': 'optional', + 'legs': 'required', + 'settlement_ccy': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, is_non_deliverable=None, legs=None, settlement_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InterestRateSwap - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param is_non_deliverable: Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. + :type is_non_deliverable: bool + :param legs: The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. (required) + :type legs: list[lusid.InstrumentLeg] + :param settlement_ccy: Settlement currency if IRS is non-deliverable. + :type settlement_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._is_non_deliverable = None + self._legs = None + self._settlement_ccy = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + if is_non_deliverable is not None: + self.is_non_deliverable = is_non_deliverable + self.legs = legs + self.settlement_ccy = settlement_ccy + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this InterestRateSwap. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this InterestRateSwap. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this InterestRateSwap. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this InterestRateSwap. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this InterestRateSwap. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this InterestRateSwap. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this InterestRateSwap. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this InterestRateSwap. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def is_non_deliverable(self): + """Gets the is_non_deliverable of this InterestRateSwap. # noqa: E501 + + Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. # noqa: E501 + + :return: The is_non_deliverable of this InterestRateSwap. # noqa: E501 + :rtype: bool + """ + return self._is_non_deliverable + + @is_non_deliverable.setter + def is_non_deliverable(self, is_non_deliverable): + """Sets the is_non_deliverable of this InterestRateSwap. + + Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. # noqa: E501 + + :param is_non_deliverable: The is_non_deliverable of this InterestRateSwap. # noqa: E501 + :type is_non_deliverable: bool + """ + + self._is_non_deliverable = is_non_deliverable + + @property + def legs(self): + """Gets the legs of this InterestRateSwap. # noqa: E501 + + The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. # noqa: E501 + + :return: The legs of this InterestRateSwap. # noqa: E501 + :rtype: list[lusid.InstrumentLeg] + """ + return self._legs + + @legs.setter + def legs(self, legs): + """Sets the legs of this InterestRateSwap. + + The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. # noqa: E501 + + :param legs: The legs of this InterestRateSwap. # noqa: E501 + :type legs: list[lusid.InstrumentLeg] + """ + if self.local_vars_configuration.client_side_validation and legs is None: # noqa: E501 + raise ValueError("Invalid value for `legs`, must not be `None`") # noqa: E501 + + self._legs = legs + + @property + def settlement_ccy(self): + """Gets the settlement_ccy of this InterestRateSwap. # noqa: E501 + + Settlement currency if IRS is non-deliverable. # noqa: E501 + + :return: The settlement_ccy of this InterestRateSwap. # noqa: E501 + :rtype: str + """ + return self._settlement_ccy + + @settlement_ccy.setter + def settlement_ccy(self, settlement_ccy): + """Sets the settlement_ccy of this InterestRateSwap. + + Settlement currency if IRS is non-deliverable. # noqa: E501 + + :param settlement_ccy: The settlement_ccy of this InterestRateSwap. # noqa: E501 + :type settlement_ccy: str + """ + + self._settlement_ccy = settlement_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this InterestRateSwap. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InterestRateSwap. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InterestRateSwap. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InterestRateSwap. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InterestRateSwap): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InterestRateSwap): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/interest_rate_swap_all_of.py b/sdk/lusid/models/interest_rate_swap_all_of.py new file mode 100644 index 00000000000..bb1c7653e6e --- /dev/null +++ b/sdk/lusid/models/interest_rate_swap_all_of.py @@ -0,0 +1,309 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InterestRateSwapAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'is_non_deliverable': 'bool', + 'legs': 'list[InstrumentLeg]', + 'settlement_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'is_non_deliverable': 'isNonDeliverable', + 'legs': 'legs', + 'settlement_ccy': 'settlementCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'is_non_deliverable': 'optional', + 'legs': 'required', + 'settlement_ccy': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, is_non_deliverable=None, legs=None, settlement_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InterestRateSwapAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param is_non_deliverable: Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. + :type is_non_deliverable: bool + :param legs: The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. (required) + :type legs: list[lusid.InstrumentLeg] + :param settlement_ccy: Settlement currency if IRS is non-deliverable. + :type settlement_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._is_non_deliverable = None + self._legs = None + self._settlement_ccy = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + if is_non_deliverable is not None: + self.is_non_deliverable = is_non_deliverable + self.legs = legs + self.settlement_ccy = settlement_ccy + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this InterestRateSwapAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this InterestRateSwapAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this InterestRateSwapAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this InterestRateSwapAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this InterestRateSwapAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this InterestRateSwapAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this InterestRateSwapAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this InterestRateSwapAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def is_non_deliverable(self): + """Gets the is_non_deliverable of this InterestRateSwapAllOf. # noqa: E501 + + Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. # noqa: E501 + + :return: The is_non_deliverable of this InterestRateSwapAllOf. # noqa: E501 + :rtype: bool + """ + return self._is_non_deliverable + + @is_non_deliverable.setter + def is_non_deliverable(self, is_non_deliverable): + """Sets the is_non_deliverable of this InterestRateSwapAllOf. + + Is the contract an IRS of \"Non-Deliverable\" type, meaning a single payment in the settlement currency based on the difference between the fixed and floating rates. # noqa: E501 + + :param is_non_deliverable: The is_non_deliverable of this InterestRateSwapAllOf. # noqa: E501 + :type is_non_deliverable: bool + """ + + self._is_non_deliverable = is_non_deliverable + + @property + def legs(self): + """Gets the legs of this InterestRateSwapAllOf. # noqa: E501 + + The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. # noqa: E501 + + :return: The legs of this InterestRateSwapAllOf. # noqa: E501 + :rtype: list[lusid.InstrumentLeg] + """ + return self._legs + + @legs.setter + def legs(self, legs): + """Sets the legs of this InterestRateSwapAllOf. + + The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg. # noqa: E501 + + :param legs: The legs of this InterestRateSwapAllOf. # noqa: E501 + :type legs: list[lusid.InstrumentLeg] + """ + if self.local_vars_configuration.client_side_validation and legs is None: # noqa: E501 + raise ValueError("Invalid value for `legs`, must not be `None`") # noqa: E501 + + self._legs = legs + + @property + def settlement_ccy(self): + """Gets the settlement_ccy of this InterestRateSwapAllOf. # noqa: E501 + + Settlement currency if IRS is non-deliverable. # noqa: E501 + + :return: The settlement_ccy of this InterestRateSwapAllOf. # noqa: E501 + :rtype: str + """ + return self._settlement_ccy + + @settlement_ccy.setter + def settlement_ccy(self, settlement_ccy): + """Sets the settlement_ccy of this InterestRateSwapAllOf. + + Settlement currency if IRS is non-deliverable. # noqa: E501 + + :param settlement_ccy: The settlement_ccy of this InterestRateSwapAllOf. # noqa: E501 + :type settlement_ccy: str + """ + + self._settlement_ccy = settlement_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this InterestRateSwapAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InterestRateSwapAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InterestRateSwapAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InterestRateSwapAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InterestRateSwapAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InterestRateSwapAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/interest_rate_swaption.py b/sdk/lusid/models/interest_rate_swaption.py new file mode 100644 index 00000000000..9fe0094dc2d --- /dev/null +++ b/sdk/lusid/models/interest_rate_swaption.py @@ -0,0 +1,307 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InterestRateSwaption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'pay_or_receive_fixed': 'str', + 'premium': 'Premium', + 'delivery_method': 'str', + 'swap': 'InterestRateSwap', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'pay_or_receive_fixed': 'payOrReceiveFixed', + 'premium': 'premium', + 'delivery_method': 'deliveryMethod', + 'swap': 'swap', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'pay_or_receive_fixed': 'required', + 'premium': 'optional', + 'delivery_method': 'required', + 'swap': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, pay_or_receive_fixed=None, premium=None, delivery_method=None, swap=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InterestRateSwaption - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param pay_or_receive_fixed: True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. (required) + :type pay_or_receive_fixed: str + :param premium: + :type premium: lusid.Premium + :param delivery_method: How does the option settle Supported string (enumeration) values are: [Cash, Physical]. (required) + :type delivery_method: str + :param swap: (required) + :type swap: lusid.InterestRateSwap + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._pay_or_receive_fixed = None + self._premium = None + self._delivery_method = None + self._swap = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.pay_or_receive_fixed = pay_or_receive_fixed + if premium is not None: + self.premium = premium + self.delivery_method = delivery_method + self.swap = swap + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this InterestRateSwaption. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this InterestRateSwaption. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this InterestRateSwaption. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this InterestRateSwaption. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def pay_or_receive_fixed(self): + """Gets the pay_or_receive_fixed of this InterestRateSwaption. # noqa: E501 + + True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. # noqa: E501 + + :return: The pay_or_receive_fixed of this InterestRateSwaption. # noqa: E501 + :rtype: str + """ + return self._pay_or_receive_fixed + + @pay_or_receive_fixed.setter + def pay_or_receive_fixed(self, pay_or_receive_fixed): + """Sets the pay_or_receive_fixed of this InterestRateSwaption. + + True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. # noqa: E501 + + :param pay_or_receive_fixed: The pay_or_receive_fixed of this InterestRateSwaption. # noqa: E501 + :type pay_or_receive_fixed: str + """ + if self.local_vars_configuration.client_side_validation and pay_or_receive_fixed is None: # noqa: E501 + raise ValueError("Invalid value for `pay_or_receive_fixed`, must not be `None`") # noqa: E501 + + self._pay_or_receive_fixed = pay_or_receive_fixed + + @property + def premium(self): + """Gets the premium of this InterestRateSwaption. # noqa: E501 + + + :return: The premium of this InterestRateSwaption. # noqa: E501 + :rtype: lusid.Premium + """ + return self._premium + + @premium.setter + def premium(self, premium): + """Sets the premium of this InterestRateSwaption. + + + :param premium: The premium of this InterestRateSwaption. # noqa: E501 + :type premium: lusid.Premium + """ + + self._premium = premium + + @property + def delivery_method(self): + """Gets the delivery_method of this InterestRateSwaption. # noqa: E501 + + How does the option settle Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :return: The delivery_method of this InterestRateSwaption. # noqa: E501 + :rtype: str + """ + return self._delivery_method + + @delivery_method.setter + def delivery_method(self, delivery_method): + """Sets the delivery_method of this InterestRateSwaption. + + How does the option settle Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :param delivery_method: The delivery_method of this InterestRateSwaption. # noqa: E501 + :type delivery_method: str + """ + if self.local_vars_configuration.client_side_validation and delivery_method is None: # noqa: E501 + raise ValueError("Invalid value for `delivery_method`, must not be `None`") # noqa: E501 + + self._delivery_method = delivery_method + + @property + def swap(self): + """Gets the swap of this InterestRateSwaption. # noqa: E501 + + + :return: The swap of this InterestRateSwaption. # noqa: E501 + :rtype: lusid.InterestRateSwap + """ + return self._swap + + @swap.setter + def swap(self, swap): + """Sets the swap of this InterestRateSwaption. + + + :param swap: The swap of this InterestRateSwaption. # noqa: E501 + :type swap: lusid.InterestRateSwap + """ + if self.local_vars_configuration.client_side_validation and swap is None: # noqa: E501 + raise ValueError("Invalid value for `swap`, must not be `None`") # noqa: E501 + + self._swap = swap + + @property + def instrument_type(self): + """Gets the instrument_type of this InterestRateSwaption. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InterestRateSwaption. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InterestRateSwaption. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InterestRateSwaption. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InterestRateSwaption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InterestRateSwaption): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/interest_rate_swaption_all_of.py b/sdk/lusid/models/interest_rate_swaption_all_of.py new file mode 100644 index 00000000000..a3f577a664d --- /dev/null +++ b/sdk/lusid/models/interest_rate_swaption_all_of.py @@ -0,0 +1,307 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class InterestRateSwaptionAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'pay_or_receive_fixed': 'str', + 'premium': 'Premium', + 'delivery_method': 'str', + 'swap': 'InterestRateSwap', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'pay_or_receive_fixed': 'payOrReceiveFixed', + 'premium': 'premium', + 'delivery_method': 'deliveryMethod', + 'swap': 'swap', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'pay_or_receive_fixed': 'required', + 'premium': 'optional', + 'delivery_method': 'required', + 'swap': 'required', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, pay_or_receive_fixed=None, premium=None, delivery_method=None, swap=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """InterestRateSwaptionAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param pay_or_receive_fixed: True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. (required) + :type pay_or_receive_fixed: str + :param premium: + :type premium: lusid.Premium + :param delivery_method: How does the option settle Supported string (enumeration) values are: [Cash, Physical]. (required) + :type delivery_method: str + :param swap: (required) + :type swap: lusid.InterestRateSwap + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._pay_or_receive_fixed = None + self._premium = None + self._delivery_method = None + self._swap = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.pay_or_receive_fixed = pay_or_receive_fixed + if premium is not None: + self.premium = premium + self.delivery_method = delivery_method + self.swap = swap + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this InterestRateSwaptionAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this InterestRateSwaptionAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this InterestRateSwaptionAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this InterestRateSwaptionAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def pay_or_receive_fixed(self): + """Gets the pay_or_receive_fixed of this InterestRateSwaptionAllOf. # noqa: E501 + + True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. # noqa: E501 + + :return: The pay_or_receive_fixed of this InterestRateSwaptionAllOf. # noqa: E501 + :rtype: str + """ + return self._pay_or_receive_fixed + + @pay_or_receive_fixed.setter + def pay_or_receive_fixed(self, pay_or_receive_fixed): + """Sets the pay_or_receive_fixed of this InterestRateSwaptionAllOf. + + True if on exercise the holder of the option enters the swap paying fixed, false if floating. Supported string (enumeration) values are: [Pay, Receive]. # noqa: E501 + + :param pay_or_receive_fixed: The pay_or_receive_fixed of this InterestRateSwaptionAllOf. # noqa: E501 + :type pay_or_receive_fixed: str + """ + if self.local_vars_configuration.client_side_validation and pay_or_receive_fixed is None: # noqa: E501 + raise ValueError("Invalid value for `pay_or_receive_fixed`, must not be `None`") # noqa: E501 + + self._pay_or_receive_fixed = pay_or_receive_fixed + + @property + def premium(self): + """Gets the premium of this InterestRateSwaptionAllOf. # noqa: E501 + + + :return: The premium of this InterestRateSwaptionAllOf. # noqa: E501 + :rtype: lusid.Premium + """ + return self._premium + + @premium.setter + def premium(self, premium): + """Sets the premium of this InterestRateSwaptionAllOf. + + + :param premium: The premium of this InterestRateSwaptionAllOf. # noqa: E501 + :type premium: lusid.Premium + """ + + self._premium = premium + + @property + def delivery_method(self): + """Gets the delivery_method of this InterestRateSwaptionAllOf. # noqa: E501 + + How does the option settle Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :return: The delivery_method of this InterestRateSwaptionAllOf. # noqa: E501 + :rtype: str + """ + return self._delivery_method + + @delivery_method.setter + def delivery_method(self, delivery_method): + """Sets the delivery_method of this InterestRateSwaptionAllOf. + + How does the option settle Supported string (enumeration) values are: [Cash, Physical]. # noqa: E501 + + :param delivery_method: The delivery_method of this InterestRateSwaptionAllOf. # noqa: E501 + :type delivery_method: str + """ + if self.local_vars_configuration.client_side_validation and delivery_method is None: # noqa: E501 + raise ValueError("Invalid value for `delivery_method`, must not be `None`") # noqa: E501 + + self._delivery_method = delivery_method + + @property + def swap(self): + """Gets the swap of this InterestRateSwaptionAllOf. # noqa: E501 + + + :return: The swap of this InterestRateSwaptionAllOf. # noqa: E501 + :rtype: lusid.InterestRateSwap + """ + return self._swap + + @swap.setter + def swap(self, swap): + """Sets the swap of this InterestRateSwaptionAllOf. + + + :param swap: The swap of this InterestRateSwaptionAllOf. # noqa: E501 + :type swap: lusid.InterestRateSwap + """ + if self.local_vars_configuration.client_side_validation and swap is None: # noqa: E501 + raise ValueError("Invalid value for `swap`, must not be `None`") # noqa: E501 + + self._swap = swap + + @property + def instrument_type(self): + """Gets the instrument_type of this InterestRateSwaptionAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this InterestRateSwaptionAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this InterestRateSwaptionAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this InterestRateSwaptionAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InterestRateSwaptionAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InterestRateSwaptionAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/ir_vol_cube_data.py b/sdk/lusid/models/ir_vol_cube_data.py new file mode 100644 index 00000000000..9f1ee4fab18 --- /dev/null +++ b/sdk/lusid/models/ir_vol_cube_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class IrVolCubeData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """IrVolCubeData - a model defined in OpenAPI" + + :param base_date: Base date of the cube - this is the start date of the swaptions on the cube. (required) + :type base_date: datetime + :param instruments: Retrieve the set of instruments that define the cube. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: Access the set of quotes that define the cube. (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this IrVolCubeData. # noqa: E501 + + Base date of the cube - this is the start date of the swaptions on the cube. # noqa: E501 + + :return: The base_date of this IrVolCubeData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this IrVolCubeData. + + Base date of the cube - this is the start date of the swaptions on the cube. # noqa: E501 + + :param base_date: The base_date of this IrVolCubeData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this IrVolCubeData. # noqa: E501 + + Retrieve the set of instruments that define the cube. # noqa: E501 + + :return: The instruments of this IrVolCubeData. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this IrVolCubeData. + + Retrieve the set of instruments that define the cube. # noqa: E501 + + :param instruments: The instruments of this IrVolCubeData. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this IrVolCubeData. # noqa: E501 + + Access the set of quotes that define the cube. # noqa: E501 + + :return: The quotes of this IrVolCubeData. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this IrVolCubeData. + + Access the set of quotes that define the cube. # noqa: E501 + + :param quotes: The quotes of this IrVolCubeData. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this IrVolCubeData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this IrVolCubeData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this IrVolCubeData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this IrVolCubeData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this IrVolCubeData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this IrVolCubeData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this IrVolCubeData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this IrVolCubeData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IrVolCubeData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IrVolCubeData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/ir_vol_cube_data_all_of.py b/sdk/lusid/models/ir_vol_cube_data_all_of.py new file mode 100644 index 00000000000..70361c33035 --- /dev/null +++ b/sdk/lusid/models/ir_vol_cube_data_all_of.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class IrVolCubeDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """IrVolCubeDataAllOf - a model defined in OpenAPI" + + :param base_date: Base date of the cube - this is the start date of the swaptions on the cube. (required) + :type base_date: datetime + :param instruments: Retrieve the set of instruments that define the cube. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: Access the set of quotes that define the cube. (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this IrVolCubeDataAllOf. # noqa: E501 + + Base date of the cube - this is the start date of the swaptions on the cube. # noqa: E501 + + :return: The base_date of this IrVolCubeDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this IrVolCubeDataAllOf. + + Base date of the cube - this is the start date of the swaptions on the cube. # noqa: E501 + + :param base_date: The base_date of this IrVolCubeDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this IrVolCubeDataAllOf. # noqa: E501 + + Retrieve the set of instruments that define the cube. # noqa: E501 + + :return: The instruments of this IrVolCubeDataAllOf. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this IrVolCubeDataAllOf. + + Retrieve the set of instruments that define the cube. # noqa: E501 + + :param instruments: The instruments of this IrVolCubeDataAllOf. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this IrVolCubeDataAllOf. # noqa: E501 + + Access the set of quotes that define the cube. # noqa: E501 + + :return: The quotes of this IrVolCubeDataAllOf. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this IrVolCubeDataAllOf. + + Access the set of quotes that define the cube. # noqa: E501 + + :param quotes: The quotes of this IrVolCubeDataAllOf. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this IrVolCubeDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this IrVolCubeDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this IrVolCubeDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this IrVolCubeDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this IrVolCubeDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this IrVolCubeDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this IrVolCubeDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this IrVolCubeDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IrVolCubeDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IrVolCubeDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/leg_definition.py b/sdk/lusid/models/leg_definition.py new file mode 100644 index 00000000000..99014146e5b --- /dev/null +++ b/sdk/lusid/models/leg_definition.py @@ -0,0 +1,446 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class LegDefinition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'convention_name': 'FlowConventionName', + 'conventions': 'FlowConventions', + 'index_convention': 'IndexConvention', + 'index_convention_name': 'FlowConventionName', + 'notional_exchange_type': 'str', + 'pay_receive': 'str', + 'rate_or_spread': 'float', + 'reset_convention': 'str', + 'stub_type': 'str', + 'compounding': 'Compounding', + 'amortisation': 'StepSchedule' + } + + attribute_map = { + 'convention_name': 'conventionName', + 'conventions': 'conventions', + 'index_convention': 'indexConvention', + 'index_convention_name': 'indexConventionName', + 'notional_exchange_type': 'notionalExchangeType', + 'pay_receive': 'payReceive', + 'rate_or_spread': 'rateOrSpread', + 'reset_convention': 'resetConvention', + 'stub_type': 'stubType', + 'compounding': 'compounding', + 'amortisation': 'amortisation' + } + + required_map = { + 'convention_name': 'optional', + 'conventions': 'optional', + 'index_convention': 'optional', + 'index_convention_name': 'optional', + 'notional_exchange_type': 'required', + 'pay_receive': 'required', + 'rate_or_spread': 'required', + 'reset_convention': 'optional', + 'stub_type': 'required', + 'compounding': 'optional', + 'amortisation': 'optional' + } + + def __init__(self, convention_name=None, conventions=None, index_convention=None, index_convention_name=None, notional_exchange_type=None, pay_receive=None, rate_or_spread=None, reset_convention=None, stub_type=None, compounding=None, amortisation=None, local_vars_configuration=None): # noqa: E501 + """LegDefinition - a model defined in OpenAPI" + + :param convention_name: + :type convention_name: lusid.FlowConventionName + :param conventions: + :type conventions: lusid.FlowConventions + :param index_convention: + :type index_convention: lusid.IndexConvention + :param index_convention_name: + :type index_convention_name: lusid.FlowConventionName + :param notional_exchange_type: what type of notional exchange does the leg have Supported string (enumeration) values are: [None, Initial, Final, Both]. (required) + :type notional_exchange_type: str + :param pay_receive: Is the leg to be paid or received Supported string (enumeration) values are: [Pay, Receive]. (required) + :type pay_receive: str + :param rate_or_spread: Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg. (required) + :type rate_or_spread: float + :param reset_convention: Control how resets are generated relative to swap payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears]. + :type reset_convention: str + :param stub_type: If a stub is required should it be at the front or back of the leg. Supported string (enumeration) values are: [None, ShortFront, ShortBack, LongBack, LongFront, Both]. (required) + :type stub_type: str + :param compounding: + :type compounding: lusid.Compounding + :param amortisation: + :type amortisation: lusid.StepSchedule + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._convention_name = None + self._conventions = None + self._index_convention = None + self._index_convention_name = None + self._notional_exchange_type = None + self._pay_receive = None + self._rate_or_spread = None + self._reset_convention = None + self._stub_type = None + self._compounding = None + self._amortisation = None + self.discriminator = None + + if convention_name is not None: + self.convention_name = convention_name + if conventions is not None: + self.conventions = conventions + if index_convention is not None: + self.index_convention = index_convention + if index_convention_name is not None: + self.index_convention_name = index_convention_name + self.notional_exchange_type = notional_exchange_type + self.pay_receive = pay_receive + self.rate_or_spread = rate_or_spread + self.reset_convention = reset_convention + self.stub_type = stub_type + if compounding is not None: + self.compounding = compounding + if amortisation is not None: + self.amortisation = amortisation + + @property + def convention_name(self): + """Gets the convention_name of this LegDefinition. # noqa: E501 + + + :return: The convention_name of this LegDefinition. # noqa: E501 + :rtype: lusid.FlowConventionName + """ + return self._convention_name + + @convention_name.setter + def convention_name(self, convention_name): + """Sets the convention_name of this LegDefinition. + + + :param convention_name: The convention_name of this LegDefinition. # noqa: E501 + :type convention_name: lusid.FlowConventionName + """ + + self._convention_name = convention_name + + @property + def conventions(self): + """Gets the conventions of this LegDefinition. # noqa: E501 + + + :return: The conventions of this LegDefinition. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._conventions + + @conventions.setter + def conventions(self, conventions): + """Sets the conventions of this LegDefinition. + + + :param conventions: The conventions of this LegDefinition. # noqa: E501 + :type conventions: lusid.FlowConventions + """ + + self._conventions = conventions + + @property + def index_convention(self): + """Gets the index_convention of this LegDefinition. # noqa: E501 + + + :return: The index_convention of this LegDefinition. # noqa: E501 + :rtype: lusid.IndexConvention + """ + return self._index_convention + + @index_convention.setter + def index_convention(self, index_convention): + """Sets the index_convention of this LegDefinition. + + + :param index_convention: The index_convention of this LegDefinition. # noqa: E501 + :type index_convention: lusid.IndexConvention + """ + + self._index_convention = index_convention + + @property + def index_convention_name(self): + """Gets the index_convention_name of this LegDefinition. # noqa: E501 + + + :return: The index_convention_name of this LegDefinition. # noqa: E501 + :rtype: lusid.FlowConventionName + """ + return self._index_convention_name + + @index_convention_name.setter + def index_convention_name(self, index_convention_name): + """Sets the index_convention_name of this LegDefinition. + + + :param index_convention_name: The index_convention_name of this LegDefinition. # noqa: E501 + :type index_convention_name: lusid.FlowConventionName + """ + + self._index_convention_name = index_convention_name + + @property + def notional_exchange_type(self): + """Gets the notional_exchange_type of this LegDefinition. # noqa: E501 + + what type of notional exchange does the leg have Supported string (enumeration) values are: [None, Initial, Final, Both]. # noqa: E501 + + :return: The notional_exchange_type of this LegDefinition. # noqa: E501 + :rtype: str + """ + return self._notional_exchange_type + + @notional_exchange_type.setter + def notional_exchange_type(self, notional_exchange_type): + """Sets the notional_exchange_type of this LegDefinition. + + what type of notional exchange does the leg have Supported string (enumeration) values are: [None, Initial, Final, Both]. # noqa: E501 + + :param notional_exchange_type: The notional_exchange_type of this LegDefinition. # noqa: E501 + :type notional_exchange_type: str + """ + if self.local_vars_configuration.client_side_validation and notional_exchange_type is None: # noqa: E501 + raise ValueError("Invalid value for `notional_exchange_type`, must not be `None`") # noqa: E501 + + self._notional_exchange_type = notional_exchange_type + + @property + def pay_receive(self): + """Gets the pay_receive of this LegDefinition. # noqa: E501 + + Is the leg to be paid or received Supported string (enumeration) values are: [Pay, Receive]. # noqa: E501 + + :return: The pay_receive of this LegDefinition. # noqa: E501 + :rtype: str + """ + return self._pay_receive + + @pay_receive.setter + def pay_receive(self, pay_receive): + """Sets the pay_receive of this LegDefinition. + + Is the leg to be paid or received Supported string (enumeration) values are: [Pay, Receive]. # noqa: E501 + + :param pay_receive: The pay_receive of this LegDefinition. # noqa: E501 + :type pay_receive: str + """ + if self.local_vars_configuration.client_side_validation and pay_receive is None: # noqa: E501 + raise ValueError("Invalid value for `pay_receive`, must not be `None`") # noqa: E501 + + self._pay_receive = pay_receive + + @property + def rate_or_spread(self): + """Gets the rate_or_spread of this LegDefinition. # noqa: E501 + + Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg. # noqa: E501 + + :return: The rate_or_spread of this LegDefinition. # noqa: E501 + :rtype: float + """ + return self._rate_or_spread + + @rate_or_spread.setter + def rate_or_spread(self, rate_or_spread): + """Sets the rate_or_spread of this LegDefinition. + + Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg. # noqa: E501 + + :param rate_or_spread: The rate_or_spread of this LegDefinition. # noqa: E501 + :type rate_or_spread: float + """ + if self.local_vars_configuration.client_side_validation and rate_or_spread is None: # noqa: E501 + raise ValueError("Invalid value for `rate_or_spread`, must not be `None`") # noqa: E501 + + self._rate_or_spread = rate_or_spread + + @property + def reset_convention(self): + """Gets the reset_convention of this LegDefinition. # noqa: E501 + + Control how resets are generated relative to swap payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears]. # noqa: E501 + + :return: The reset_convention of this LegDefinition. # noqa: E501 + :rtype: str + """ + return self._reset_convention + + @reset_convention.setter + def reset_convention(self, reset_convention): + """Sets the reset_convention of this LegDefinition. + + Control how resets are generated relative to swap payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears]. # noqa: E501 + + :param reset_convention: The reset_convention of this LegDefinition. # noqa: E501 + :type reset_convention: str + """ + + self._reset_convention = reset_convention + + @property + def stub_type(self): + """Gets the stub_type of this LegDefinition. # noqa: E501 + + If a stub is required should it be at the front or back of the leg. Supported string (enumeration) values are: [None, ShortFront, ShortBack, LongBack, LongFront, Both]. # noqa: E501 + + :return: The stub_type of this LegDefinition. # noqa: E501 + :rtype: str + """ + return self._stub_type + + @stub_type.setter + def stub_type(self, stub_type): + """Sets the stub_type of this LegDefinition. + + If a stub is required should it be at the front or back of the leg. Supported string (enumeration) values are: [None, ShortFront, ShortBack, LongBack, LongFront, Both]. # noqa: E501 + + :param stub_type: The stub_type of this LegDefinition. # noqa: E501 + :type stub_type: str + """ + if self.local_vars_configuration.client_side_validation and stub_type is None: # noqa: E501 + raise ValueError("Invalid value for `stub_type`, must not be `None`") # noqa: E501 + + self._stub_type = stub_type + + @property + def compounding(self): + """Gets the compounding of this LegDefinition. # noqa: E501 + + + :return: The compounding of this LegDefinition. # noqa: E501 + :rtype: lusid.Compounding + """ + return self._compounding + + @compounding.setter + def compounding(self, compounding): + """Sets the compounding of this LegDefinition. + + + :param compounding: The compounding of this LegDefinition. # noqa: E501 + :type compounding: lusid.Compounding + """ + + self._compounding = compounding + + @property + def amortisation(self): + """Gets the amortisation of this LegDefinition. # noqa: E501 + + + :return: The amortisation of this LegDefinition. # noqa: E501 + :rtype: lusid.StepSchedule + """ + return self._amortisation + + @amortisation.setter + def amortisation(self, amortisation): + """Sets the amortisation of this LegDefinition. + + + :param amortisation: The amortisation of this LegDefinition. # noqa: E501 + :type amortisation: lusid.StepSchedule + """ + + self._amortisation = amortisation + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LegDefinition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LegDefinition): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/level_step.py b/sdk/lusid/models/level_step.py new file mode 100644 index 00000000000..9ade5ee31a8 --- /dev/null +++ b/sdk/lusid/models/level_step.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class LevelStep(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'date': 'datetime', + 'quantity': 'float' + } + + attribute_map = { + 'date': 'date', + 'quantity': 'quantity' + } + + required_map = { + 'date': 'required', + 'quantity': 'required' + } + + def __init__(self, date=None, quantity=None, local_vars_configuration=None): # noqa: E501 + """LevelStep - a model defined in OpenAPI" + + :param date: The date from which the level should apply. (required) + :type date: datetime + :param quantity: The quantity which is applied. This might be an absolute, percentage, fractional or other value. (required) + :type quantity: float + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._date = None + self._quantity = None + self.discriminator = None + + self.date = date + self.quantity = quantity + + @property + def date(self): + """Gets the date of this LevelStep. # noqa: E501 + + The date from which the level should apply. # noqa: E501 + + :return: The date of this LevelStep. # noqa: E501 + :rtype: datetime + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this LevelStep. + + The date from which the level should apply. # noqa: E501 + + :param date: The date of this LevelStep. # noqa: E501 + :type date: datetime + """ + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 + raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + + self._date = date + + @property + def quantity(self): + """Gets the quantity of this LevelStep. # noqa: E501 + + The quantity which is applied. This might be an absolute, percentage, fractional or other value. # noqa: E501 + + :return: The quantity of this LevelStep. # noqa: E501 + :rtype: float + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """Sets the quantity of this LevelStep. + + The quantity which is applied. This might be an absolute, percentage, fractional or other value. # noqa: E501 + + :param quantity: The quantity of this LevelStep. # noqa: E501 + :type quantity: float + """ + if self.local_vars_configuration.client_side_validation and quantity is None: # noqa: E501 + raise ValueError("Invalid value for `quantity`, must not be `None`") # noqa: E501 + + self._quantity = quantity + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LevelStep): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LevelStep): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/lusid_instrument.py b/sdk/lusid/models/lusid_instrument.py index 8eeb6b3e1ae..737afa1fbdd 100644 --- a/sdk/lusid/models/lusid_instrument.py +++ b/sdk/lusid/models/lusid_instrument.py @@ -51,6 +51,32 @@ class LusidInstrument(object): } discriminator_value_class_map = { + 'InterestRateSwaption': 'InterestRateSwaption', + 'ContractForDifference': 'ContractForDifference', + 'FxOption': 'FxOption', + 'CashPerpetual': 'CashPerpetual', + 'ComplexBond': 'ComplexBond', + 'EquitySwap': 'EquitySwap', + 'CapFloor': 'CapFloor', + 'TermDeposit': 'TermDeposit', + 'CreditDefaultSwap': 'CreditDefaultSwap', + 'CdsIndex': 'CdsIndex', + 'InflationLinkedBond': 'InflationLinkedBond', + 'ExchangeTradedOption': 'ExchangeTradedOption', + 'EquityOption': 'EquityOption', + 'InstrumentLeg': 'InstrumentLeg', + 'ForwardRateAgreement': 'ForwardRateAgreement', + 'FxForward': 'FxForward', + 'SimpleInstrument': 'SimpleInstrument', + 'InterestRateSwap': 'InterestRateSwap', + 'ExoticInstrument': 'ExoticInstrument', + 'Equity': 'Equity', + 'Bond': 'Bond', + 'FxSwap': 'FxSwap', + 'Repo': 'Repo', + 'ReferenceInstrument': 'ReferenceInstrument', + 'Basket': 'Basket', + 'Future': 'Future' } def __init__(self, instrument_type=None, local_vars_configuration=None): # noqa: E501 diff --git a/sdk/lusid/models/market_quote.py b/sdk/lusid/models/market_quote.py new file mode 100644 index 00000000000..94b079cb7f1 --- /dev/null +++ b/sdk/lusid/models/market_quote.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class MarketQuote(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'quote_type': 'str', + 'value': 'float' + } + + attribute_map = { + 'quote_type': 'quoteType', + 'value': 'value' + } + + required_map = { + 'quote_type': 'required', + 'value': 'required' + } + + def __init__(self, quote_type=None, value=None, local_vars_configuration=None): # noqa: E501 + """MarketQuote - a model defined in OpenAPI" + + :param quote_type: The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta (required) + :type quote_type: str + :param value: Numeric value of the quote (required) + :type value: float + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._quote_type = None + self._value = None + self.discriminator = None + + self.quote_type = quote_type + self.value = value + + @property + def quote_type(self): + """Gets the quote_type of this MarketQuote. # noqa: E501 + + The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta # noqa: E501 + + :return: The quote_type of this MarketQuote. # noqa: E501 + :rtype: str + """ + return self._quote_type + + @quote_type.setter + def quote_type(self, quote_type): + """Sets the quote_type of this MarketQuote. + + The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta # noqa: E501 + + :param quote_type: The quote_type of this MarketQuote. # noqa: E501 + :type quote_type: str + """ + if self.local_vars_configuration.client_side_validation and quote_type is None: # noqa: E501 + raise ValueError("Invalid value for `quote_type`, must not be `None`") # noqa: E501 + allowed_values = ["Price", "Spread", "Rate", "LogNormalVol", "NormalVol", "ParSpread", "IsdaSpread", "Upfront", "Index", "Ratio", "Delta"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and quote_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `quote_type` ({0}), must be one of {1}" # noqa: E501 + .format(quote_type, allowed_values) + ) + + self._quote_type = quote_type + + @property + def value(self): + """Gets the value of this MarketQuote. # noqa: E501 + + Numeric value of the quote # noqa: E501 + + :return: The value of this MarketQuote. # noqa: E501 + :rtype: float + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this MarketQuote. + + Numeric value of the quote # noqa: E501 + + :param value: The value of this MarketQuote. # noqa: E501 + :type value: float + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MarketQuote): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarketQuote): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/model_options.py b/sdk/lusid/models/model_options.py index da42a8873f8..70521e92be9 100644 --- a/sdk/lusid/models/model_options.py +++ b/sdk/lusid/models/model_options.py @@ -51,6 +51,11 @@ class ModelOptions(object): } discriminator_value_class_map = { + 'EmptyModelOptions': 'EmptyModelOptions', + 'OpaqueModelOptions': 'OpaqueModelOptions', + 'IndexModelOptions': 'IndexModelOptions', + 'EquityModelOptions': 'EquityModelOptions', + 'FxForwardModelOptions': 'FxForwardModelOptions' } def __init__(self, model_options_type=None, local_vars_configuration=None): # noqa: E501 diff --git a/sdk/lusid/models/opaque_market_data.py b/sdk/lusid/models/opaque_market_data.py new file mode 100644 index 00000000000..e64646a6ec3 --- /dev/null +++ b/sdk/lusid/models/opaque_market_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class OpaqueMarketData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'document': 'str', + 'format': 'str', + 'name': 'str', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'document': 'document', + 'format': 'format', + 'name': 'name', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'document': 'required', + 'format': 'required', + 'name': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, document=None, format=None, name=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """OpaqueMarketData - a model defined in OpenAPI" + + :param document: The document as a string. (required) + :type document: str + :param format: What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. (required) + :type format: str + :param name: Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) (required) + :type name: str + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._document = None + self._format = None + self._name = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.document = document + self.format = format + self.name = name + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def document(self): + """Gets the document of this OpaqueMarketData. # noqa: E501 + + The document as a string. # noqa: E501 + + :return: The document of this OpaqueMarketData. # noqa: E501 + :rtype: str + """ + return self._document + + @document.setter + def document(self, document): + """Sets the document of this OpaqueMarketData. + + The document as a string. # noqa: E501 + + :param document: The document of this OpaqueMarketData. # noqa: E501 + :type document: str + """ + if self.local_vars_configuration.client_side_validation and document is None: # noqa: E501 + raise ValueError("Invalid value for `document`, must not be `None`") # noqa: E501 + + self._document = document + + @property + def format(self): + """Gets the format of this OpaqueMarketData. # noqa: E501 + + What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. # noqa: E501 + + :return: The format of this OpaqueMarketData. # noqa: E501 + :rtype: str + """ + return self._format + + @format.setter + def format(self, format): + """Sets the format of this OpaqueMarketData. + + What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. # noqa: E501 + + :param format: The format of this OpaqueMarketData. # noqa: E501 + :type format: str + """ + if self.local_vars_configuration.client_side_validation and format is None: # noqa: E501 + raise ValueError("Invalid value for `format`, must not be `None`") # noqa: E501 + + self._format = format + + @property + def name(self): + """Gets the name of this OpaqueMarketData. # noqa: E501 + + Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) # noqa: E501 + + :return: The name of this OpaqueMarketData. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OpaqueMarketData. + + Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) # noqa: E501 + + :param name: The name of this OpaqueMarketData. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def lineage(self): + """Gets the lineage of this OpaqueMarketData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this OpaqueMarketData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this OpaqueMarketData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this OpaqueMarketData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this OpaqueMarketData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this OpaqueMarketData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this OpaqueMarketData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this OpaqueMarketData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OpaqueMarketData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OpaqueMarketData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/opaque_market_data_all_of.py b/sdk/lusid/models/opaque_market_data_all_of.py new file mode 100644 index 00000000000..b3a1337b381 --- /dev/null +++ b/sdk/lusid/models/opaque_market_data_all_of.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class OpaqueMarketDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'document': 'str', + 'format': 'str', + 'name': 'str', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'document': 'document', + 'format': 'format', + 'name': 'name', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'document': 'required', + 'format': 'required', + 'name': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, document=None, format=None, name=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """OpaqueMarketDataAllOf - a model defined in OpenAPI" + + :param document: The document as a string. (required) + :type document: str + :param format: What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. (required) + :type format: str + :param name: Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) (required) + :type name: str + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._document = None + self._format = None + self._name = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.document = document + self.format = format + self.name = name + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def document(self): + """Gets the document of this OpaqueMarketDataAllOf. # noqa: E501 + + The document as a string. # noqa: E501 + + :return: The document of this OpaqueMarketDataAllOf. # noqa: E501 + :rtype: str + """ + return self._document + + @document.setter + def document(self, document): + """Sets the document of this OpaqueMarketDataAllOf. + + The document as a string. # noqa: E501 + + :param document: The document of this OpaqueMarketDataAllOf. # noqa: E501 + :type document: str + """ + if self.local_vars_configuration.client_side_validation and document is None: # noqa: E501 + raise ValueError("Invalid value for `document`, must not be `None`") # noqa: E501 + + self._document = document + + @property + def format(self): + """Gets the format of this OpaqueMarketDataAllOf. # noqa: E501 + + What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. # noqa: E501 + + :return: The format of this OpaqueMarketDataAllOf. # noqa: E501 + :rtype: str + """ + return self._format + + @format.setter + def format(self, format): + """Sets the format of this OpaqueMarketDataAllOf. + + What format is the document stored in, e.g. Xml. Supported string (enumeration) values are: [Unknown, Xml, Json, Csv]. # noqa: E501 + + :param format: The format of this OpaqueMarketDataAllOf. # noqa: E501 + :type format: str + """ + if self.local_vars_configuration.client_side_validation and format is None: # noqa: E501 + raise ValueError("Invalid value for `format`, must not be `None`") # noqa: E501 + + self._format = format + + @property + def name(self): + """Gets the name of this OpaqueMarketDataAllOf. # noqa: E501 + + Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) # noqa: E501 + + :return: The name of this OpaqueMarketDataAllOf. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OpaqueMarketDataAllOf. + + Internal name of document. This is not used for search, it is simply a designator that helps identify the document and could be anything (filename, ftp address or similar) # noqa: E501 + + :param name: The name of this OpaqueMarketDataAllOf. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def lineage(self): + """Gets the lineage of this OpaqueMarketDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this OpaqueMarketDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this OpaqueMarketDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this OpaqueMarketDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this OpaqueMarketDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this OpaqueMarketDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this OpaqueMarketDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this OpaqueMarketDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OpaqueMarketDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OpaqueMarketDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/opaque_model_options.py b/sdk/lusid/models/opaque_model_options.py new file mode 100644 index 00000000000..a3a808cbd2a --- /dev/null +++ b/sdk/lusid/models/opaque_model_options.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class OpaqueModelOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'data': 'dict(str, object)', + 'model_options_type': 'str' + } + + attribute_map = { + 'data': 'data', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'data': 'required', + 'model_options_type': 'required' + } + + def __init__(self, data=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """OpaqueModelOptions - a model defined in OpenAPI" + + :param data: (required) + :type data: dict(str, object) + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self._model_options_type = None + self.discriminator = None + + self.data = data + self.model_options_type = model_options_type + + @property + def data(self): + """Gets the data of this OpaqueModelOptions. # noqa: E501 + + + :return: The data of this OpaqueModelOptions. # noqa: E501 + :rtype: dict(str, object) + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OpaqueModelOptions. + + + :param data: The data of this OpaqueModelOptions. # noqa: E501 + :type data: dict(str, object) + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def model_options_type(self): + """Gets the model_options_type of this OpaqueModelOptions. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this OpaqueModelOptions. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this OpaqueModelOptions. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this OpaqueModelOptions. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OpaqueModelOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OpaqueModelOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/opaque_model_options_all_of.py b/sdk/lusid/models/opaque_model_options_all_of.py new file mode 100644 index 00000000000..21f9177ae0f --- /dev/null +++ b/sdk/lusid/models/opaque_model_options_all_of.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class OpaqueModelOptionsAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'data': 'dict(str, object)', + 'model_options_type': 'str' + } + + attribute_map = { + 'data': 'data', + 'model_options_type': 'modelOptionsType' + } + + required_map = { + 'data': 'required', + 'model_options_type': 'required' + } + + def __init__(self, data=None, model_options_type=None, local_vars_configuration=None): # noqa: E501 + """OpaqueModelOptionsAllOf - a model defined in OpenAPI" + + :param data: (required) + :type data: dict(str, object) + :param model_options_type: The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions (required) + :type model_options_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self._model_options_type = None + self.discriminator = None + + self.data = data + self.model_options_type = model_options_type + + @property + def data(self): + """Gets the data of this OpaqueModelOptionsAllOf. # noqa: E501 + + + :return: The data of this OpaqueModelOptionsAllOf. # noqa: E501 + :rtype: dict(str, object) + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this OpaqueModelOptionsAllOf. + + + :param data: The data of this OpaqueModelOptionsAllOf. # noqa: E501 + :type data: dict(str, object) + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def model_options_type(self): + """Gets the model_options_type of this OpaqueModelOptionsAllOf. # noqa: E501 + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :return: The model_options_type of this OpaqueModelOptionsAllOf. # noqa: E501 + :rtype: str + """ + return self._model_options_type + + @model_options_type.setter + def model_options_type(self, model_options_type): + """Sets the model_options_type of this OpaqueModelOptionsAllOf. + + The available values are: Invalid, OpaqueModelOptions, EmptyModelOptions, IndexModelOptions, FxForwardModelOptions, FundingLegModelOptions, EquityModelOptions # noqa: E501 + + :param model_options_type: The model_options_type of this OpaqueModelOptionsAllOf. # noqa: E501 + :type model_options_type: str + """ + if self.local_vars_configuration.client_side_validation and model_options_type is None: # noqa: E501 + raise ValueError("Invalid value for `model_options_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "OpaqueModelOptions", "EmptyModelOptions", "IndexModelOptions", "FxForwardModelOptions", "FundingLegModelOptions", "EquityModelOptions"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and model_options_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `model_options_type` ({0}), must be one of {1}" # noqa: E501 + .format(model_options_type, allowed_values) + ) + + self._model_options_type = model_options_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OpaqueModelOptionsAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OpaqueModelOptionsAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/portfolio_result_data_key_rule.py b/sdk/lusid/models/portfolio_result_data_key_rule.py new file mode 100644 index 00000000000..653baa0876b --- /dev/null +++ b/sdk/lusid/models/portfolio_result_data_key_rule.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class PortfolioResultDataKeyRule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'supplier': 'str', + 'data_scope': 'str', + 'document_code': 'str', + 'quote_interval': 'str', + 'as_at': 'datetime', + 'portfolio_code': 'str', + 'portfolio_scope': 'str', + 'result_key_rule_type': 'str' + } + + attribute_map = { + 'supplier': 'supplier', + 'data_scope': 'dataScope', + 'document_code': 'documentCode', + 'quote_interval': 'quoteInterval', + 'as_at': 'asAt', + 'portfolio_code': 'portfolioCode', + 'portfolio_scope': 'portfolioScope', + 'result_key_rule_type': 'resultKeyRuleType' + } + + required_map = { + 'supplier': 'required', + 'data_scope': 'required', + 'document_code': 'required', + 'quote_interval': 'optional', + 'as_at': 'optional', + 'portfolio_code': 'optional', + 'portfolio_scope': 'optional', + 'result_key_rule_type': 'required' + } + + def __init__(self, supplier=None, data_scope=None, document_code=None, quote_interval=None, as_at=None, portfolio_code=None, portfolio_scope=None, result_key_rule_type=None, local_vars_configuration=None): # noqa: E501 + """PortfolioResultDataKeyRule - a model defined in OpenAPI" + + :param supplier: the result resource supplier (where the data comes from) (required) + :type supplier: str + :param data_scope: which is the scope in which the data should be found (required) + :type data_scope: str + :param document_code: document code that defines which document is desired (required) + :type document_code: str + :param quote_interval: Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). + :type quote_interval: str + :param as_at: The AsAt predicate specification. + :type as_at: datetime + :param portfolio_code: + :type portfolio_code: str + :param portfolio_scope: + :type portfolio_scope: str + :param result_key_rule_type: The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule (required) + :type result_key_rule_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._supplier = None + self._data_scope = None + self._document_code = None + self._quote_interval = None + self._as_at = None + self._portfolio_code = None + self._portfolio_scope = None + self._result_key_rule_type = None + self.discriminator = None + + self.supplier = supplier + self.data_scope = data_scope + self.document_code = document_code + self.quote_interval = quote_interval + self.as_at = as_at + self.portfolio_code = portfolio_code + self.portfolio_scope = portfolio_scope + self.result_key_rule_type = result_key_rule_type + + @property + def supplier(self): + """Gets the supplier of this PortfolioResultDataKeyRule. # noqa: E501 + + the result resource supplier (where the data comes from) # noqa: E501 + + :return: The supplier of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._supplier + + @supplier.setter + def supplier(self, supplier): + """Sets the supplier of this PortfolioResultDataKeyRule. + + the result resource supplier (where the data comes from) # noqa: E501 + + :param supplier: The supplier of this PortfolioResultDataKeyRule. # noqa: E501 + :type supplier: str + """ + if self.local_vars_configuration.client_side_validation and supplier is None: # noqa: E501 + raise ValueError("Invalid value for `supplier`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) > 32): + raise ValueError("Invalid value for `supplier`, length must be less than or equal to `32`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) < 0): + raise ValueError("Invalid value for `supplier`, length must be greater than or equal to `0`") # noqa: E501 + + self._supplier = supplier + + @property + def data_scope(self): + """Gets the data_scope of this PortfolioResultDataKeyRule. # noqa: E501 + + which is the scope in which the data should be found # noqa: E501 + + :return: The data_scope of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._data_scope + + @data_scope.setter + def data_scope(self, data_scope): + """Sets the data_scope of this PortfolioResultDataKeyRule. + + which is the scope in which the data should be found # noqa: E501 + + :param data_scope: The data_scope of this PortfolioResultDataKeyRule. # noqa: E501 + :type data_scope: str + """ + if self.local_vars_configuration.client_side_validation and data_scope is None: # noqa: E501 + raise ValueError("Invalid value for `data_scope`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) > 256): + raise ValueError("Invalid value for `data_scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) < 1): + raise ValueError("Invalid value for `data_scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', data_scope)): # noqa: E501 + raise ValueError(r"Invalid value for `data_scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._data_scope = data_scope + + @property + def document_code(self): + """Gets the document_code of this PortfolioResultDataKeyRule. # noqa: E501 + + document code that defines which document is desired # noqa: E501 + + :return: The document_code of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._document_code + + @document_code.setter + def document_code(self, document_code): + """Sets the document_code of this PortfolioResultDataKeyRule. + + document code that defines which document is desired # noqa: E501 + + :param document_code: The document_code of this PortfolioResultDataKeyRule. # noqa: E501 + :type document_code: str + """ + if self.local_vars_configuration.client_side_validation and document_code is None: # noqa: E501 + raise ValueError("Invalid value for `document_code`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) > 256): + raise ValueError("Invalid value for `document_code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) < 1): + raise ValueError("Invalid value for `document_code`, length must be greater than or equal to `1`") # noqa: E501 + + self._document_code = document_code + + @property + def quote_interval(self): + """Gets the quote_interval of this PortfolioResultDataKeyRule. # noqa: E501 + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :return: The quote_interval of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._quote_interval + + @quote_interval.setter + def quote_interval(self, quote_interval): + """Sets the quote_interval of this PortfolioResultDataKeyRule. + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :param quote_interval: The quote_interval of this PortfolioResultDataKeyRule. # noqa: E501 + :type quote_interval: str + """ + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) > 16): + raise ValueError("Invalid value for `quote_interval`, length must be less than or equal to `16`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) < 0): + raise ValueError("Invalid value for `quote_interval`, length must be greater than or equal to `0`") # noqa: E501 + + self._quote_interval = quote_interval + + @property + def as_at(self): + """Gets the as_at of this PortfolioResultDataKeyRule. # noqa: E501 + + The AsAt predicate specification. # noqa: E501 + + :return: The as_at of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: datetime + """ + return self._as_at + + @as_at.setter + def as_at(self, as_at): + """Sets the as_at of this PortfolioResultDataKeyRule. + + The AsAt predicate specification. # noqa: E501 + + :param as_at: The as_at of this PortfolioResultDataKeyRule. # noqa: E501 + :type as_at: datetime + """ + + self._as_at = as_at + + @property + def portfolio_code(self): + """Gets the portfolio_code of this PortfolioResultDataKeyRule. # noqa: E501 + + + :return: The portfolio_code of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._portfolio_code + + @portfolio_code.setter + def portfolio_code(self, portfolio_code): + """Sets the portfolio_code of this PortfolioResultDataKeyRule. + + + :param portfolio_code: The portfolio_code of this PortfolioResultDataKeyRule. # noqa: E501 + :type portfolio_code: str + """ + if (self.local_vars_configuration.client_side_validation and + portfolio_code is not None and len(portfolio_code) > 256): + raise ValueError("Invalid value for `portfolio_code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_code is not None and len(portfolio_code) < 1): + raise ValueError("Invalid value for `portfolio_code`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_code is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', portfolio_code)): # noqa: E501 + raise ValueError(r"Invalid value for `portfolio_code`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._portfolio_code = portfolio_code + + @property + def portfolio_scope(self): + """Gets the portfolio_scope of this PortfolioResultDataKeyRule. # noqa: E501 + + + :return: The portfolio_scope of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._portfolio_scope + + @portfolio_scope.setter + def portfolio_scope(self, portfolio_scope): + """Sets the portfolio_scope of this PortfolioResultDataKeyRule. + + + :param portfolio_scope: The portfolio_scope of this PortfolioResultDataKeyRule. # noqa: E501 + :type portfolio_scope: str + """ + if (self.local_vars_configuration.client_side_validation and + portfolio_scope is not None and len(portfolio_scope) > 256): + raise ValueError("Invalid value for `portfolio_scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_scope is not None and len(portfolio_scope) < 1): + raise ValueError("Invalid value for `portfolio_scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', portfolio_scope)): # noqa: E501 + raise ValueError(r"Invalid value for `portfolio_scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._portfolio_scope = portfolio_scope + + @property + def result_key_rule_type(self): + """Gets the result_key_rule_type of this PortfolioResultDataKeyRule. # noqa: E501 + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :return: The result_key_rule_type of this PortfolioResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._result_key_rule_type + + @result_key_rule_type.setter + def result_key_rule_type(self, result_key_rule_type): + """Sets the result_key_rule_type of this PortfolioResultDataKeyRule. + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :param result_key_rule_type: The result_key_rule_type of this PortfolioResultDataKeyRule. # noqa: E501 + :type result_key_rule_type: str + """ + if self.local_vars_configuration.client_side_validation and result_key_rule_type is None: # noqa: E501 + raise ValueError("Invalid value for `result_key_rule_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "ResultDataKeyRule", "PortfolioResultDataKeyRule"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and result_key_rule_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `result_key_rule_type` ({0}), must be one of {1}" # noqa: E501 + .format(result_key_rule_type, allowed_values) + ) + + self._result_key_rule_type = result_key_rule_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PortfolioResultDataKeyRule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PortfolioResultDataKeyRule): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/portfolio_result_data_key_rule_all_of.py b/sdk/lusid/models/portfolio_result_data_key_rule_all_of.py new file mode 100644 index 00000000000..7892777e22d --- /dev/null +++ b/sdk/lusid/models/portfolio_result_data_key_rule_all_of.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class PortfolioResultDataKeyRuleAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'supplier': 'str', + 'data_scope': 'str', + 'document_code': 'str', + 'quote_interval': 'str', + 'as_at': 'datetime', + 'portfolio_code': 'str', + 'portfolio_scope': 'str', + 'result_key_rule_type': 'str' + } + + attribute_map = { + 'supplier': 'supplier', + 'data_scope': 'dataScope', + 'document_code': 'documentCode', + 'quote_interval': 'quoteInterval', + 'as_at': 'asAt', + 'portfolio_code': 'portfolioCode', + 'portfolio_scope': 'portfolioScope', + 'result_key_rule_type': 'resultKeyRuleType' + } + + required_map = { + 'supplier': 'required', + 'data_scope': 'required', + 'document_code': 'required', + 'quote_interval': 'optional', + 'as_at': 'optional', + 'portfolio_code': 'optional', + 'portfolio_scope': 'optional', + 'result_key_rule_type': 'required' + } + + def __init__(self, supplier=None, data_scope=None, document_code=None, quote_interval=None, as_at=None, portfolio_code=None, portfolio_scope=None, result_key_rule_type=None, local_vars_configuration=None): # noqa: E501 + """PortfolioResultDataKeyRuleAllOf - a model defined in OpenAPI" + + :param supplier: the result resource supplier (where the data comes from) (required) + :type supplier: str + :param data_scope: which is the scope in which the data should be found (required) + :type data_scope: str + :param document_code: document code that defines which document is desired (required) + :type document_code: str + :param quote_interval: Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). + :type quote_interval: str + :param as_at: The AsAt predicate specification. + :type as_at: datetime + :param portfolio_code: + :type portfolio_code: str + :param portfolio_scope: + :type portfolio_scope: str + :param result_key_rule_type: The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule (required) + :type result_key_rule_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._supplier = None + self._data_scope = None + self._document_code = None + self._quote_interval = None + self._as_at = None + self._portfolio_code = None + self._portfolio_scope = None + self._result_key_rule_type = None + self.discriminator = None + + self.supplier = supplier + self.data_scope = data_scope + self.document_code = document_code + self.quote_interval = quote_interval + self.as_at = as_at + self.portfolio_code = portfolio_code + self.portfolio_scope = portfolio_scope + self.result_key_rule_type = result_key_rule_type + + @property + def supplier(self): + """Gets the supplier of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + the result resource supplier (where the data comes from) # noqa: E501 + + :return: The supplier of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._supplier + + @supplier.setter + def supplier(self, supplier): + """Sets the supplier of this PortfolioResultDataKeyRuleAllOf. + + the result resource supplier (where the data comes from) # noqa: E501 + + :param supplier: The supplier of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type supplier: str + """ + if self.local_vars_configuration.client_side_validation and supplier is None: # noqa: E501 + raise ValueError("Invalid value for `supplier`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) > 32): + raise ValueError("Invalid value for `supplier`, length must be less than or equal to `32`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) < 0): + raise ValueError("Invalid value for `supplier`, length must be greater than or equal to `0`") # noqa: E501 + + self._supplier = supplier + + @property + def data_scope(self): + """Gets the data_scope of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + which is the scope in which the data should be found # noqa: E501 + + :return: The data_scope of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._data_scope + + @data_scope.setter + def data_scope(self, data_scope): + """Sets the data_scope of this PortfolioResultDataKeyRuleAllOf. + + which is the scope in which the data should be found # noqa: E501 + + :param data_scope: The data_scope of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type data_scope: str + """ + if self.local_vars_configuration.client_side_validation and data_scope is None: # noqa: E501 + raise ValueError("Invalid value for `data_scope`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) > 256): + raise ValueError("Invalid value for `data_scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) < 1): + raise ValueError("Invalid value for `data_scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', data_scope)): # noqa: E501 + raise ValueError(r"Invalid value for `data_scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._data_scope = data_scope + + @property + def document_code(self): + """Gets the document_code of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + document code that defines which document is desired # noqa: E501 + + :return: The document_code of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._document_code + + @document_code.setter + def document_code(self, document_code): + """Sets the document_code of this PortfolioResultDataKeyRuleAllOf. + + document code that defines which document is desired # noqa: E501 + + :param document_code: The document_code of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type document_code: str + """ + if self.local_vars_configuration.client_side_validation and document_code is None: # noqa: E501 + raise ValueError("Invalid value for `document_code`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) > 256): + raise ValueError("Invalid value for `document_code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) < 1): + raise ValueError("Invalid value for `document_code`, length must be greater than or equal to `1`") # noqa: E501 + + self._document_code = document_code + + @property + def quote_interval(self): + """Gets the quote_interval of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :return: The quote_interval of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._quote_interval + + @quote_interval.setter + def quote_interval(self, quote_interval): + """Sets the quote_interval of this PortfolioResultDataKeyRuleAllOf. + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :param quote_interval: The quote_interval of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type quote_interval: str + """ + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) > 16): + raise ValueError("Invalid value for `quote_interval`, length must be less than or equal to `16`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) < 0): + raise ValueError("Invalid value for `quote_interval`, length must be greater than or equal to `0`") # noqa: E501 + + self._quote_interval = quote_interval + + @property + def as_at(self): + """Gets the as_at of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + The AsAt predicate specification. # noqa: E501 + + :return: The as_at of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: datetime + """ + return self._as_at + + @as_at.setter + def as_at(self, as_at): + """Sets the as_at of this PortfolioResultDataKeyRuleAllOf. + + The AsAt predicate specification. # noqa: E501 + + :param as_at: The as_at of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type as_at: datetime + """ + + self._as_at = as_at + + @property + def portfolio_code(self): + """Gets the portfolio_code of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + + :return: The portfolio_code of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._portfolio_code + + @portfolio_code.setter + def portfolio_code(self, portfolio_code): + """Sets the portfolio_code of this PortfolioResultDataKeyRuleAllOf. + + + :param portfolio_code: The portfolio_code of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type portfolio_code: str + """ + if (self.local_vars_configuration.client_side_validation and + portfolio_code is not None and len(portfolio_code) > 256): + raise ValueError("Invalid value for `portfolio_code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_code is not None and len(portfolio_code) < 1): + raise ValueError("Invalid value for `portfolio_code`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_code is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', portfolio_code)): # noqa: E501 + raise ValueError(r"Invalid value for `portfolio_code`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._portfolio_code = portfolio_code + + @property + def portfolio_scope(self): + """Gets the portfolio_scope of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + + :return: The portfolio_scope of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._portfolio_scope + + @portfolio_scope.setter + def portfolio_scope(self, portfolio_scope): + """Sets the portfolio_scope of this PortfolioResultDataKeyRuleAllOf. + + + :param portfolio_scope: The portfolio_scope of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type portfolio_scope: str + """ + if (self.local_vars_configuration.client_side_validation and + portfolio_scope is not None and len(portfolio_scope) > 256): + raise ValueError("Invalid value for `portfolio_scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_scope is not None and len(portfolio_scope) < 1): + raise ValueError("Invalid value for `portfolio_scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + portfolio_scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', portfolio_scope)): # noqa: E501 + raise ValueError(r"Invalid value for `portfolio_scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._portfolio_scope = portfolio_scope + + @property + def result_key_rule_type(self): + """Gets the result_key_rule_type of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :return: The result_key_rule_type of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._result_key_rule_type + + @result_key_rule_type.setter + def result_key_rule_type(self, result_key_rule_type): + """Sets the result_key_rule_type of this PortfolioResultDataKeyRuleAllOf. + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :param result_key_rule_type: The result_key_rule_type of this PortfolioResultDataKeyRuleAllOf. # noqa: E501 + :type result_key_rule_type: str + """ + if self.local_vars_configuration.client_side_validation and result_key_rule_type is None: # noqa: E501 + raise ValueError("Invalid value for `result_key_rule_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "ResultDataKeyRule", "PortfolioResultDataKeyRule"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and result_key_rule_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `result_key_rule_type` ({0}), must be one of {1}" # noqa: E501 + .format(result_key_rule_type, allowed_values) + ) + + self._result_key_rule_type = result_key_rule_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PortfolioResultDataKeyRuleAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PortfolioResultDataKeyRuleAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/premium.py b/sdk/lusid/models/premium.py new file mode 100644 index 00000000000..dd75dff478e --- /dev/null +++ b/sdk/lusid/models/premium.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Premium(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'amount': 'float', + 'currency': 'str', + 'date': 'datetime' + } + + attribute_map = { + 'amount': 'amount', + 'currency': 'currency', + 'date': 'date' + } + + required_map = { + 'amount': 'required', + 'currency': 'required', + 'date': 'required' + } + + def __init__(self, amount=None, currency=None, date=None, local_vars_configuration=None): # noqa: E501 + """Premium - a model defined in OpenAPI" + + :param amount: Premium amount. (required) + :type amount: float + :param currency: Premium currency. (required) + :type currency: str + :param date: Date when premium paid. (required) + :type date: datetime + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._amount = None + self._currency = None + self._date = None + self.discriminator = None + + self.amount = amount + self.currency = currency + self.date = date + + @property + def amount(self): + """Gets the amount of this Premium. # noqa: E501 + + Premium amount. # noqa: E501 + + :return: The amount of this Premium. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Premium. + + Premium amount. # noqa: E501 + + :param amount: The amount of this Premium. # noqa: E501 + :type amount: float + """ + if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def currency(self): + """Gets the currency of this Premium. # noqa: E501 + + Premium currency. # noqa: E501 + + :return: The currency of this Premium. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Premium. + + Premium currency. # noqa: E501 + + :param currency: The currency of this Premium. # noqa: E501 + :type currency: str + """ + if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501 + raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 + + self._currency = currency + + @property + def date(self): + """Gets the date of this Premium. # noqa: E501 + + Date when premium paid. # noqa: E501 + + :return: The date of this Premium. # noqa: E501 + :rtype: datetime + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this Premium. + + Date when premium paid. # noqa: E501 + + :param date: The date of this Premium. # noqa: E501 + :type date: datetime + """ + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 + raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + + self._date = date + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Premium): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Premium): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/reference_instrument.py b/sdk/lusid/models/reference_instrument.py new file mode 100644 index 00000000000..9556bb8beef --- /dev/null +++ b/sdk/lusid/models/reference_instrument.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ReferenceInstrument(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instrument_id': 'str', + 'instrument_id_type': 'str', + 'scope': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'instrument_id': 'instrumentId', + 'instrument_id_type': 'instrumentIdType', + 'scope': 'scope', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'instrument_id': 'required', + 'instrument_id_type': 'required', + 'scope': 'required', + 'instrument_type': 'required' + } + + def __init__(self, instrument_id=None, instrument_id_type=None, scope=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ReferenceInstrument - a model defined in OpenAPI" + + :param instrument_id: The Identifier code (required) + :type instrument_id: str + :param instrument_id_type: the type of the instrument id e.g. LusidInstrument Id (required) + :type instrument_id_type: str + :param scope: (optional) Scope for the instrument (required) + :type scope: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instrument_id = None + self._instrument_id_type = None + self._scope = None + self._instrument_type = None + self.discriminator = None + + self.instrument_id = instrument_id + self.instrument_id_type = instrument_id_type + self.scope = scope + self.instrument_type = instrument_type + + @property + def instrument_id(self): + """Gets the instrument_id of this ReferenceInstrument. # noqa: E501 + + The Identifier code # noqa: E501 + + :return: The instrument_id of this ReferenceInstrument. # noqa: E501 + :rtype: str + """ + return self._instrument_id + + @instrument_id.setter + def instrument_id(self, instrument_id): + """Sets the instrument_id of this ReferenceInstrument. + + The Identifier code # noqa: E501 + + :param instrument_id: The instrument_id of this ReferenceInstrument. # noqa: E501 + :type instrument_id: str + """ + if self.local_vars_configuration.client_side_validation and instrument_id is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_id`, must not be `None`") # noqa: E501 + + self._instrument_id = instrument_id + + @property + def instrument_id_type(self): + """Gets the instrument_id_type of this ReferenceInstrument. # noqa: E501 + + the type of the instrument id e.g. LusidInstrument Id # noqa: E501 + + :return: The instrument_id_type of this ReferenceInstrument. # noqa: E501 + :rtype: str + """ + return self._instrument_id_type + + @instrument_id_type.setter + def instrument_id_type(self, instrument_id_type): + """Sets the instrument_id_type of this ReferenceInstrument. + + the type of the instrument id e.g. LusidInstrument Id # noqa: E501 + + :param instrument_id_type: The instrument_id_type of this ReferenceInstrument. # noqa: E501 + :type instrument_id_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_id_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_id_type`, must not be `None`") # noqa: E501 + + self._instrument_id_type = instrument_id_type + + @property + def scope(self): + """Gets the scope of this ReferenceInstrument. # noqa: E501 + + (optional) Scope for the instrument # noqa: E501 + + :return: The scope of this ReferenceInstrument. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this ReferenceInstrument. + + (optional) Scope for the instrument # noqa: E501 + + :param scope: The scope of this ReferenceInstrument. # noqa: E501 + :type scope: str + """ + if self.local_vars_configuration.client_side_validation and scope is None: # noqa: E501 + raise ValueError("Invalid value for `scope`, must not be `None`") # noqa: E501 + + self._scope = scope + + @property + def instrument_type(self): + """Gets the instrument_type of this ReferenceInstrument. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ReferenceInstrument. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ReferenceInstrument. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ReferenceInstrument. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReferenceInstrument): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReferenceInstrument): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/reference_instrument_all_of.py b/sdk/lusid/models/reference_instrument_all_of.py new file mode 100644 index 00000000000..20cf9b7592c --- /dev/null +++ b/sdk/lusid/models/reference_instrument_all_of.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ReferenceInstrumentAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instrument_id': 'str', + 'instrument_id_type': 'str', + 'scope': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'instrument_id': 'instrumentId', + 'instrument_id_type': 'instrumentIdType', + 'scope': 'scope', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'instrument_id': 'required', + 'instrument_id_type': 'required', + 'scope': 'required', + 'instrument_type': 'required' + } + + def __init__(self, instrument_id=None, instrument_id_type=None, scope=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """ReferenceInstrumentAllOf - a model defined in OpenAPI" + + :param instrument_id: The Identifier code (required) + :type instrument_id: str + :param instrument_id_type: the type of the instrument id e.g. LusidInstrument Id (required) + :type instrument_id_type: str + :param scope: (optional) Scope for the instrument (required) + :type scope: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instrument_id = None + self._instrument_id_type = None + self._scope = None + self._instrument_type = None + self.discriminator = None + + self.instrument_id = instrument_id + self.instrument_id_type = instrument_id_type + self.scope = scope + self.instrument_type = instrument_type + + @property + def instrument_id(self): + """Gets the instrument_id of this ReferenceInstrumentAllOf. # noqa: E501 + + The Identifier code # noqa: E501 + + :return: The instrument_id of this ReferenceInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_id + + @instrument_id.setter + def instrument_id(self, instrument_id): + """Sets the instrument_id of this ReferenceInstrumentAllOf. + + The Identifier code # noqa: E501 + + :param instrument_id: The instrument_id of this ReferenceInstrumentAllOf. # noqa: E501 + :type instrument_id: str + """ + if self.local_vars_configuration.client_side_validation and instrument_id is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_id`, must not be `None`") # noqa: E501 + + self._instrument_id = instrument_id + + @property + def instrument_id_type(self): + """Gets the instrument_id_type of this ReferenceInstrumentAllOf. # noqa: E501 + + the type of the instrument id e.g. LusidInstrument Id # noqa: E501 + + :return: The instrument_id_type of this ReferenceInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_id_type + + @instrument_id_type.setter + def instrument_id_type(self, instrument_id_type): + """Sets the instrument_id_type of this ReferenceInstrumentAllOf. + + the type of the instrument id e.g. LusidInstrument Id # noqa: E501 + + :param instrument_id_type: The instrument_id_type of this ReferenceInstrumentAllOf. # noqa: E501 + :type instrument_id_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_id_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_id_type`, must not be `None`") # noqa: E501 + + self._instrument_id_type = instrument_id_type + + @property + def scope(self): + """Gets the scope of this ReferenceInstrumentAllOf. # noqa: E501 + + (optional) Scope for the instrument # noqa: E501 + + :return: The scope of this ReferenceInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this ReferenceInstrumentAllOf. + + (optional) Scope for the instrument # noqa: E501 + + :param scope: The scope of this ReferenceInstrumentAllOf. # noqa: E501 + :type scope: str + """ + if self.local_vars_configuration.client_side_validation and scope is None: # noqa: E501 + raise ValueError("Invalid value for `scope`, must not be `None`") # noqa: E501 + + self._scope = scope + + @property + def instrument_type(self): + """Gets the instrument_type of this ReferenceInstrumentAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this ReferenceInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this ReferenceInstrumentAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this ReferenceInstrumentAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReferenceInstrumentAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReferenceInstrumentAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/repo.py b/sdk/lusid/models/repo.py new file mode 100644 index 00000000000..9920117d915 --- /dev/null +++ b/sdk/lusid/models/repo.py @@ -0,0 +1,490 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Repo(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'accrual_basis': 'str', + 'collateral': 'list[LusidInstrument]', + 'collateral_value': 'float', + 'haircut': 'float', + 'margin': 'float', + 'purchase_price': 'float', + 'repo_rate': 'float', + 'repurchase_price': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'accrual_basis': 'accrualBasis', + 'collateral': 'collateral', + 'collateral_value': 'collateralValue', + 'haircut': 'haircut', + 'margin': 'margin', + 'purchase_price': 'purchasePrice', + 'repo_rate': 'repoRate', + 'repurchase_price': 'repurchasePrice', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_ccy': 'required', + 'accrual_basis': 'required', + 'collateral': 'optional', + 'collateral_value': 'optional', + 'haircut': 'optional', + 'margin': 'optional', + 'purchase_price': 'optional', + 'repo_rate': 'optional', + 'repurchase_price': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_ccy=None, accrual_basis=None, collateral=None, collateral_value=None, haircut=None, margin=None, purchase_price=None, repo_rate=None, repurchase_price=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """Repo - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param accrual_basis: For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. (required) + :type accrual_basis: str + :param collateral: The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. + :type collateral: list[lusid.LusidInstrument] + :param collateral_value: The full market value of the collateral in domestic currency, before any margin or haircut is applied. + :type collateral_value: float + :param haircut: The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. + :type haircut: float + :param margin: The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. + :type margin: float + :param purchase_price: The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. + :type purchase_price: float + :param repo_rate: the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. + :type repo_rate: float + :param repurchase_price: The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. + :type repurchase_price: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_ccy = None + self._accrual_basis = None + self._collateral = None + self._collateral_value = None + self._haircut = None + self._margin = None + self._purchase_price = None + self._repo_rate = None + self._repurchase_price = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.accrual_basis = accrual_basis + self.collateral = collateral + self.collateral_value = collateral_value + self.haircut = haircut + self.margin = margin + self.purchase_price = purchase_price + self.repo_rate = repo_rate + self.repurchase_price = repurchase_price + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this Repo. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this Repo. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this Repo. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this Repo. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this Repo. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this Repo. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this Repo. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this Repo. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this Repo. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this Repo. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this Repo. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this Repo. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def accrual_basis(self): + """Gets the accrual_basis of this Repo. # noqa: E501 + + For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :return: The accrual_basis of this Repo. # noqa: E501 + :rtype: str + """ + return self._accrual_basis + + @accrual_basis.setter + def accrual_basis(self, accrual_basis): + """Sets the accrual_basis of this Repo. + + For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :param accrual_basis: The accrual_basis of this Repo. # noqa: E501 + :type accrual_basis: str + """ + if self.local_vars_configuration.client_side_validation and accrual_basis is None: # noqa: E501 + raise ValueError("Invalid value for `accrual_basis`, must not be `None`") # noqa: E501 + + self._accrual_basis = accrual_basis + + @property + def collateral(self): + """Gets the collateral of this Repo. # noqa: E501 + + The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. # noqa: E501 + + :return: The collateral of this Repo. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._collateral + + @collateral.setter + def collateral(self, collateral): + """Sets the collateral of this Repo. + + The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. # noqa: E501 + + :param collateral: The collateral of this Repo. # noqa: E501 + :type collateral: list[lusid.LusidInstrument] + """ + + self._collateral = collateral + + @property + def collateral_value(self): + """Gets the collateral_value of this Repo. # noqa: E501 + + The full market value of the collateral in domestic currency, before any margin or haircut is applied. # noqa: E501 + + :return: The collateral_value of this Repo. # noqa: E501 + :rtype: float + """ + return self._collateral_value + + @collateral_value.setter + def collateral_value(self, collateral_value): + """Sets the collateral_value of this Repo. + + The full market value of the collateral in domestic currency, before any margin or haircut is applied. # noqa: E501 + + :param collateral_value: The collateral_value of this Repo. # noqa: E501 + :type collateral_value: float + """ + + self._collateral_value = collateral_value + + @property + def haircut(self): + """Gets the haircut of this Repo. # noqa: E501 + + The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :return: The haircut of this Repo. # noqa: E501 + :rtype: float + """ + return self._haircut + + @haircut.setter + def haircut(self, haircut): + """Sets the haircut of this Repo. + + The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :param haircut: The haircut of this Repo. # noqa: E501 + :type haircut: float + """ + + self._haircut = haircut + + @property + def margin(self): + """Gets the margin of this Repo. # noqa: E501 + + The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :return: The margin of this Repo. # noqa: E501 + :rtype: float + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this Repo. + + The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :param margin: The margin of this Repo. # noqa: E501 + :type margin: float + """ + + self._margin = margin + + @property + def purchase_price(self): + """Gets the purchase_price of this Repo. # noqa: E501 + + The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :return: The purchase_price of this Repo. # noqa: E501 + :rtype: float + """ + return self._purchase_price + + @purchase_price.setter + def purchase_price(self, purchase_price): + """Sets the purchase_price of this Repo. + + The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :param purchase_price: The purchase_price of this Repo. # noqa: E501 + :type purchase_price: float + """ + + self._purchase_price = purchase_price + + @property + def repo_rate(self): + """Gets the repo_rate of this Repo. # noqa: E501 + + the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :return: The repo_rate of this Repo. # noqa: E501 + :rtype: float + """ + return self._repo_rate + + @repo_rate.setter + def repo_rate(self, repo_rate): + """Sets the repo_rate of this Repo. + + the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :param repo_rate: The repo_rate of this Repo. # noqa: E501 + :type repo_rate: float + """ + + self._repo_rate = repo_rate + + @property + def repurchase_price(self): + """Gets the repurchase_price of this Repo. # noqa: E501 + + The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :return: The repurchase_price of this Repo. # noqa: E501 + :rtype: float + """ + return self._repurchase_price + + @repurchase_price.setter + def repurchase_price(self, repurchase_price): + """Sets the repurchase_price of this Repo. + + The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :param repurchase_price: The repurchase_price of this Repo. # noqa: E501 + :type repurchase_price: float + """ + + self._repurchase_price = repurchase_price + + @property + def instrument_type(self): + """Gets the instrument_type of this Repo. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this Repo. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this Repo. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this Repo. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Repo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Repo): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/repo_all_of.py b/sdk/lusid/models/repo_all_of.py new file mode 100644 index 00000000000..cf93f5b3005 --- /dev/null +++ b/sdk/lusid/models/repo_all_of.py @@ -0,0 +1,490 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class RepoAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'accrual_basis': 'str', + 'collateral': 'list[LusidInstrument]', + 'collateral_value': 'float', + 'haircut': 'float', + 'margin': 'float', + 'purchase_price': 'float', + 'repo_rate': 'float', + 'repurchase_price': 'float', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'accrual_basis': 'accrualBasis', + 'collateral': 'collateral', + 'collateral_value': 'collateralValue', + 'haircut': 'haircut', + 'margin': 'margin', + 'purchase_price': 'purchasePrice', + 'repo_rate': 'repoRate', + 'repurchase_price': 'repurchasePrice', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'dom_ccy': 'required', + 'accrual_basis': 'required', + 'collateral': 'optional', + 'collateral_value': 'optional', + 'haircut': 'optional', + 'margin': 'optional', + 'purchase_price': 'optional', + 'repo_rate': 'optional', + 'repurchase_price': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, dom_ccy=None, accrual_basis=None, collateral=None, collateral_value=None, haircut=None, margin=None, purchase_price=None, repo_rate=None, repurchase_price=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """RepoAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param dom_ccy: The domestic currency of the instrument. (required) + :type dom_ccy: str + :param accrual_basis: For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. (required) + :type accrual_basis: str + :param collateral: The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. + :type collateral: list[lusid.LusidInstrument] + :param collateral_value: The full market value of the collateral in domestic currency, before any margin or haircut is applied. + :type collateral_value: float + :param haircut: The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. + :type haircut: float + :param margin: The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. + :type margin: float + :param purchase_price: The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. + :type purchase_price: float + :param repo_rate: the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. + :type repo_rate: float + :param repurchase_price: The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. + :type repurchase_price: float + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._dom_ccy = None + self._accrual_basis = None + self._collateral = None + self._collateral_value = None + self._haircut = None + self._margin = None + self._purchase_price = None + self._repo_rate = None + self._repurchase_price = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.accrual_basis = accrual_basis + self.collateral = collateral + self.collateral_value = collateral_value + self.haircut = haircut + self.margin = margin + self.purchase_price = purchase_price + self.repo_rate = repo_rate + self.repurchase_price = repurchase_price + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this RepoAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this RepoAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this RepoAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this RepoAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this RepoAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this RepoAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this RepoAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this RepoAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this RepoAllOf. # noqa: E501 + + The domestic currency of the instrument. # noqa: E501 + + :return: The dom_ccy of this RepoAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this RepoAllOf. + + The domestic currency of the instrument. # noqa: E501 + + :param dom_ccy: The dom_ccy of this RepoAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def accrual_basis(self): + """Gets the accrual_basis of this RepoAllOf. # noqa: E501 + + For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :return: The accrual_basis of this RepoAllOf. # noqa: E501 + :rtype: str + """ + return self._accrual_basis + + @accrual_basis.setter + def accrual_basis(self, accrual_basis): + """Sets the accrual_basis of this RepoAllOf. + + For calculation of interest, the accrual basis to be used. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) 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]. # noqa: E501 + + :param accrual_basis: The accrual_basis of this RepoAllOf. # noqa: E501 + :type accrual_basis: str + """ + if self.local_vars_configuration.client_side_validation and accrual_basis is None: # noqa: E501 + raise ValueError("Invalid value for `accrual_basis`, must not be `None`") # noqa: E501 + + self._accrual_basis = accrual_basis + + @property + def collateral(self): + """Gets the collateral of this RepoAllOf. # noqa: E501 + + The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. # noqa: E501 + + :return: The collateral of this RepoAllOf. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._collateral + + @collateral.setter + def collateral(self, collateral): + """Sets the collateral of this RepoAllOf. + + The actual collateral in the Repo. This property is for informational purposes only, Lusid pricing is not affected. # noqa: E501 + + :param collateral: The collateral of this RepoAllOf. # noqa: E501 + :type collateral: list[lusid.LusidInstrument] + """ + + self._collateral = collateral + + @property + def collateral_value(self): + """Gets the collateral_value of this RepoAllOf. # noqa: E501 + + The full market value of the collateral in domestic currency, before any margin or haircut is applied. # noqa: E501 + + :return: The collateral_value of this RepoAllOf. # noqa: E501 + :rtype: float + """ + return self._collateral_value + + @collateral_value.setter + def collateral_value(self, collateral_value): + """Sets the collateral_value of this RepoAllOf. + + The full market value of the collateral in domestic currency, before any margin or haircut is applied. # noqa: E501 + + :param collateral_value: The collateral_value of this RepoAllOf. # noqa: E501 + :type collateral_value: float + """ + + self._collateral_value = collateral_value + + @property + def haircut(self): + """Gets the haircut of this RepoAllOf. # noqa: E501 + + The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :return: The haircut of this RepoAllOf. # noqa: E501 + :rtype: float + """ + return self._haircut + + @haircut.setter + def haircut(self, haircut): + """Sets the haircut of this RepoAllOf. + + The haircut (or margin percentage) applied to the collateral, this should be a number between 0 and 1, i.e. for a 5% haircut this should be 0.05. This is defined as (CollateralValue - PurchasePrice) / CollateralValue. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :param haircut: The haircut of this RepoAllOf. # noqa: E501 + :type haircut: float + """ + + self._haircut = haircut + + @property + def margin(self): + """Gets the margin of this RepoAllOf. # noqa: E501 + + The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :return: The margin of this RepoAllOf. # noqa: E501 + :rtype: float + """ + return self._margin + + @margin.setter + def margin(self, margin): + """Sets the margin of this RepoAllOf. + + The initial margin (or margin ratio) applied to the collateral, this should be a number greater than or equal to 1.0, i.e. for a 102% margin this should be 1.02. A value of 1.0 means no margin (100%). This is defined as CollateralValue / PurchasePrice. If this property is specified, so too must CollateralValue. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :param margin: The margin of this RepoAllOf. # noqa: E501 + :type margin: float + """ + + self._margin = margin + + @property + def purchase_price(self): + """Gets the purchase_price of this RepoAllOf. # noqa: E501 + + The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :return: The purchase_price of this RepoAllOf. # noqa: E501 + :rtype: float + """ + return self._purchase_price + + @purchase_price.setter + def purchase_price(self, purchase_price): + """Sets the purchase_price of this RepoAllOf. + + The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified. # noqa: E501 + + :param purchase_price: The purchase_price of this RepoAllOf. # noqa: E501 + :type purchase_price: float + """ + + self._purchase_price = purchase_price + + @property + def repo_rate(self): + """Gets the repo_rate of this RepoAllOf. # noqa: E501 + + the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :return: The repo_rate of this RepoAllOf. # noqa: E501 + :rtype: float + """ + return self._repo_rate + + @repo_rate.setter + def repo_rate(self, repo_rate): + """Sets the repo_rate of this RepoAllOf. + + the rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :param repo_rate: The repo_rate of this RepoAllOf. # noqa: E501 + :type repo_rate: float + """ + + self._repo_rate = repo_rate + + @property + def repurchase_price(self): + """Gets the repurchase_price of this RepoAllOf. # noqa: E501 + + The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :return: The repurchase_price of this RepoAllOf. # noqa: E501 + :rtype: float + """ + return self._repurchase_price + + @repurchase_price.setter + def repurchase_price(self, repurchase_price): + """Sets the repurchase_price of this RepoAllOf. + + The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified. # noqa: E501 + + :param repurchase_price: The repurchase_price of this RepoAllOf. # noqa: E501 + :type repurchase_price: float + """ + + self._repurchase_price = repurchase_price + + @property + def instrument_type(self): + """Gets the instrument_type of this RepoAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this RepoAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this RepoAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this RepoAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepoAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/result_data_key_rule.py b/sdk/lusid/models/result_data_key_rule.py new file mode 100644 index 00000000000..8456e54b07e --- /dev/null +++ b/sdk/lusid/models/result_data_key_rule.py @@ -0,0 +1,403 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ResultDataKeyRule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'supplier': 'str', + 'data_scope': 'str', + 'document_code': 'str', + 'quote_interval': 'str', + 'as_at': 'datetime', + 'resource_key': 'str', + 'document_result_type': 'str', + 'result_key_rule_type': 'str' + } + + attribute_map = { + 'supplier': 'supplier', + 'data_scope': 'dataScope', + 'document_code': 'documentCode', + 'quote_interval': 'quoteInterval', + 'as_at': 'asAt', + 'resource_key': 'resourceKey', + 'document_result_type': 'documentResultType', + 'result_key_rule_type': 'resultKeyRuleType' + } + + required_map = { + 'supplier': 'required', + 'data_scope': 'required', + 'document_code': 'required', + 'quote_interval': 'optional', + 'as_at': 'optional', + 'resource_key': 'required', + 'document_result_type': 'required', + 'result_key_rule_type': 'required' + } + + def __init__(self, supplier=None, data_scope=None, document_code=None, quote_interval=None, as_at=None, resource_key=None, document_result_type=None, result_key_rule_type=None, local_vars_configuration=None): # noqa: E501 + """ResultDataKeyRule - a model defined in OpenAPI" + + :param supplier: the result resource supplier (where the data comes from) (required) + :type supplier: str + :param data_scope: which is the scope in which the data should be found (required) + :type data_scope: str + :param document_code: document code that defines which document is desired (required) + :type document_code: str + :param quote_interval: Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). + :type quote_interval: str + :param as_at: The AsAt predicate specification. + :type as_at: datetime + :param resource_key: The result data key that identifies the address pattern that this is a rule for (required) + :type resource_key: str + :param document_result_type: (required) + :type document_result_type: str + :param result_key_rule_type: The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule (required) + :type result_key_rule_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._supplier = None + self._data_scope = None + self._document_code = None + self._quote_interval = None + self._as_at = None + self._resource_key = None + self._document_result_type = None + self._result_key_rule_type = None + self.discriminator = None + + self.supplier = supplier + self.data_scope = data_scope + self.document_code = document_code + self.quote_interval = quote_interval + self.as_at = as_at + self.resource_key = resource_key + self.document_result_type = document_result_type + self.result_key_rule_type = result_key_rule_type + + @property + def supplier(self): + """Gets the supplier of this ResultDataKeyRule. # noqa: E501 + + the result resource supplier (where the data comes from) # noqa: E501 + + :return: The supplier of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._supplier + + @supplier.setter + def supplier(self, supplier): + """Sets the supplier of this ResultDataKeyRule. + + the result resource supplier (where the data comes from) # noqa: E501 + + :param supplier: The supplier of this ResultDataKeyRule. # noqa: E501 + :type supplier: str + """ + if self.local_vars_configuration.client_side_validation and supplier is None: # noqa: E501 + raise ValueError("Invalid value for `supplier`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) > 32): + raise ValueError("Invalid value for `supplier`, length must be less than or equal to `32`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) < 0): + raise ValueError("Invalid value for `supplier`, length must be greater than or equal to `0`") # noqa: E501 + + self._supplier = supplier + + @property + def data_scope(self): + """Gets the data_scope of this ResultDataKeyRule. # noqa: E501 + + which is the scope in which the data should be found # noqa: E501 + + :return: The data_scope of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._data_scope + + @data_scope.setter + def data_scope(self, data_scope): + """Sets the data_scope of this ResultDataKeyRule. + + which is the scope in which the data should be found # noqa: E501 + + :param data_scope: The data_scope of this ResultDataKeyRule. # noqa: E501 + :type data_scope: str + """ + if self.local_vars_configuration.client_side_validation and data_scope is None: # noqa: E501 + raise ValueError("Invalid value for `data_scope`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) > 256): + raise ValueError("Invalid value for `data_scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) < 1): + raise ValueError("Invalid value for `data_scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', data_scope)): # noqa: E501 + raise ValueError(r"Invalid value for `data_scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._data_scope = data_scope + + @property + def document_code(self): + """Gets the document_code of this ResultDataKeyRule. # noqa: E501 + + document code that defines which document is desired # noqa: E501 + + :return: The document_code of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._document_code + + @document_code.setter + def document_code(self, document_code): + """Sets the document_code of this ResultDataKeyRule. + + document code that defines which document is desired # noqa: E501 + + :param document_code: The document_code of this ResultDataKeyRule. # noqa: E501 + :type document_code: str + """ + if self.local_vars_configuration.client_side_validation and document_code is None: # noqa: E501 + raise ValueError("Invalid value for `document_code`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) > 256): + raise ValueError("Invalid value for `document_code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) < 1): + raise ValueError("Invalid value for `document_code`, length must be greater than or equal to `1`") # noqa: E501 + + self._document_code = document_code + + @property + def quote_interval(self): + """Gets the quote_interval of this ResultDataKeyRule. # noqa: E501 + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :return: The quote_interval of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._quote_interval + + @quote_interval.setter + def quote_interval(self, quote_interval): + """Sets the quote_interval of this ResultDataKeyRule. + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :param quote_interval: The quote_interval of this ResultDataKeyRule. # noqa: E501 + :type quote_interval: str + """ + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) > 16): + raise ValueError("Invalid value for `quote_interval`, length must be less than or equal to `16`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) < 0): + raise ValueError("Invalid value for `quote_interval`, length must be greater than or equal to `0`") # noqa: E501 + + self._quote_interval = quote_interval + + @property + def as_at(self): + """Gets the as_at of this ResultDataKeyRule. # noqa: E501 + + The AsAt predicate specification. # noqa: E501 + + :return: The as_at of this ResultDataKeyRule. # noqa: E501 + :rtype: datetime + """ + return self._as_at + + @as_at.setter + def as_at(self, as_at): + """Sets the as_at of this ResultDataKeyRule. + + The AsAt predicate specification. # noqa: E501 + + :param as_at: The as_at of this ResultDataKeyRule. # noqa: E501 + :type as_at: datetime + """ + + self._as_at = as_at + + @property + def resource_key(self): + """Gets the resource_key of this ResultDataKeyRule. # noqa: E501 + + The result data key that identifies the address pattern that this is a rule for # noqa: E501 + + :return: The resource_key of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._resource_key + + @resource_key.setter + def resource_key(self, resource_key): + """Sets the resource_key of this ResultDataKeyRule. + + The result data key that identifies the address pattern that this is a rule for # noqa: E501 + + :param resource_key: The resource_key of this ResultDataKeyRule. # noqa: E501 + :type resource_key: str + """ + if self.local_vars_configuration.client_side_validation and resource_key is None: # noqa: E501 + raise ValueError("Invalid value for `resource_key`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + resource_key is not None and len(resource_key) > 256): + raise ValueError("Invalid value for `resource_key`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + resource_key is not None and len(resource_key) < 0): + raise ValueError("Invalid value for `resource_key`, length must be greater than or equal to `0`") # noqa: E501 + + self._resource_key = resource_key + + @property + def document_result_type(self): + """Gets the document_result_type of this ResultDataKeyRule. # noqa: E501 + + + :return: The document_result_type of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._document_result_type + + @document_result_type.setter + def document_result_type(self, document_result_type): + """Sets the document_result_type of this ResultDataKeyRule. + + + :param document_result_type: The document_result_type of this ResultDataKeyRule. # noqa: E501 + :type document_result_type: str + """ + if self.local_vars_configuration.client_side_validation and document_result_type is None: # noqa: E501 + raise ValueError("Invalid value for `document_result_type`, must not be `None`") # noqa: E501 + + self._document_result_type = document_result_type + + @property + def result_key_rule_type(self): + """Gets the result_key_rule_type of this ResultDataKeyRule. # noqa: E501 + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :return: The result_key_rule_type of this ResultDataKeyRule. # noqa: E501 + :rtype: str + """ + return self._result_key_rule_type + + @result_key_rule_type.setter + def result_key_rule_type(self, result_key_rule_type): + """Sets the result_key_rule_type of this ResultDataKeyRule. + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :param result_key_rule_type: The result_key_rule_type of this ResultDataKeyRule. # noqa: E501 + :type result_key_rule_type: str + """ + if self.local_vars_configuration.client_side_validation and result_key_rule_type is None: # noqa: E501 + raise ValueError("Invalid value for `result_key_rule_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "ResultDataKeyRule", "PortfolioResultDataKeyRule"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and result_key_rule_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `result_key_rule_type` ({0}), must be one of {1}" # noqa: E501 + .format(result_key_rule_type, allowed_values) + ) + + self._result_key_rule_type = result_key_rule_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResultDataKeyRule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ResultDataKeyRule): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/result_data_key_rule_all_of.py b/sdk/lusid/models/result_data_key_rule_all_of.py new file mode 100644 index 00000000000..91568a5db1c --- /dev/null +++ b/sdk/lusid/models/result_data_key_rule_all_of.py @@ -0,0 +1,403 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class ResultDataKeyRuleAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'supplier': 'str', + 'data_scope': 'str', + 'document_code': 'str', + 'quote_interval': 'str', + 'as_at': 'datetime', + 'resource_key': 'str', + 'document_result_type': 'str', + 'result_key_rule_type': 'str' + } + + attribute_map = { + 'supplier': 'supplier', + 'data_scope': 'dataScope', + 'document_code': 'documentCode', + 'quote_interval': 'quoteInterval', + 'as_at': 'asAt', + 'resource_key': 'resourceKey', + 'document_result_type': 'documentResultType', + 'result_key_rule_type': 'resultKeyRuleType' + } + + required_map = { + 'supplier': 'required', + 'data_scope': 'required', + 'document_code': 'required', + 'quote_interval': 'optional', + 'as_at': 'optional', + 'resource_key': 'required', + 'document_result_type': 'required', + 'result_key_rule_type': 'required' + } + + def __init__(self, supplier=None, data_scope=None, document_code=None, quote_interval=None, as_at=None, resource_key=None, document_result_type=None, result_key_rule_type=None, local_vars_configuration=None): # noqa: E501 + """ResultDataKeyRuleAllOf - a model defined in OpenAPI" + + :param supplier: the result resource supplier (where the data comes from) (required) + :type supplier: str + :param data_scope: which is the scope in which the data should be found (required) + :type data_scope: str + :param document_code: document code that defines which document is desired (required) + :type document_code: str + :param quote_interval: Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). + :type quote_interval: str + :param as_at: The AsAt predicate specification. + :type as_at: datetime + :param resource_key: The result data key that identifies the address pattern that this is a rule for (required) + :type resource_key: str + :param document_result_type: (required) + :type document_result_type: str + :param result_key_rule_type: The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule (required) + :type result_key_rule_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._supplier = None + self._data_scope = None + self._document_code = None + self._quote_interval = None + self._as_at = None + self._resource_key = None + self._document_result_type = None + self._result_key_rule_type = None + self.discriminator = None + + self.supplier = supplier + self.data_scope = data_scope + self.document_code = document_code + self.quote_interval = quote_interval + self.as_at = as_at + self.resource_key = resource_key + self.document_result_type = document_result_type + self.result_key_rule_type = result_key_rule_type + + @property + def supplier(self): + """Gets the supplier of this ResultDataKeyRuleAllOf. # noqa: E501 + + the result resource supplier (where the data comes from) # noqa: E501 + + :return: The supplier of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._supplier + + @supplier.setter + def supplier(self, supplier): + """Sets the supplier of this ResultDataKeyRuleAllOf. + + the result resource supplier (where the data comes from) # noqa: E501 + + :param supplier: The supplier of this ResultDataKeyRuleAllOf. # noqa: E501 + :type supplier: str + """ + if self.local_vars_configuration.client_side_validation and supplier is None: # noqa: E501 + raise ValueError("Invalid value for `supplier`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) > 32): + raise ValueError("Invalid value for `supplier`, length must be less than or equal to `32`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + supplier is not None and len(supplier) < 0): + raise ValueError("Invalid value for `supplier`, length must be greater than or equal to `0`") # noqa: E501 + + self._supplier = supplier + + @property + def data_scope(self): + """Gets the data_scope of this ResultDataKeyRuleAllOf. # noqa: E501 + + which is the scope in which the data should be found # noqa: E501 + + :return: The data_scope of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._data_scope + + @data_scope.setter + def data_scope(self, data_scope): + """Sets the data_scope of this ResultDataKeyRuleAllOf. + + which is the scope in which the data should be found # noqa: E501 + + :param data_scope: The data_scope of this ResultDataKeyRuleAllOf. # noqa: E501 + :type data_scope: str + """ + if self.local_vars_configuration.client_side_validation and data_scope is None: # noqa: E501 + raise ValueError("Invalid value for `data_scope`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) > 256): + raise ValueError("Invalid value for `data_scope`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and len(data_scope) < 1): + raise ValueError("Invalid value for `data_scope`, length must be greater than or equal to `1`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + data_scope is not None and not re.search(r'^[a-zA-Z0-9\-_]+$', data_scope)): # noqa: E501 + raise ValueError(r"Invalid value for `data_scope`, must be a follow pattern or equal to `/^[a-zA-Z0-9\-_]+$/`") # noqa: E501 + + self._data_scope = data_scope + + @property + def document_code(self): + """Gets the document_code of this ResultDataKeyRuleAllOf. # noqa: E501 + + document code that defines which document is desired # noqa: E501 + + :return: The document_code of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._document_code + + @document_code.setter + def document_code(self, document_code): + """Sets the document_code of this ResultDataKeyRuleAllOf. + + document code that defines which document is desired # noqa: E501 + + :param document_code: The document_code of this ResultDataKeyRuleAllOf. # noqa: E501 + :type document_code: str + """ + if self.local_vars_configuration.client_side_validation and document_code is None: # noqa: E501 + raise ValueError("Invalid value for `document_code`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) > 256): + raise ValueError("Invalid value for `document_code`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + document_code is not None and len(document_code) < 1): + raise ValueError("Invalid value for `document_code`, length must be greater than or equal to `1`") # noqa: E501 + + self._document_code = document_code + + @property + def quote_interval(self): + """Gets the quote_interval of this ResultDataKeyRuleAllOf. # noqa: E501 + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :return: The quote_interval of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._quote_interval + + @quote_interval.setter + def quote_interval(self, quote_interval): + """Sets the quote_interval of this ResultDataKeyRuleAllOf. + + Shorthand for the time interval used to select result data. This must be a dot-separated string specifying a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). # noqa: E501 + + :param quote_interval: The quote_interval of this ResultDataKeyRuleAllOf. # noqa: E501 + :type quote_interval: str + """ + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) > 16): + raise ValueError("Invalid value for `quote_interval`, length must be less than or equal to `16`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + quote_interval is not None and len(quote_interval) < 0): + raise ValueError("Invalid value for `quote_interval`, length must be greater than or equal to `0`") # noqa: E501 + + self._quote_interval = quote_interval + + @property + def as_at(self): + """Gets the as_at of this ResultDataKeyRuleAllOf. # noqa: E501 + + The AsAt predicate specification. # noqa: E501 + + :return: The as_at of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: datetime + """ + return self._as_at + + @as_at.setter + def as_at(self, as_at): + """Sets the as_at of this ResultDataKeyRuleAllOf. + + The AsAt predicate specification. # noqa: E501 + + :param as_at: The as_at of this ResultDataKeyRuleAllOf. # noqa: E501 + :type as_at: datetime + """ + + self._as_at = as_at + + @property + def resource_key(self): + """Gets the resource_key of this ResultDataKeyRuleAllOf. # noqa: E501 + + The result data key that identifies the address pattern that this is a rule for # noqa: E501 + + :return: The resource_key of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._resource_key + + @resource_key.setter + def resource_key(self, resource_key): + """Sets the resource_key of this ResultDataKeyRuleAllOf. + + The result data key that identifies the address pattern that this is a rule for # noqa: E501 + + :param resource_key: The resource_key of this ResultDataKeyRuleAllOf. # noqa: E501 + :type resource_key: str + """ + if self.local_vars_configuration.client_side_validation and resource_key is None: # noqa: E501 + raise ValueError("Invalid value for `resource_key`, must not be `None`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + resource_key is not None and len(resource_key) > 256): + raise ValueError("Invalid value for `resource_key`, length must be less than or equal to `256`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + resource_key is not None and len(resource_key) < 0): + raise ValueError("Invalid value for `resource_key`, length must be greater than or equal to `0`") # noqa: E501 + + self._resource_key = resource_key + + @property + def document_result_type(self): + """Gets the document_result_type of this ResultDataKeyRuleAllOf. # noqa: E501 + + + :return: The document_result_type of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._document_result_type + + @document_result_type.setter + def document_result_type(self, document_result_type): + """Sets the document_result_type of this ResultDataKeyRuleAllOf. + + + :param document_result_type: The document_result_type of this ResultDataKeyRuleAllOf. # noqa: E501 + :type document_result_type: str + """ + if self.local_vars_configuration.client_side_validation and document_result_type is None: # noqa: E501 + raise ValueError("Invalid value for `document_result_type`, must not be `None`") # noqa: E501 + + self._document_result_type = document_result_type + + @property + def result_key_rule_type(self): + """Gets the result_key_rule_type of this ResultDataKeyRuleAllOf. # noqa: E501 + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :return: The result_key_rule_type of this ResultDataKeyRuleAllOf. # noqa: E501 + :rtype: str + """ + return self._result_key_rule_type + + @result_key_rule_type.setter + def result_key_rule_type(self, result_key_rule_type): + """Sets the result_key_rule_type of this ResultDataKeyRuleAllOf. + + The available values are: Invalid, ResultDataKeyRule, PortfolioResultDataKeyRule # noqa: E501 + + :param result_key_rule_type: The result_key_rule_type of this ResultDataKeyRuleAllOf. # noqa: E501 + :type result_key_rule_type: str + """ + if self.local_vars_configuration.client_side_validation and result_key_rule_type is None: # noqa: E501 + raise ValueError("Invalid value for `result_key_rule_type`, must not be `None`") # noqa: E501 + allowed_values = ["Invalid", "ResultDataKeyRule", "PortfolioResultDataKeyRule"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and result_key_rule_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `result_key_rule_type` ({0}), must be one of {1}" # noqa: E501 + .format(result_key_rule_type, allowed_values) + ) + + self._result_key_rule_type = result_key_rule_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResultDataKeyRuleAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ResultDataKeyRuleAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/result_key_rule.py b/sdk/lusid/models/result_key_rule.py index 117e7a4f3ff..24955834166 100644 --- a/sdk/lusid/models/result_key_rule.py +++ b/sdk/lusid/models/result_key_rule.py @@ -51,6 +51,8 @@ class ResultKeyRule(object): } discriminator_value_class_map = { + 'ResultDataKeyRule': 'ResultDataKeyRule', + 'PortfolioResultDataKeyRule': 'PortfolioResultDataKeyRule' } def __init__(self, result_key_rule_type=None, local_vars_configuration=None): # noqa: E501 diff --git a/sdk/lusid/models/schedule.py b/sdk/lusid/models/schedule.py new file mode 100644 index 00000000000..294dc3a5b75 --- /dev/null +++ b/sdk/lusid/models/schedule.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Schedule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'schedule_type': 'str' + } + + attribute_map = { + 'schedule_type': 'scheduleType' + } + + required_map = { + 'schedule_type': 'required' + } + + discriminator_value_class_map = { + } + + def __init__(self, schedule_type=None, local_vars_configuration=None): # noqa: E501 + """Schedule - a model defined in OpenAPI" + + :param schedule_type: The available values are: Fixed, Float, Optionality, Step, Exercise, Invalid (required) + :type schedule_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._schedule_type = None + self.discriminator = 'schedule_type' + + self.schedule_type = schedule_type + + @property + def schedule_type(self): + """Gets the schedule_type of this Schedule. # noqa: E501 + + The available values are: Fixed, Float, Optionality, Step, Exercise, Invalid # noqa: E501 + + :return: The schedule_type of this Schedule. # noqa: E501 + :rtype: str + """ + return self._schedule_type + + @schedule_type.setter + def schedule_type(self, schedule_type): + """Sets the schedule_type of this Schedule. + + The available values are: Fixed, Float, Optionality, Step, Exercise, Invalid # noqa: E501 + + :param schedule_type: The schedule_type of this Schedule. # noqa: E501 + :type schedule_type: str + """ + if self.local_vars_configuration.client_side_validation and schedule_type is None: # noqa: E501 + raise ValueError("Invalid value for `schedule_type`, must not be `None`") # noqa: E501 + allowed_values = ["Fixed", "Float", "Optionality", "Step", "Exercise", "Invalid"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and schedule_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `schedule_type` ({0}), must be one of {1}" # noqa: E501 + .format(schedule_type, allowed_values) + ) + + self._schedule_type = schedule_type + + def get_real_child_model(self, data): + """Returns the real base class specified by the discriminator""" + discriminator_key = self.attribute_map[self.discriminator] + discriminator_value = data[discriminator_key] + return self.discriminator_value_class_map.get(discriminator_value) + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Schedule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Schedule): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/simple_instrument.py b/sdk/lusid/models/simple_instrument.py new file mode 100644 index 00000000000..109e5b255a0 --- /dev/null +++ b/sdk/lusid/models/simple_instrument.py @@ -0,0 +1,315 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class SimpleInstrument(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'asset_class': 'str', + 'fgn_ccys': 'list[str]', + 'simple_instrument_type': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'asset_class': 'assetClass', + 'fgn_ccys': 'fgnCcys', + 'simple_instrument_type': 'simpleInstrumentType', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'maturity_date': 'optional', + 'dom_ccy': 'required', + 'asset_class': 'required', + 'fgn_ccys': 'optional', + 'simple_instrument_type': 'required', + 'instrument_type': 'required' + } + + def __init__(self, maturity_date=None, dom_ccy=None, asset_class=None, fgn_ccys=None, simple_instrument_type=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """SimpleInstrument - a model defined in OpenAPI" + + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. + :type maturity_date: datetime + :param dom_ccy: The domestic currency. (required) + :type dom_ccy: str + :param asset_class: The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown (required) + :type asset_class: str + :param fgn_ccys: The set of foreign currencies, if any (optional). + :type fgn_ccys: list[str] + :param simple_instrument_type: The Instrument type of the simple instrument. (required) + :type simple_instrument_type: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._maturity_date = None + self._dom_ccy = None + self._asset_class = None + self._fgn_ccys = None + self._simple_instrument_type = None + self._instrument_type = None + self.discriminator = None + + if maturity_date is not None: + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.asset_class = asset_class + self.fgn_ccys = fgn_ccys + self.simple_instrument_type = simple_instrument_type + self.instrument_type = instrument_type + + @property + def maturity_date(self): + """Gets the maturity_date of this SimpleInstrument. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this SimpleInstrument. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this SimpleInstrument. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this SimpleInstrument. # noqa: E501 + :type maturity_date: datetime + """ + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this SimpleInstrument. # noqa: E501 + + The domestic currency. # noqa: E501 + + :return: The dom_ccy of this SimpleInstrument. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this SimpleInstrument. + + The domestic currency. # noqa: E501 + + :param dom_ccy: The dom_ccy of this SimpleInstrument. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def asset_class(self): + """Gets the asset_class of this SimpleInstrument. # noqa: E501 + + The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown # noqa: E501 + + :return: The asset_class of this SimpleInstrument. # noqa: E501 + :rtype: str + """ + return self._asset_class + + @asset_class.setter + def asset_class(self, asset_class): + """Sets the asset_class of this SimpleInstrument. + + The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown # noqa: E501 + + :param asset_class: The asset_class of this SimpleInstrument. # noqa: E501 + :type asset_class: str + """ + if self.local_vars_configuration.client_side_validation and asset_class is None: # noqa: E501 + raise ValueError("Invalid value for `asset_class`, must not be `None`") # noqa: E501 + allowed_values = ["InterestRates", "FX", "Inflation", "Equities", "Credit", "Commodities", "Money", "Unknown"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and asset_class not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `asset_class` ({0}), must be one of {1}" # noqa: E501 + .format(asset_class, allowed_values) + ) + + self._asset_class = asset_class + + @property + def fgn_ccys(self): + """Gets the fgn_ccys of this SimpleInstrument. # noqa: E501 + + The set of foreign currencies, if any (optional). # noqa: E501 + + :return: The fgn_ccys of this SimpleInstrument. # noqa: E501 + :rtype: list[str] + """ + return self._fgn_ccys + + @fgn_ccys.setter + def fgn_ccys(self, fgn_ccys): + """Sets the fgn_ccys of this SimpleInstrument. + + The set of foreign currencies, if any (optional). # noqa: E501 + + :param fgn_ccys: The fgn_ccys of this SimpleInstrument. # noqa: E501 + :type fgn_ccys: list[str] + """ + + self._fgn_ccys = fgn_ccys + + @property + def simple_instrument_type(self): + """Gets the simple_instrument_type of this SimpleInstrument. # noqa: E501 + + The Instrument type of the simple instrument. # noqa: E501 + + :return: The simple_instrument_type of this SimpleInstrument. # noqa: E501 + :rtype: str + """ + return self._simple_instrument_type + + @simple_instrument_type.setter + def simple_instrument_type(self, simple_instrument_type): + """Sets the simple_instrument_type of this SimpleInstrument. + + The Instrument type of the simple instrument. # noqa: E501 + + :param simple_instrument_type: The simple_instrument_type of this SimpleInstrument. # noqa: E501 + :type simple_instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and simple_instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `simple_instrument_type`, must not be `None`") # noqa: E501 + + self._simple_instrument_type = simple_instrument_type + + @property + def instrument_type(self): + """Gets the instrument_type of this SimpleInstrument. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this SimpleInstrument. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this SimpleInstrument. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this SimpleInstrument. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SimpleInstrument): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SimpleInstrument): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/simple_instrument_all_of.py b/sdk/lusid/models/simple_instrument_all_of.py new file mode 100644 index 00000000000..ff24526f8c4 --- /dev/null +++ b/sdk/lusid/models/simple_instrument_all_of.py @@ -0,0 +1,315 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class SimpleInstrumentAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'maturity_date': 'datetime', + 'dom_ccy': 'str', + 'asset_class': 'str', + 'fgn_ccys': 'list[str]', + 'simple_instrument_type': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'maturity_date': 'maturityDate', + 'dom_ccy': 'domCcy', + 'asset_class': 'assetClass', + 'fgn_ccys': 'fgnCcys', + 'simple_instrument_type': 'simpleInstrumentType', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'maturity_date': 'optional', + 'dom_ccy': 'required', + 'asset_class': 'required', + 'fgn_ccys': 'optional', + 'simple_instrument_type': 'required', + 'instrument_type': 'required' + } + + def __init__(self, maturity_date=None, dom_ccy=None, asset_class=None, fgn_ccys=None, simple_instrument_type=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """SimpleInstrumentAllOf - a model defined in OpenAPI" + + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. + :type maturity_date: datetime + :param dom_ccy: The domestic currency. (required) + :type dom_ccy: str + :param asset_class: The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown (required) + :type asset_class: str + :param fgn_ccys: The set of foreign currencies, if any (optional). + :type fgn_ccys: list[str] + :param simple_instrument_type: The Instrument type of the simple instrument. (required) + :type simple_instrument_type: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._maturity_date = None + self._dom_ccy = None + self._asset_class = None + self._fgn_ccys = None + self._simple_instrument_type = None + self._instrument_type = None + self.discriminator = None + + if maturity_date is not None: + self.maturity_date = maturity_date + self.dom_ccy = dom_ccy + self.asset_class = asset_class + self.fgn_ccys = fgn_ccys + self.simple_instrument_type = simple_instrument_type + self.instrument_type = instrument_type + + @property + def maturity_date(self): + """Gets the maturity_date of this SimpleInstrumentAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this SimpleInstrumentAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this SimpleInstrumentAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this SimpleInstrumentAllOf. # noqa: E501 + :type maturity_date: datetime + """ + + self._maturity_date = maturity_date + + @property + def dom_ccy(self): + """Gets the dom_ccy of this SimpleInstrumentAllOf. # noqa: E501 + + The domestic currency. # noqa: E501 + + :return: The dom_ccy of this SimpleInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this SimpleInstrumentAllOf. + + The domestic currency. # noqa: E501 + + :param dom_ccy: The dom_ccy of this SimpleInstrumentAllOf. # noqa: E501 + :type dom_ccy: str + """ + if self.local_vars_configuration.client_side_validation and dom_ccy is None: # noqa: E501 + raise ValueError("Invalid value for `dom_ccy`, must not be `None`") # noqa: E501 + + self._dom_ccy = dom_ccy + + @property + def asset_class(self): + """Gets the asset_class of this SimpleInstrumentAllOf. # noqa: E501 + + The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown # noqa: E501 + + :return: The asset_class of this SimpleInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._asset_class + + @asset_class.setter + def asset_class(self, asset_class): + """Sets the asset_class of this SimpleInstrumentAllOf. + + The available values are: InterestRates, FX, Inflation, Equities, Credit, Commodities, Money, Unknown # noqa: E501 + + :param asset_class: The asset_class of this SimpleInstrumentAllOf. # noqa: E501 + :type asset_class: str + """ + if self.local_vars_configuration.client_side_validation and asset_class is None: # noqa: E501 + raise ValueError("Invalid value for `asset_class`, must not be `None`") # noqa: E501 + allowed_values = ["InterestRates", "FX", "Inflation", "Equities", "Credit", "Commodities", "Money", "Unknown"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and asset_class not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `asset_class` ({0}), must be one of {1}" # noqa: E501 + .format(asset_class, allowed_values) + ) + + self._asset_class = asset_class + + @property + def fgn_ccys(self): + """Gets the fgn_ccys of this SimpleInstrumentAllOf. # noqa: E501 + + The set of foreign currencies, if any (optional). # noqa: E501 + + :return: The fgn_ccys of this SimpleInstrumentAllOf. # noqa: E501 + :rtype: list[str] + """ + return self._fgn_ccys + + @fgn_ccys.setter + def fgn_ccys(self, fgn_ccys): + """Sets the fgn_ccys of this SimpleInstrumentAllOf. + + The set of foreign currencies, if any (optional). # noqa: E501 + + :param fgn_ccys: The fgn_ccys of this SimpleInstrumentAllOf. # noqa: E501 + :type fgn_ccys: list[str] + """ + + self._fgn_ccys = fgn_ccys + + @property + def simple_instrument_type(self): + """Gets the simple_instrument_type of this SimpleInstrumentAllOf. # noqa: E501 + + The Instrument type of the simple instrument. # noqa: E501 + + :return: The simple_instrument_type of this SimpleInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._simple_instrument_type + + @simple_instrument_type.setter + def simple_instrument_type(self, simple_instrument_type): + """Sets the simple_instrument_type of this SimpleInstrumentAllOf. + + The Instrument type of the simple instrument. # noqa: E501 + + :param simple_instrument_type: The simple_instrument_type of this SimpleInstrumentAllOf. # noqa: E501 + :type simple_instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and simple_instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `simple_instrument_type`, must not be `None`") # noqa: E501 + + self._simple_instrument_type = simple_instrument_type + + @property + def instrument_type(self): + """Gets the instrument_type of this SimpleInstrumentAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this SimpleInstrumentAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this SimpleInstrumentAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this SimpleInstrumentAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SimpleInstrumentAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SimpleInstrumentAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/step_schedule.py b/sdk/lusid/models/step_schedule.py new file mode 100644 index 00000000000..1004b2f9df2 --- /dev/null +++ b/sdk/lusid/models/step_schedule.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class StepSchedule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'level_type': 'str', + 'schedule_type': 'str', + 'step_schedule_type': 'str', + 'steps': 'list[LevelStep]' + } + + attribute_map = { + 'level_type': 'levelType', + 'schedule_type': 'scheduleType', + 'step_schedule_type': 'stepScheduleType', + 'steps': 'steps' + } + + required_map = { + 'level_type': 'required', + 'schedule_type': 'required', + 'step_schedule_type': 'required', + 'steps': 'required' + } + + def __init__(self, level_type=None, schedule_type=None, step_schedule_type=None, steps=None, local_vars_configuration=None): # noqa: E501 + """StepSchedule - a model defined in OpenAPI" + + :param level_type: The type of shift or adjustment that the quantity represents. Supported string (enumeration) values are: [Absolute, AbsoluteShift, Percentage, AbsolutePercentage]. (required) + :type level_type: str + :param schedule_type: What type of schedule does this represent. Supported string (enumeration) values are: [Fixed, Float, Optionality, Step, Payment, Accrual]. (required) + :type schedule_type: str + :param step_schedule_type: The type of step that this schedule is for. Supported string (enumeration) values are: [Coupon, Notional, Spread]. (required) + :type step_schedule_type: str + :param steps: The level steps which are applied. (required) + :type steps: list[lusid.LevelStep] + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._level_type = None + self._schedule_type = None + self._step_schedule_type = None + self._steps = None + self.discriminator = None + + self.level_type = level_type + self.schedule_type = schedule_type + self.step_schedule_type = step_schedule_type + self.steps = steps + + @property + def level_type(self): + """Gets the level_type of this StepSchedule. # noqa: E501 + + The type of shift or adjustment that the quantity represents. Supported string (enumeration) values are: [Absolute, AbsoluteShift, Percentage, AbsolutePercentage]. # noqa: E501 + + :return: The level_type of this StepSchedule. # noqa: E501 + :rtype: str + """ + return self._level_type + + @level_type.setter + def level_type(self, level_type): + """Sets the level_type of this StepSchedule. + + The type of shift or adjustment that the quantity represents. Supported string (enumeration) values are: [Absolute, AbsoluteShift, Percentage, AbsolutePercentage]. # noqa: E501 + + :param level_type: The level_type of this StepSchedule. # noqa: E501 + :type level_type: str + """ + if self.local_vars_configuration.client_side_validation and level_type is None: # noqa: E501 + raise ValueError("Invalid value for `level_type`, must not be `None`") # noqa: E501 + + self._level_type = level_type + + @property + def schedule_type(self): + """Gets the schedule_type of this StepSchedule. # noqa: E501 + + What type of schedule does this represent. Supported string (enumeration) values are: [Fixed, Float, Optionality, Step, Payment, Accrual]. # noqa: E501 + + :return: The schedule_type of this StepSchedule. # noqa: E501 + :rtype: str + """ + return self._schedule_type + + @schedule_type.setter + def schedule_type(self, schedule_type): + """Sets the schedule_type of this StepSchedule. + + What type of schedule does this represent. Supported string (enumeration) values are: [Fixed, Float, Optionality, Step, Payment, Accrual]. # noqa: E501 + + :param schedule_type: The schedule_type of this StepSchedule. # noqa: E501 + :type schedule_type: str + """ + if self.local_vars_configuration.client_side_validation and schedule_type is None: # noqa: E501 + raise ValueError("Invalid value for `schedule_type`, must not be `None`") # noqa: E501 + + self._schedule_type = schedule_type + + @property + def step_schedule_type(self): + """Gets the step_schedule_type of this StepSchedule. # noqa: E501 + + The type of step that this schedule is for. Supported string (enumeration) values are: [Coupon, Notional, Spread]. # noqa: E501 + + :return: The step_schedule_type of this StepSchedule. # noqa: E501 + :rtype: str + """ + return self._step_schedule_type + + @step_schedule_type.setter + def step_schedule_type(self, step_schedule_type): + """Sets the step_schedule_type of this StepSchedule. + + The type of step that this schedule is for. Supported string (enumeration) values are: [Coupon, Notional, Spread]. # noqa: E501 + + :param step_schedule_type: The step_schedule_type of this StepSchedule. # noqa: E501 + :type step_schedule_type: str + """ + if self.local_vars_configuration.client_side_validation and step_schedule_type is None: # noqa: E501 + raise ValueError("Invalid value for `step_schedule_type`, must not be `None`") # noqa: E501 + + self._step_schedule_type = step_schedule_type + + @property + def steps(self): + """Gets the steps of this StepSchedule. # noqa: E501 + + The level steps which are applied. # noqa: E501 + + :return: The steps of this StepSchedule. # noqa: E501 + :rtype: list[lusid.LevelStep] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """Sets the steps of this StepSchedule. + + The level steps which are applied. # noqa: E501 + + :param steps: The steps of this StepSchedule. # noqa: E501 + :type steps: list[lusid.LevelStep] + """ + if self.local_vars_configuration.client_side_validation and steps is None: # noqa: E501 + raise ValueError("Invalid value for `steps`, must not be `None`") # noqa: E501 + + self._steps = steps + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StepSchedule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StepSchedule): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/term_deposit.py b/sdk/lusid/models/term_deposit.py new file mode 100644 index 00000000000..47d85f6a53d --- /dev/null +++ b/sdk/lusid/models/term_deposit.py @@ -0,0 +1,340 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class TermDeposit(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'contract_size': 'float', + 'flow_convention': 'FlowConventions', + 'rate': 'float', + 'dom_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'contract_size': 'contractSize', + 'flow_convention': 'flowConvention', + 'rate': 'rate', + 'dom_ccy': 'domCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'contract_size': 'required', + 'flow_convention': 'required', + 'rate': 'required', + 'dom_ccy': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, contract_size=None, flow_convention=None, rate=None, dom_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """TermDeposit - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param contract_size: With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. (required) + :type contract_size: float + :param flow_convention: (required) + :type flow_convention: lusid.FlowConventions + :param rate: The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest (required) + :type rate: float + :param dom_ccy: DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. + :type dom_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._contract_size = None + self._flow_convention = None + self._rate = None + self._dom_ccy = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.contract_size = contract_size + self.flow_convention = flow_convention + self.rate = rate + self.dom_ccy = dom_ccy + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this TermDeposit. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this TermDeposit. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this TermDeposit. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this TermDeposit. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this TermDeposit. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this TermDeposit. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this TermDeposit. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this TermDeposit. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def contract_size(self): + """Gets the contract_size of this TermDeposit. # noqa: E501 + + With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. # noqa: E501 + + :return: The contract_size of this TermDeposit. # noqa: E501 + :rtype: float + """ + return self._contract_size + + @contract_size.setter + def contract_size(self, contract_size): + """Sets the contract_size of this TermDeposit. + + With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. # noqa: E501 + + :param contract_size: The contract_size of this TermDeposit. # noqa: E501 + :type contract_size: float + """ + if self.local_vars_configuration.client_side_validation and contract_size is None: # noqa: E501 + raise ValueError("Invalid value for `contract_size`, must not be `None`") # noqa: E501 + + self._contract_size = contract_size + + @property + def flow_convention(self): + """Gets the flow_convention of this TermDeposit. # noqa: E501 + + + :return: The flow_convention of this TermDeposit. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._flow_convention + + @flow_convention.setter + def flow_convention(self, flow_convention): + """Sets the flow_convention of this TermDeposit. + + + :param flow_convention: The flow_convention of this TermDeposit. # noqa: E501 + :type flow_convention: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and flow_convention is None: # noqa: E501 + raise ValueError("Invalid value for `flow_convention`, must not be `None`") # noqa: E501 + + self._flow_convention = flow_convention + + @property + def rate(self): + """Gets the rate of this TermDeposit. # noqa: E501 + + The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest # noqa: E501 + + :return: The rate of this TermDeposit. # noqa: E501 + :rtype: float + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this TermDeposit. + + The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest # noqa: E501 + + :param rate: The rate of this TermDeposit. # noqa: E501 + :type rate: float + """ + if self.local_vars_configuration.client_side_validation and rate is None: # noqa: E501 + raise ValueError("Invalid value for `rate`, must not be `None`") # noqa: E501 + + self._rate = rate + + @property + def dom_ccy(self): + """Gets the dom_ccy of this TermDeposit. # noqa: E501 + + DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. # noqa: E501 + + :return: The dom_ccy of this TermDeposit. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this TermDeposit. + + DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. # noqa: E501 + + :param dom_ccy: The dom_ccy of this TermDeposit. # noqa: E501 + :type dom_ccy: str + """ + + self._dom_ccy = dom_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this TermDeposit. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this TermDeposit. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this TermDeposit. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this TermDeposit. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TermDeposit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TermDeposit): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/term_deposit_all_of.py b/sdk/lusid/models/term_deposit_all_of.py new file mode 100644 index 00000000000..4853ad6630e --- /dev/null +++ b/sdk/lusid/models/term_deposit_all_of.py @@ -0,0 +1,340 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class TermDepositAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'start_date': 'datetime', + 'maturity_date': 'datetime', + 'contract_size': 'float', + 'flow_convention': 'FlowConventions', + 'rate': 'float', + 'dom_ccy': 'str', + 'instrument_type': 'str' + } + + attribute_map = { + 'start_date': 'startDate', + 'maturity_date': 'maturityDate', + 'contract_size': 'contractSize', + 'flow_convention': 'flowConvention', + 'rate': 'rate', + 'dom_ccy': 'domCcy', + 'instrument_type': 'instrumentType' + } + + required_map = { + 'start_date': 'required', + 'maturity_date': 'required', + 'contract_size': 'required', + 'flow_convention': 'required', + 'rate': 'required', + 'dom_ccy': 'optional', + 'instrument_type': 'required' + } + + def __init__(self, start_date=None, maturity_date=None, contract_size=None, flow_convention=None, rate=None, dom_ccy=None, instrument_type=None, local_vars_configuration=None): # noqa: E501 + """TermDepositAllOf - a model defined in OpenAPI" + + :param start_date: The start date of the instrument. This is normally synonymous with the trade-date. (required) + :type start_date: datetime + :param maturity_date: The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. (required) + :type maturity_date: datetime + :param contract_size: With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. (required) + :type contract_size: float + :param flow_convention: (required) + :type flow_convention: lusid.FlowConventions + :param rate: The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest (required) + :type rate: float + :param dom_ccy: DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. + :type dom_ccy: str + :param instrument_type: 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 (required) + :type instrument_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._start_date = None + self._maturity_date = None + self._contract_size = None + self._flow_convention = None + self._rate = None + self._dom_ccy = None + self._instrument_type = None + self.discriminator = None + + self.start_date = start_date + self.maturity_date = maturity_date + self.contract_size = contract_size + self.flow_convention = flow_convention + self.rate = rate + self.dom_ccy = dom_ccy + self.instrument_type = instrument_type + + @property + def start_date(self): + """Gets the start_date of this TermDepositAllOf. # noqa: E501 + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :return: The start_date of this TermDepositAllOf. # noqa: E501 + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this TermDepositAllOf. + + The start date of the instrument. This is normally synonymous with the trade-date. # noqa: E501 + + :param start_date: The start_date of this TermDepositAllOf. # noqa: E501 + :type start_date: datetime + """ + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 + raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 + + self._start_date = start_date + + @property + def maturity_date(self): + """Gets the maturity_date of this TermDepositAllOf. # noqa: E501 + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :return: The maturity_date of this TermDepositAllOf. # noqa: E501 + :rtype: datetime + """ + return self._maturity_date + + @maturity_date.setter + def maturity_date(self, maturity_date): + """Sets the maturity_date of this TermDepositAllOf. + + The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it. # noqa: E501 + + :param maturity_date: The maturity_date of this TermDepositAllOf. # noqa: E501 + :type maturity_date: datetime + """ + if self.local_vars_configuration.client_side_validation and maturity_date is None: # noqa: E501 + raise ValueError("Invalid value for `maturity_date`, must not be `None`") # noqa: E501 + + self._maturity_date = maturity_date + + @property + def contract_size(self): + """Gets the contract_size of this TermDepositAllOf. # noqa: E501 + + With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. # noqa: E501 + + :return: The contract_size of this TermDepositAllOf. # noqa: E501 + :rtype: float + """ + return self._contract_size + + @contract_size.setter + def contract_size(self, contract_size): + """Sets the contract_size of this TermDepositAllOf. + + With an OTC we have the problem of multiple ways of booking a quantity. e.g. If buying a swap do you have a holding of size 1 of 100,000,000 notional swap or a holding of 100,000,000 size of 1 notional swap, or any combination that multiplies to 10^8. When you get for a price for a 'unit swap' what do you mean? The definition must be consistent across all quotes. This includes bonds which have a face value and fx-forwards which often trade in standard contract sizes. When we look up a price, and there are no units, we are assuming it is a price for a contract size of 1. The logical effect of this is that instrument clean price = contract size * quoted unit price holding clean price = holding quantity * instrument clean price = holding quantity * contract size * quoted unit price In calculating accrued interest the same should hold. NB: The real problem is that people store \"prices\" without complete units. Everything should really be \"x ccy for n units\". Where the n is implicit the above has to hold. # noqa: E501 + + :param contract_size: The contract_size of this TermDepositAllOf. # noqa: E501 + :type contract_size: float + """ + if self.local_vars_configuration.client_side_validation and contract_size is None: # noqa: E501 + raise ValueError("Invalid value for `contract_size`, must not be `None`") # noqa: E501 + + self._contract_size = contract_size + + @property + def flow_convention(self): + """Gets the flow_convention of this TermDepositAllOf. # noqa: E501 + + + :return: The flow_convention of this TermDepositAllOf. # noqa: E501 + :rtype: lusid.FlowConventions + """ + return self._flow_convention + + @flow_convention.setter + def flow_convention(self, flow_convention): + """Sets the flow_convention of this TermDepositAllOf. + + + :param flow_convention: The flow_convention of this TermDepositAllOf. # noqa: E501 + :type flow_convention: lusid.FlowConventions + """ + if self.local_vars_configuration.client_side_validation and flow_convention is None: # noqa: E501 + raise ValueError("Invalid value for `flow_convention`, must not be `None`") # noqa: E501 + + self._flow_convention = flow_convention + + @property + def rate(self): + """Gets the rate of this TermDepositAllOf. # noqa: E501 + + The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest # noqa: E501 + + :return: The rate of this TermDepositAllOf. # noqa: E501 + :rtype: float + """ + return self._rate + + @rate.setter + def rate(self, rate): + """Sets the rate of this TermDepositAllOf. + + The fixed rate for the term deposit. Specified as a decimal, e.g 0.03 is meant to be 3% interest # noqa: E501 + + :param rate: The rate of this TermDepositAllOf. # noqa: E501 + :type rate: float + """ + if self.local_vars_configuration.client_side_validation and rate is None: # noqa: E501 + raise ValueError("Invalid value for `rate`, must not be `None`") # noqa: E501 + + self._rate = rate + + @property + def dom_ccy(self): + """Gets the dom_ccy of this TermDepositAllOf. # noqa: E501 + + DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. # noqa: E501 + + :return: The dom_ccy of this TermDepositAllOf. # noqa: E501 + :rtype: str + """ + return self._dom_ccy + + @dom_ccy.setter + def dom_ccy(self, dom_ccy): + """Sets the dom_ccy of this TermDepositAllOf. + + DomCcy of the TermDeposit. If provided, must match the currency of FlowConvention. # noqa: E501 + + :param dom_ccy: The dom_ccy of this TermDepositAllOf. # noqa: E501 + :type dom_ccy: str + """ + + self._dom_ccy = dom_ccy + + @property + def instrument_type(self): + """Gets the instrument_type of this TermDepositAllOf. # noqa: E501 + + 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 # noqa: E501 + + :return: The instrument_type of this TermDepositAllOf. # noqa: E501 + :rtype: str + """ + return self._instrument_type + + @instrument_type.setter + def instrument_type(self, instrument_type): + """Sets the instrument_type of this TermDepositAllOf. + + 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 # noqa: E501 + + :param instrument_type: The instrument_type of this TermDepositAllOf. # noqa: E501 + :type instrument_type: str + """ + if self.local_vars_configuration.client_side_validation and instrument_type is None: # noqa: E501 + raise ValueError("Invalid value for `instrument_type`, must not be `None`") # noqa: E501 + allowed_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"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and instrument_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `instrument_type` ({0}), must be one of {1}" # noqa: E501 + .format(instrument_type, allowed_values) + ) + + self._instrument_type = instrument_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TermDepositAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TermDepositAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/touch.py b/sdk/lusid/models/touch.py new file mode 100644 index 00000000000..7c17d92cd56 --- /dev/null +++ b/sdk/lusid/models/touch.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class Touch(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'direction': 'str', + 'level': 'float', + 'monitoring': 'str', + 'type': 'str' + } + + attribute_map = { + 'direction': 'direction', + 'level': 'level', + 'monitoring': 'monitoring', + 'type': 'type' + } + + required_map = { + 'direction': 'required', + 'level': 'required', + 'monitoring': 'optional', + 'type': 'required' + } + + def __init__(self, direction=None, level=None, monitoring=None, type=None, local_vars_configuration=None): # noqa: E501 + """Touch - a model defined in OpenAPI" + + :param direction: Supported string (enumeration) values are: [Down, Up]. (required) + :type direction: str + :param level: Trigger level, which the underlying should (or should not) cross/touch. (required) + :type level: float + :param monitoring: Supported string (enumeration) values are: [European, Bermudan, American]. + :type monitoring: str + :param type: Supported string (enumeration) values are: [Touch, Notouch]. (required) + :type type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._direction = None + self._level = None + self._monitoring = None + self._type = None + self.discriminator = None + + self.direction = direction + self.level = level + self.monitoring = monitoring + self.type = type + + @property + def direction(self): + """Gets the direction of this Touch. # noqa: E501 + + Supported string (enumeration) values are: [Down, Up]. # noqa: E501 + + :return: The direction of this Touch. # noqa: E501 + :rtype: str + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this Touch. + + Supported string (enumeration) values are: [Down, Up]. # noqa: E501 + + :param direction: The direction of this Touch. # noqa: E501 + :type direction: str + """ + if self.local_vars_configuration.client_side_validation and direction is None: # noqa: E501 + raise ValueError("Invalid value for `direction`, must not be `None`") # noqa: E501 + + self._direction = direction + + @property + def level(self): + """Gets the level of this Touch. # noqa: E501 + + Trigger level, which the underlying should (or should not) cross/touch. # noqa: E501 + + :return: The level of this Touch. # noqa: E501 + :rtype: float + """ + return self._level + + @level.setter + def level(self, level): + """Sets the level of this Touch. + + Trigger level, which the underlying should (or should not) cross/touch. # noqa: E501 + + :param level: The level of this Touch. # noqa: E501 + :type level: float + """ + if self.local_vars_configuration.client_side_validation and level is None: # noqa: E501 + raise ValueError("Invalid value for `level`, must not be `None`") # noqa: E501 + + self._level = level + + @property + def monitoring(self): + """Gets the monitoring of this Touch. # noqa: E501 + + Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :return: The monitoring of this Touch. # noqa: E501 + :rtype: str + """ + return self._monitoring + + @monitoring.setter + def monitoring(self, monitoring): + """Sets the monitoring of this Touch. + + Supported string (enumeration) values are: [European, Bermudan, American]. # noqa: E501 + + :param monitoring: The monitoring of this Touch. # noqa: E501 + :type monitoring: str + """ + + self._monitoring = monitoring + + @property + def type(self): + """Gets the type of this Touch. # noqa: E501 + + Supported string (enumeration) values are: [Touch, Notouch]. # noqa: E501 + + :return: The type of this Touch. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Touch. + + Supported string (enumeration) values are: [Touch, Notouch]. # noqa: E501 + + :param type: The type of this Touch. # noqa: E501 + :type type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Touch): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Touch): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/weighted_instruments.py b/sdk/lusid/models/weighted_instruments.py new file mode 100644 index 00000000000..d9d26af88cd --- /dev/null +++ b/sdk/lusid/models/weighted_instruments.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class WeightedInstruments(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'instruments': 'list[WeightedInstrument]' + } + + attribute_map = { + 'instruments': 'instruments' + } + + required_map = { + 'instruments': 'required' + } + + def __init__(self, instruments=None, local_vars_configuration=None): # noqa: E501 + """WeightedInstruments - a model defined in OpenAPI" + + :param instruments: The instruments that are held in the set. (required) + :type instruments: list[lusid.WeightedInstrument] + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._instruments = None + self.discriminator = None + + self.instruments = instruments + + @property + def instruments(self): + """Gets the instruments of this WeightedInstruments. # noqa: E501 + + The instruments that are held in the set. # noqa: E501 + + :return: The instruments of this WeightedInstruments. # noqa: E501 + :rtype: list[lusid.WeightedInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this WeightedInstruments. + + The instruments that are held in the set. # noqa: E501 + + :param instruments: The instruments of this WeightedInstruments. # noqa: E501 + :type instruments: list[lusid.WeightedInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WeightedInstruments): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WeightedInstruments): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/yield_curve_data.py b/sdk/lusid/models/yield_curve_data.py new file mode 100644 index 00000000000..cf4c16c97fb --- /dev/null +++ b/sdk/lusid/models/yield_curve_data.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class YieldCurveData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """YieldCurveData - a model defined in OpenAPI" + + :param base_date: Base date (required) + :type base_date: datetime + :param instruments: The set of instruments that define the curve. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: The market quotes corresponding to the the instruments used to define the curve (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this YieldCurveData. # noqa: E501 + + Base date # noqa: E501 + + :return: The base_date of this YieldCurveData. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this YieldCurveData. + + Base date # noqa: E501 + + :param base_date: The base_date of this YieldCurveData. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this YieldCurveData. # noqa: E501 + + The set of instruments that define the curve. # noqa: E501 + + :return: The instruments of this YieldCurveData. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this YieldCurveData. + + The set of instruments that define the curve. # noqa: E501 + + :param instruments: The instruments of this YieldCurveData. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this YieldCurveData. # noqa: E501 + + The market quotes corresponding to the the instruments used to define the curve # noqa: E501 + + :return: The quotes of this YieldCurveData. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this YieldCurveData. + + The market quotes corresponding to the the instruments used to define the curve # noqa: E501 + + :param quotes: The quotes of this YieldCurveData. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this YieldCurveData. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this YieldCurveData. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this YieldCurveData. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this YieldCurveData. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this YieldCurveData. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this YieldCurveData. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this YieldCurveData. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this YieldCurveData. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, YieldCurveData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, YieldCurveData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/models/yield_curve_data_all_of.py b/sdk/lusid/models/yield_curve_data_all_of.py new file mode 100644 index 00000000000..fdea112a940 --- /dev/null +++ b/sdk/lusid/models/yield_curve_data_all_of.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + LUSID API + + FINBOURNE Technology # noqa: E501 + + The version of the OpenAPI document: 0.11.4750 + Contact: info@finbourne.com + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from lusid.configuration import Configuration + + +class YieldCurveDataAllOf(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + required_map (dict): The key is attribute name + and the value is whether it is 'required' or 'optional'. + """ + openapi_types = { + 'base_date': 'datetime', + 'instruments': 'list[LusidInstrument]', + 'quotes': 'list[MarketQuote]', + 'lineage': 'str', + 'market_data_type': 'str' + } + + attribute_map = { + 'base_date': 'baseDate', + 'instruments': 'instruments', + 'quotes': 'quotes', + 'lineage': 'lineage', + 'market_data_type': 'marketDataType' + } + + required_map = { + 'base_date': 'required', + 'instruments': 'required', + 'quotes': 'required', + 'lineage': 'optional', + 'market_data_type': 'required' + } + + def __init__(self, base_date=None, instruments=None, quotes=None, lineage=None, market_data_type=None, local_vars_configuration=None): # noqa: E501 + """YieldCurveDataAllOf - a model defined in OpenAPI" + + :param base_date: Base date (required) + :type base_date: datetime + :param instruments: The set of instruments that define the curve. (required) + :type instruments: list[lusid.LusidInstrument] + :param quotes: The market quotes corresponding to the the instruments used to define the curve (required) + :type quotes: list[lusid.MarketQuote] + :param lineage: Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. + :type lineage: str + :param market_data_type: The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData (required) + :type market_data_type: str + + """ # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._base_date = None + self._instruments = None + self._quotes = None + self._lineage = None + self._market_data_type = None + self.discriminator = None + + self.base_date = base_date + self.instruments = instruments + self.quotes = quotes + self.lineage = lineage + self.market_data_type = market_data_type + + @property + def base_date(self): + """Gets the base_date of this YieldCurveDataAllOf. # noqa: E501 + + Base date # noqa: E501 + + :return: The base_date of this YieldCurveDataAllOf. # noqa: E501 + :rtype: datetime + """ + return self._base_date + + @base_date.setter + def base_date(self, base_date): + """Sets the base_date of this YieldCurveDataAllOf. + + Base date # noqa: E501 + + :param base_date: The base_date of this YieldCurveDataAllOf. # noqa: E501 + :type base_date: datetime + """ + if self.local_vars_configuration.client_side_validation and base_date is None: # noqa: E501 + raise ValueError("Invalid value for `base_date`, must not be `None`") # noqa: E501 + + self._base_date = base_date + + @property + def instruments(self): + """Gets the instruments of this YieldCurveDataAllOf. # noqa: E501 + + The set of instruments that define the curve. # noqa: E501 + + :return: The instruments of this YieldCurveDataAllOf. # noqa: E501 + :rtype: list[lusid.LusidInstrument] + """ + return self._instruments + + @instruments.setter + def instruments(self, instruments): + """Sets the instruments of this YieldCurveDataAllOf. + + The set of instruments that define the curve. # noqa: E501 + + :param instruments: The instruments of this YieldCurveDataAllOf. # noqa: E501 + :type instruments: list[lusid.LusidInstrument] + """ + if self.local_vars_configuration.client_side_validation and instruments is None: # noqa: E501 + raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 + + self._instruments = instruments + + @property + def quotes(self): + """Gets the quotes of this YieldCurveDataAllOf. # noqa: E501 + + The market quotes corresponding to the the instruments used to define the curve # noqa: E501 + + :return: The quotes of this YieldCurveDataAllOf. # noqa: E501 + :rtype: list[lusid.MarketQuote] + """ + return self._quotes + + @quotes.setter + def quotes(self, quotes): + """Sets the quotes of this YieldCurveDataAllOf. + + The market quotes corresponding to the the instruments used to define the curve # noqa: E501 + + :param quotes: The quotes of this YieldCurveDataAllOf. # noqa: E501 + :type quotes: list[lusid.MarketQuote] + """ + if self.local_vars_configuration.client_side_validation and quotes is None: # noqa: E501 + raise ValueError("Invalid value for `quotes`, must not be `None`") # noqa: E501 + + self._quotes = quotes + + @property + def lineage(self): + """Gets the lineage of this YieldCurveDataAllOf. # noqa: E501 + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :return: The lineage of this YieldCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._lineage + + @lineage.setter + def lineage(self, lineage): + """Sets the lineage of this YieldCurveDataAllOf. + + Description of the complex market data's lineage e.g. 'FundAccountant_GreenQuality'. # noqa: E501 + + :param lineage: The lineage of this YieldCurveDataAllOf. # noqa: E501 + :type lineage: str + """ + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) > 1024): + raise ValueError("Invalid value for `lineage`, length must be less than or equal to `1024`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + lineage is not None and len(lineage) < 0): + raise ValueError("Invalid value for `lineage`, length must be greater than or equal to `0`") # noqa: E501 + + self._lineage = lineage + + @property + def market_data_type(self): + """Gets the market_data_type of this YieldCurveDataAllOf. # noqa: E501 + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :return: The market_data_type of this YieldCurveDataAllOf. # noqa: E501 + :rtype: str + """ + return self._market_data_type + + @market_data_type.setter + def market_data_type(self, market_data_type): + """Sets the market_data_type of this YieldCurveDataAllOf. + + The available values are: DiscountFactorCurveData, EquityVolSurfaceData, FxVolSurfaceData, IrVolCubeData, OpaqueMarketData, YieldCurveData, FxForwardCurveData, FxForwardPipsCurveData, FxForwardTenorCurveData, FxForwardTenorPipsCurveData, FxForwardCurveByQuoteReference, CreditSpreadCurveData, EquityCurveByPricesData # noqa: E501 + + :param market_data_type: The market_data_type of this YieldCurveDataAllOf. # noqa: E501 + :type market_data_type: str + """ + if self.local_vars_configuration.client_side_validation and market_data_type is None: # noqa: E501 + raise ValueError("Invalid value for `market_data_type`, must not be `None`") # noqa: E501 + allowed_values = ["DiscountFactorCurveData", "EquityVolSurfaceData", "FxVolSurfaceData", "IrVolCubeData", "OpaqueMarketData", "YieldCurveData", "FxForwardCurveData", "FxForwardPipsCurveData", "FxForwardTenorCurveData", "FxForwardTenorPipsCurveData", "FxForwardCurveByQuoteReference", "CreditSpreadCurveData", "EquityCurveByPricesData"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and market_data_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `market_data_type` ({0}), must be one of {1}" # noqa: E501 + .format(market_data_type, allowed_values) + ) + + self._market_data_type = market_data_type + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, YieldCurveDataAllOf): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, YieldCurveDataAllOf): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/lusid/rest.py b/sdk/lusid/rest.py index 520a6d23098..24460482d1b 100644 --- a/sdk/lusid/rest.py +++ b/sdk/lusid/rest.py @@ -26,7 +26,7 @@ import urllib3 from lusid.exceptions import ApiException, ApiValueError -from lusid.tcp.tcp_keep_alive_probes import TCPKeepAlivePoolManager, TCPKeepAliveProxyManager +from fbnsdkutilities.tcp.tcp_keep_alive_probes import TCPKeepAlivePoolManager, TCPKeepAliveProxyManager logger = logging.getLogger(__name__)