lusid-sdk 2.0.50b0__py3-none-any.whl → 2.0.470__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +1117 -14
- lusid/api/__init__.py +69 -0
- lusid/api/abor_api.py +513 -179
- lusid/api/abor_configuration_api.py +25 -24
- lusid/api/allocations_api.py +12 -20
- lusid/api/blocks_api.py +6 -6
- lusid/api/calendars_api.py +16 -24
- lusid/api/chart_of_accounts_api.py +1745 -441
- lusid/api/compliance_api.py +71 -62
- lusid/api/configuration_recipe_api.py +1198 -56
- lusid/api/corporate_action_sources_api.py +8 -8
- lusid/api/custom_entities_api.py +6 -6
- lusid/api/cut_label_definitions_api.py +9 -17
- lusid/api/data_types_api.py +16 -32
- lusid/api/executions_api.py +6 -6
- lusid/api/funds_api.py +1119 -0
- lusid/api/instrument_event_types_api.py +1287 -0
- lusid/api/instruments_api.py +12 -20
- lusid/api/legacy_compliance_api.py +12 -12
- lusid/api/legal_entities_api.py +12 -12
- lusid/api/order_graph_api.py +12 -12
- lusid/api/order_instructions_api.py +6 -6
- lusid/api/order_management_api.py +495 -14
- lusid/api/orders_api.py +16 -24
- lusid/api/packages_api.py +6 -6
- lusid/api/persons_api.py +16 -24
- lusid/api/placements_api.py +12 -12
- lusid/api/portfolio_groups_api.py +6 -6
- lusid/api/portfolios_api.py +23 -39
- lusid/api/property_definitions_api.py +205 -0
- lusid/api/queryable_keys_api.py +211 -0
- lusid/api/quotes_api.py +20 -36
- lusid/api/reconciliations_api.py +410 -1978
- lusid/api/schemas_api.py +7 -15
- lusid/api/scopes_api.py +151 -0
- lusid/api/scripted_translation_api.py +30 -28
- lusid/api/staging_rule_set_api.py +885 -0
- lusid/api/transaction_configuration_api.py +22 -22
- lusid/api/transaction_portfolios_api.py +282 -577
- lusid/api_client.py +5 -3
- lusid/configuration.py +1 -1
- lusid/extensions/__init__.py +10 -7
- lusid/extensions/api_client.py +3 -1
- lusid/extensions/api_client_factory.py +156 -45
- lusid/extensions/api_configuration.py +124 -15
- lusid/extensions/configuration_loaders.py +2 -4
- lusid/extensions/proxy_config.py +8 -5
- lusid/extensions/socket_keep_alive.py +14 -15
- lusid/extensions/tcp_keep_alive_connector.py +93 -46
- lusid/models/__init__.py +1028 -13
- lusid/models/abor.py +9 -2
- lusid/models/abor_configuration.py +8 -8
- lusid/models/abor_configuration_request.py +9 -9
- lusid/models/abor_request.py +1 -1
- lusid/models/account.py +6 -1
- lusid/models/accumulation_event.py +104 -0
- lusid/models/address_key_compliance_parameter.py +5 -12
- lusid/models/address_key_list_compliance_parameter.py +3 -3
- lusid/models/address_key_option_definition.py +3 -1
- lusid/models/amortisation_event.py +4 -6
- lusid/models/{underlying_leg.py → asset_leg.py} +15 -15
- lusid/models/basket.py +3 -3
- lusid/models/block_and_order_id_request.py +78 -0
- lusid/models/block_and_orders.py +83 -0
- lusid/models/block_and_orders_create_request.py +77 -0
- lusid/models/block_and_orders_request.py +134 -0
- lusid/models/blocked_order_request.py +130 -0
- lusid/models/bond.py +13 -6
- lusid/models/bond_coupon_event.py +97 -0
- lusid/models/bond_default_event.py +8 -18
- lusid/models/bond_principal_event.py +97 -0
- lusid/models/book_transactions_request.py +97 -0
- lusid/models/bool_compliance_parameter.py +3 -3
- lusid/models/bool_list_compliance_parameter.py +3 -3
- lusid/models/branch_step.py +101 -0
- lusid/models/cap_floor.py +3 -3
- lusid/models/cash_dividend_event.py +32 -10
- lusid/models/cash_election.py +91 -0
- lusid/models/cash_flow_event.py +5 -7
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_flow_conventions.py +1 -1
- lusid/models/cds_index.py +4 -4
- lusid/models/check_step.py +110 -0
- lusid/models/cleardown_module_details.py +95 -0
- lusid/models/cleardown_module_request.py +117 -0
- lusid/models/cleardown_module_response.py +139 -0
- lusid/models/cleardown_module_rule.py +94 -0
- lusid/models/{reconciliation_run_break.py → cleardown_module_rules_updated_response.py} +30 -36
- lusid/models/close_event.py +3 -3
- lusid/models/close_period_diary_entry_request.py +149 -0
- lusid/models/complete_portfolio.py +8 -1
- lusid/models/complex_bond.py +4 -4
- lusid/models/complex_market_data.py +6 -5
- lusid/models/compliance_parameter.py +8 -5
- lusid/models/compliance_parameter_type.py +3 -0
- lusid/models/compliance_rule_breakdown.py +16 -8
- lusid/models/compliance_rule_breakdown_request.py +12 -4
- lusid/models/compliance_rule_result_v2.py +85 -0
- lusid/models/compliance_step.py +99 -0
- lusid/models/compliance_step_type.py +42 -0
- lusid/models/compliance_summary_rule_result.py +12 -15
- lusid/models/compliance_summary_rule_result_request.py +12 -15
- lusid/models/compliance_template_variation.py +12 -2
- lusid/models/component_transaction.py +92 -0
- lusid/models/composite_dispersion.py +30 -5
- lusid/models/compounding.py +4 -4
- lusid/models/configuration_recipe.py +10 -19
- lusid/models/constant_volatility_surface.py +102 -0
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_derived_transaction_portfolio_request.py +10 -3
- lusid/models/create_property_definition_request.py +12 -5
- lusid/models/create_staging_rule_set_request.py +91 -0
- lusid/models/create_trade_tickets_response.py +87 -0
- lusid/models/create_transaction_portfolio_request.py +16 -3
- lusid/models/credit_default_swap.py +4 -4
- lusid/models/credit_spread_curve_data.py +4 -4
- lusid/models/custom_entity_definition.py +8 -2
- lusid/models/custom_entity_type.py +8 -2
- lusid/models/cut_label_definition.py +7 -1
- lusid/models/data_type.py +7 -1
- lusid/models/data_type_summary.py +8 -2
- lusid/models/date_time_compliance_parameter.py +3 -3
- lusid/models/date_time_list_compliance_parameter.py +3 -3
- lusid/models/{upsert_reconciliation_run_request.py → day_month.py} +15 -15
- lusid/models/decimal_compliance_parameter.py +3 -3
- lusid/models/decimal_list_compliance_parameter.py +3 -3
- lusid/models/dialect.py +9 -3
- lusid/models/diary_entry.py +1 -1
- lusid/models/diary_entry_request.py +1 -1
- lusid/models/discount_factor_curve_data.py +3 -3
- lusid/models/dividend_option_event.py +129 -0
- lusid/models/dividend_reinvestment_event.py +124 -0
- lusid/models/election_specification.py +73 -0
- lusid/models/eligibility_calculation.py +71 -0
- lusid/models/empty_model_options.py +3 -3
- lusid/models/equity.py +8 -6
- lusid/models/equity_curve_by_prices_data.py +3 -3
- lusid/models/equity_model_options.py +3 -3
- lusid/models/equity_option.py +3 -3
- lusid/models/equity_swap.py +4 -4
- lusid/models/equity_vol_surface_data.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- lusid/models/exercise_event.py +5 -7
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/expiry_event.py +91 -0
- lusid/models/filter_predicate_compliance_parameter.py +91 -0
- lusid/models/filter_step.py +101 -0
- lusid/models/fixed_leg.py +3 -3
- lusid/models/fixed_schedule.py +4 -9
- lusid/models/flexible_loan.py +105 -0
- lusid/models/float_schedule.py +20 -12
- lusid/models/floating_leg.py +3 -3
- lusid/models/flow_convention_name.py +1 -1
- lusid/models/flow_conventions.py +1 -1
- lusid/models/forward_rate_agreement.py +3 -3
- lusid/models/from_recipe.py +81 -0
- lusid/models/fund.py +182 -0
- lusid/models/fund_properties.py +115 -0
- lusid/models/fund_request.py +165 -0
- lusid/models/fund_share_class.py +99 -0
- lusid/models/funding_leg.py +3 -3
- lusid/models/funding_leg_options.py +3 -3
- lusid/models/future.py +3 -3
- lusid/models/fx_conventions.py +73 -0
- lusid/models/fx_forward.py +8 -6
- lusid/models/fx_forward_curve_by_quote_reference.py +4 -4
- lusid/models/fx_forward_curve_data.py +3 -3
- lusid/models/fx_forward_model_options.py +3 -3
- lusid/models/fx_forward_pips_curve_data.py +3 -3
- lusid/models/fx_forward_settlement_event.py +136 -0
- lusid/models/fx_forward_tenor_curve_data.py +4 -4
- lusid/models/fx_forward_tenor_pips_curve_data.py +4 -4
- lusid/models/fx_linked_notional_schedule.py +108 -0
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_rate_schedule.py +3 -3
- lusid/models/fx_swap.py +4 -4
- lusid/models/fx_vol_surface_data.py +3 -3
- lusid/models/{reconciliation_run.py → get_recipe_composer_response.py} +15 -15
- lusid/models/group_by_selector_compliance_parameter.py +91 -0
- lusid/models/group_by_step.py +101 -0
- lusid/models/group_filter_predicate_compliance_parameter.py +91 -0
- lusid/models/group_filter_step.py +110 -0
- lusid/models/group_of_market_data_key_rules.py +79 -0
- lusid/models/index_convention.py +1 -1
- lusid/models/index_model_options.py +3 -3
- lusid/models/inflation_index_conventions.py +2 -2
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +3 -3
- lusid/models/inflation_swap.py +4 -4
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +4 -6
- lusid/models/instrument_event.py +13 -5
- lusid/models/instrument_event_configuration.py +74 -0
- lusid/models/instrument_event_holder.py +12 -3
- lusid/models/instrument_event_type.py +8 -0
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_list_compliance_parameter.py +3 -3
- lusid/models/instrument_payment_diary_leg.py +5 -3
- lusid/models/instrument_resolution_detail.py +105 -0
- lusid/models/instrument_type.py +2 -0
- lusid/models/interest_rate_swap.py +4 -4
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/intermediate_compliance_step.py +110 -0
- lusid/models/ir_vol_cube_data.py +3 -3
- lusid/models/journal_entry_line.py +34 -3
- lusid/models/journal_entry_lines_query_parameters.py +1 -1
- lusid/models/label_value_set.py +1 -1
- lusid/models/leg_definition.py +16 -3
- lusid/models/lineage_member.py +87 -0
- lusid/models/lock_period_diary_entry_request.py +91 -0
- lusid/models/lusid_instrument.py +7 -5
- lusid/models/lusid_trade_ticket.py +8 -1
- lusid/models/market_context.py +17 -2
- lusid/models/market_data_type.py +1 -0
- lusid/models/maturity_event.py +91 -0
- lusid/models/model_options.py +5 -6
- lusid/models/model_options_type.py +0 -1
- lusid/models/model_selection.py +3 -3
- lusid/models/move_orders_to_different_blocks_request.py +77 -0
- lusid/models/moved_order_to_different_block_response.py +85 -0
- lusid/models/movement_type.py +2 -0
- lusid/models/multi_currency_amounts.py +71 -0
- lusid/models/opaque_market_data.py +3 -3
- lusid/models/opaque_model_options.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/optionality_schedule.py +3 -3
- lusid/models/order_graph_block.py +4 -2
- lusid/models/order_graph_block_order_detail.py +16 -2
- lusid/models/output_transaction.py +9 -2
- lusid/models/paged_resource_list_of_cleardown_module_response.py +113 -0
- lusid/models/{paged_resource_list_of_reconciliation_run_break.py → paged_resource_list_of_cleardown_module_rule.py} +11 -11
- lusid/models/{paged_resource_list_of_reconciliation_run.py → paged_resource_list_of_fund.py} +11 -11
- lusid/models/paged_resource_list_of_property_definition.py +113 -0
- lusid/models/paged_resource_list_of_staging_rule_set.py +113 -0
- lusid/models/paged_resource_list_of_transaction_template.py +113 -0
- lusid/models/paged_resource_list_of_transaction_template_specification.py +113 -0
- lusid/models/participation_request.py +3 -9
- lusid/models/performance_returns_metric.py +1 -1
- lusid/models/period_diary_entries_reopened_response.py +104 -0
- lusid/models/place_blocks_request.py +77 -0
- lusid/models/portfolio.py +15 -2
- lusid/models/portfolio_details.py +15 -2
- lusid/models/portfolio_group_id_compliance_parameter.py +3 -3
- lusid/models/portfolio_group_id_list_compliance_parameter.py +3 -3
- lusid/models/portfolio_holding.py +27 -2
- lusid/models/portfolio_id_compliance_parameter.py +3 -3
- lusid/models/portfolio_id_list_compliance_parameter.py +3 -3
- lusid/models/posting_module_rule.py +29 -4
- lusid/models/pricing_model.py +2 -1
- lusid/models/property_definition.py +17 -4
- lusid/models/property_definition_search_result.py +3 -3
- lusid/models/property_domain.py +3 -0
- lusid/models/property_key_compliance_parameter.py +3 -3
- lusid/models/property_key_list_compliance_parameter.py +3 -3
- lusid/models/queryable_key.py +124 -0
- lusid/models/raw_vendor_event.py +5 -7
- lusid/models/re_open_period_diary_entry_request.py +84 -0
- lusid/models/recipe_block.py +87 -0
- lusid/models/recipe_composer.py +100 -0
- lusid/models/{reconciliation_break_id.py → recipe_value.py} +22 -23
- lusid/models/recombine_step.py +101 -0
- lusid/models/reference_instrument.py +3 -3
- lusid/models/relative_date_offset.py +71 -0
- lusid/models/repo.py +3 -3
- lusid/models/reset_event.py +4 -6
- lusid/models/resource_list_of_block_and_orders.py +113 -0
- lusid/models/resource_list_of_get_recipe_composer_response.py +113 -0
- lusid/models/resource_list_of_moved_order_to_different_block_response.py +113 -0
- lusid/models/resource_list_of_queryable_key.py +113 -0
- lusid/models/schedule.py +6 -5
- lusid/models/schedule_type.py +1 -0
- lusid/models/script_map_reference.py +94 -0
- lusid/models/security_election.py +86 -0
- lusid/models/set_share_class_instruments_request.py +79 -0
- lusid/models/side_definition.py +1 -8
- lusid/models/sides_definition_request.py +1 -8
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/staging_rule.py +90 -0
- lusid/models/staging_rule_approval_criteria.py +81 -0
- lusid/models/staging_rule_match_criteria.py +95 -0
- lusid/models/staging_rule_set.py +103 -0
- lusid/models/step_schedule.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/string_compliance_parameter.py +3 -3
- lusid/models/string_list_compliance_parameter.py +3 -3
- lusid/models/template_field.py +77 -0
- lusid/models/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +16 -16
- lusid/models/transaction_configuration_movement_data.py +3 -3
- lusid/models/transaction_configuration_movement_data_request.py +3 -3
- lusid/models/transaction_currency_and_amount.py +81 -0
- lusid/models/transaction_field_map.py +97 -0
- lusid/models/transaction_price.py +3 -3
- lusid/models/transaction_price_and_type.py +81 -0
- lusid/models/transaction_price_type.py +1 -0
- lusid/models/transaction_property_map.py +80 -0
- lusid/models/transaction_template.py +100 -0
- lusid/models/transaction_template_request.py +79 -0
- lusid/models/transaction_template_specification.py +99 -0
- lusid/models/transaction_type_alias.py +0 -7
- lusid/models/transaction_type_calculation.py +1 -1
- lusid/models/transition_event.py +3 -3
- lusid/models/translation_context.py +75 -0
- lusid/models/translation_script.py +9 -3
- lusid/models/trial_balance.py +46 -11
- lusid/models/trial_balance_query_parameters.py +15 -6
- lusid/models/trigger_event.py +3 -3
- lusid/models/units_ratio.py +71 -0
- lusid/models/update_staging_rule_set_request.py +91 -0
- lusid/models/{compliance_run_summary.py → upsert_compliance_run_summary_result.py} +8 -8
- lusid/models/upsert_dialect_request.py +79 -0
- lusid/models/upsert_instrument_event_request.py +12 -3
- lusid/models/upsert_quote_request.py +1 -1
- lusid/models/upsert_recipe_composer_request.py +73 -0
- lusid/models/upsert_recipe_request.py +3 -9
- lusid/models/upsert_translation_script_request.py +75 -0
- lusid/models/valuation_schedule.py +10 -3
- lusid/models/weighted_instrument.py +13 -2
- lusid/models/weighted_instrument_in_line_lookup_identifiers.py +89 -0
- lusid/models/yield_curve_data.py +3 -3
- lusid/rest.py +1 -1
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.470.dist-info}/METADATA +245 -48
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.470.dist-info}/RECORD +326 -235
- {lusid_sdk-2.0.50b0.dist-info → lusid_sdk-2.0.470.dist-info}/WHEEL +1 -1
- lusid/extensions/api_client_builder.py +0 -138
- lusid/models/configuration_recipe_snippet.py +0 -139
- lusid/models/je_lines_query_parameters.py +0 -105
- lusid/models/look_up_pricing_model_options.py +0 -93
- lusid/models/reconciliation_run_id.py +0 -85
- lusid/models/upsert_reconciliation_break_request.py +0 -98
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict
|
|
22
|
+
from pydantic import BaseModel, Field, constr
|
|
23
|
+
from lusid.models.compliance_summary_rule_result import ComplianceSummaryRuleResult
|
|
24
|
+
from lusid.models.resource_id import ResourceId
|
|
25
|
+
|
|
26
|
+
class ComplianceRuleResultV2(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ComplianceRuleResultV2
|
|
29
|
+
"""
|
|
30
|
+
run_id: ResourceId = Field(..., alias="runId")
|
|
31
|
+
instigated_at: datetime = Field(..., alias="instigatedAt")
|
|
32
|
+
completed_at: datetime = Field(..., alias="completedAt")
|
|
33
|
+
schedule: constr(strict=True, min_length=1) = Field(...)
|
|
34
|
+
rule_result: ComplianceSummaryRuleResult = Field(..., alias="ruleResult")
|
|
35
|
+
__properties = ["runId", "instigatedAt", "completedAt", "schedule", "ruleResult"]
|
|
36
|
+
|
|
37
|
+
class Config:
|
|
38
|
+
"""Pydantic configuration"""
|
|
39
|
+
allow_population_by_field_name = True
|
|
40
|
+
validate_assignment = True
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> ComplianceRuleResultV2:
|
|
52
|
+
"""Create an instance of ComplianceRuleResultV2 from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self):
|
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
57
|
+
_dict = self.dict(by_alias=True,
|
|
58
|
+
exclude={
|
|
59
|
+
},
|
|
60
|
+
exclude_none=True)
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of run_id
|
|
62
|
+
if self.run_id:
|
|
63
|
+
_dict['runId'] = self.run_id.to_dict()
|
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of rule_result
|
|
65
|
+
if self.rule_result:
|
|
66
|
+
_dict['ruleResult'] = self.rule_result.to_dict()
|
|
67
|
+
return _dict
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls, obj: dict) -> ComplianceRuleResultV2:
|
|
71
|
+
"""Create an instance of ComplianceRuleResultV2 from a dict"""
|
|
72
|
+
if obj is None:
|
|
73
|
+
return None
|
|
74
|
+
|
|
75
|
+
if not isinstance(obj, dict):
|
|
76
|
+
return ComplianceRuleResultV2.parse_obj(obj)
|
|
77
|
+
|
|
78
|
+
_obj = ComplianceRuleResultV2.parse_obj({
|
|
79
|
+
"run_id": ResourceId.from_dict(obj.get("runId")) if obj.get("runId") is not None else None,
|
|
80
|
+
"instigated_at": obj.get("instigatedAt"),
|
|
81
|
+
"completed_at": obj.get("completedAt"),
|
|
82
|
+
"schedule": obj.get("schedule"),
|
|
83
|
+
"rule_result": ComplianceSummaryRuleResult.from_dict(obj.get("ruleResult")) if obj.get("ruleResult") is not None else None
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Union
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, validator
|
|
23
|
+
import lusid.models
|
|
24
|
+
|
|
25
|
+
class ComplianceStep(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ComplianceStep
|
|
28
|
+
"""
|
|
29
|
+
compliance_step_type: StrictStr = Field(..., alias="complianceStepType", description=". The available values are: FilterStep, GroupByStep, GroupFilterStep, BranchStep, RecombineStep, CheckStep")
|
|
30
|
+
__properties = ["complianceStepType"]
|
|
31
|
+
|
|
32
|
+
@validator('compliance_step_type')
|
|
33
|
+
def compliance_step_type_validate_enum(cls, value):
|
|
34
|
+
"""Validates the enum"""
|
|
35
|
+
if value not in ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep'):
|
|
36
|
+
raise ValueError("must be one of enum values ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep')")
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
"""Pydantic configuration"""
|
|
41
|
+
allow_population_by_field_name = True
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
# JSON field name that stores the object type
|
|
45
|
+
__discriminator_property_name = 'complianceStepType'
|
|
46
|
+
|
|
47
|
+
# discriminator mappings
|
|
48
|
+
__discriminator_value_class_map = {
|
|
49
|
+
'BranchStep': 'BranchStep',
|
|
50
|
+
'CheckStep': 'CheckStep',
|
|
51
|
+
'FilterStep': 'FilterStep',
|
|
52
|
+
'GroupByStep': 'GroupByStep',
|
|
53
|
+
'GroupFilterStep': 'GroupFilterStep',
|
|
54
|
+
'IntermediateComplianceStep': 'IntermediateComplianceStep',
|
|
55
|
+
'RecombineStep': 'RecombineStep'
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def get_discriminator_value(cls, obj: dict) -> str:
|
|
60
|
+
"""Returns the discriminator value (object type) of the data"""
|
|
61
|
+
discriminator_value = obj[cls.__discriminator_property_name]
|
|
62
|
+
if discriminator_value:
|
|
63
|
+
return cls.__discriminator_value_class_map.get(discriminator_value)
|
|
64
|
+
else:
|
|
65
|
+
return None
|
|
66
|
+
|
|
67
|
+
def to_str(self) -> str:
|
|
68
|
+
"""Returns the string representation of the model using alias"""
|
|
69
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
70
|
+
|
|
71
|
+
def to_json(self) -> str:
|
|
72
|
+
"""Returns the JSON representation of the model using alias"""
|
|
73
|
+
return json.dumps(self.to_dict())
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_json(cls, json_str: str) -> Union(BranchStep, CheckStep, FilterStep, GroupByStep, GroupFilterStep, IntermediateComplianceStep, RecombineStep):
|
|
77
|
+
"""Create an instance of ComplianceStep from a JSON string"""
|
|
78
|
+
return cls.from_dict(json.loads(json_str))
|
|
79
|
+
|
|
80
|
+
def to_dict(self):
|
|
81
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
82
|
+
_dict = self.dict(by_alias=True,
|
|
83
|
+
exclude={
|
|
84
|
+
},
|
|
85
|
+
exclude_none=True)
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: dict) -> Union(BranchStep, CheckStep, FilterStep, GroupByStep, GroupFilterStep, IntermediateComplianceStep, RecombineStep):
|
|
90
|
+
"""Create an instance of ComplianceStep from a dict"""
|
|
91
|
+
# look up the object type based on discriminator mapping
|
|
92
|
+
object_type = cls.get_discriminator_value(obj)
|
|
93
|
+
if object_type:
|
|
94
|
+
klass = getattr(lusid.models, object_type)
|
|
95
|
+
return klass.from_dict(obj)
|
|
96
|
+
else:
|
|
97
|
+
raise ValueError("ComplianceStep failed to lookup discriminator value from " +
|
|
98
|
+
json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name +
|
|
99
|
+
", mapping: " + json.dumps(cls.__discriminator_value_class_map))
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
from aenum import Enum, no_arg
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ComplianceStepType(str, Enum):
|
|
25
|
+
"""
|
|
26
|
+
ComplianceStepType
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
allowed enum values
|
|
31
|
+
"""
|
|
32
|
+
FILTERSTEP = 'FilterStep'
|
|
33
|
+
GROUPBYSTEP = 'GroupByStep'
|
|
34
|
+
GROUPFILTERSTEP = 'GroupFilterStep'
|
|
35
|
+
BRANCHSTEP = 'BranchStep'
|
|
36
|
+
RECOMBINESTEP = 'RecombineStep'
|
|
37
|
+
CHECKSTEP = 'CheckStep'
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_json(cls, json_str: str) -> ComplianceStepType:
|
|
41
|
+
"""Create an instance of ComplianceStepType from a JSON string"""
|
|
42
|
+
return ComplianceStepType(json.loads(json_str))
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, List
|
|
22
|
-
from pydantic import BaseModel, Field, conlist, constr
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, conlist, constr
|
|
23
23
|
from lusid.models.compliance_rule_breakdown import ComplianceRuleBreakdown
|
|
24
24
|
from lusid.models.resource_id import ResourceId
|
|
25
25
|
|
|
@@ -33,8 +33,9 @@ class ComplianceSummaryRuleResult(BaseModel):
|
|
|
33
33
|
rule_status: constr(strict=True, min_length=1) = Field(..., alias="ruleStatus")
|
|
34
34
|
affected_portfolios: conlist(ResourceId) = Field(..., alias="affectedPortfolios")
|
|
35
35
|
affected_orders: conlist(ResourceId) = Field(..., alias="affectedOrders")
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
parameters_used: Dict[str, StrictStr] = Field(..., alias="parametersUsed")
|
|
37
|
+
rule_breakdown: conlist(ComplianceRuleBreakdown) = Field(..., alias="ruleBreakdown")
|
|
38
|
+
__properties = ["ruleId", "templateId", "variation", "ruleStatus", "affectedPortfolios", "affectedOrders", "parametersUsed", "ruleBreakdown"]
|
|
38
39
|
|
|
39
40
|
class Config:
|
|
40
41
|
"""Pydantic configuration"""
|
|
@@ -80,13 +81,13 @@ class ComplianceSummaryRuleResult(BaseModel):
|
|
|
80
81
|
if _item:
|
|
81
82
|
_items.append(_item.to_dict())
|
|
82
83
|
_dict['affectedOrders'] = _items
|
|
83
|
-
# override the default output from pydantic by calling `to_dict()` of each
|
|
84
|
-
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rule_breakdown (list)
|
|
85
|
+
_items = []
|
|
85
86
|
if self.rule_breakdown:
|
|
86
|
-
for
|
|
87
|
-
if
|
|
88
|
-
|
|
89
|
-
_dict['ruleBreakdown'] =
|
|
87
|
+
for _item in self.rule_breakdown:
|
|
88
|
+
if _item:
|
|
89
|
+
_items.append(_item.to_dict())
|
|
90
|
+
_dict['ruleBreakdown'] = _items
|
|
90
91
|
return _dict
|
|
91
92
|
|
|
92
93
|
@classmethod
|
|
@@ -105,11 +106,7 @@ class ComplianceSummaryRuleResult(BaseModel):
|
|
|
105
106
|
"rule_status": obj.get("ruleStatus"),
|
|
106
107
|
"affected_portfolios": [ResourceId.from_dict(_item) for _item in obj.get("affectedPortfolios")] if obj.get("affectedPortfolios") is not None else None,
|
|
107
108
|
"affected_orders": [ResourceId.from_dict(_item) for _item in obj.get("affectedOrders")] if obj.get("affectedOrders") is not None else None,
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
for _k, _v in obj.get("ruleBreakdown").items()
|
|
111
|
-
)
|
|
112
|
-
if obj.get("ruleBreakdown") is not None
|
|
113
|
-
else None
|
|
109
|
+
"parameters_used": obj.get("parametersUsed"),
|
|
110
|
+
"rule_breakdown": [ComplianceRuleBreakdown.from_dict(_item) for _item in obj.get("ruleBreakdown")] if obj.get("ruleBreakdown") is not None else None
|
|
114
111
|
})
|
|
115
112
|
return _obj
|
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, List
|
|
22
|
-
from pydantic import BaseModel, Field, conlist, constr
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, conlist, constr
|
|
23
23
|
from lusid.models.compliance_rule_breakdown_request import ComplianceRuleBreakdownRequest
|
|
24
24
|
from lusid.models.resource_id import ResourceId
|
|
25
25
|
|
|
@@ -33,8 +33,9 @@ class ComplianceSummaryRuleResultRequest(BaseModel):
|
|
|
33
33
|
rule_status: constr(strict=True, max_length=6000, min_length=0) = Field(..., alias="ruleStatus")
|
|
34
34
|
affected_portfolios: conlist(ResourceId) = Field(..., alias="affectedPortfolios")
|
|
35
35
|
affected_orders: conlist(ResourceId) = Field(..., alias="affectedOrders")
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
parameters_used: Dict[str, StrictStr] = Field(..., alias="parametersUsed")
|
|
37
|
+
rule_breakdown: conlist(ComplianceRuleBreakdownRequest) = Field(..., alias="ruleBreakdown")
|
|
38
|
+
__properties = ["ruleId", "templateId", "variation", "ruleStatus", "affectedPortfolios", "affectedOrders", "parametersUsed", "ruleBreakdown"]
|
|
38
39
|
|
|
39
40
|
class Config:
|
|
40
41
|
"""Pydantic configuration"""
|
|
@@ -80,13 +81,13 @@ class ComplianceSummaryRuleResultRequest(BaseModel):
|
|
|
80
81
|
if _item:
|
|
81
82
|
_items.append(_item.to_dict())
|
|
82
83
|
_dict['affectedOrders'] = _items
|
|
83
|
-
# override the default output from pydantic by calling `to_dict()` of each
|
|
84
|
-
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rule_breakdown (list)
|
|
85
|
+
_items = []
|
|
85
86
|
if self.rule_breakdown:
|
|
86
|
-
for
|
|
87
|
-
if
|
|
88
|
-
|
|
89
|
-
_dict['ruleBreakdown'] =
|
|
87
|
+
for _item in self.rule_breakdown:
|
|
88
|
+
if _item:
|
|
89
|
+
_items.append(_item.to_dict())
|
|
90
|
+
_dict['ruleBreakdown'] = _items
|
|
90
91
|
return _dict
|
|
91
92
|
|
|
92
93
|
@classmethod
|
|
@@ -105,11 +106,7 @@ class ComplianceSummaryRuleResultRequest(BaseModel):
|
|
|
105
106
|
"rule_status": obj.get("ruleStatus"),
|
|
106
107
|
"affected_portfolios": [ResourceId.from_dict(_item) for _item in obj.get("affectedPortfolios")] if obj.get("affectedPortfolios") is not None else None,
|
|
107
108
|
"affected_orders": [ResourceId.from_dict(_item) for _item in obj.get("affectedOrders")] if obj.get("affectedOrders") is not None else None,
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
for _k, _v in obj.get("ruleBreakdown").items()
|
|
111
|
-
)
|
|
112
|
-
if obj.get("ruleBreakdown") is not None
|
|
113
|
-
else None
|
|
109
|
+
"parameters_used": obj.get("parametersUsed"),
|
|
110
|
+
"rule_breakdown": [ComplianceRuleBreakdownRequest.from_dict(_item) for _item in obj.get("ruleBreakdown")] if obj.get("ruleBreakdown") is not None else None
|
|
114
111
|
})
|
|
115
112
|
return _obj
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, List
|
|
22
22
|
from pydantic import BaseModel, Field, conlist, constr
|
|
23
|
+
from lusid.models.compliance_step import ComplianceStep
|
|
23
24
|
from lusid.models.compliance_template_parameter import ComplianceTemplateParameter
|
|
24
25
|
from lusid.models.perpetual_property import PerpetualProperty
|
|
25
26
|
from lusid.models.resource_id import ResourceId
|
|
@@ -33,7 +34,8 @@ class ComplianceTemplateVariation(BaseModel):
|
|
|
33
34
|
required_parameters: conlist(ComplianceTemplateParameter) = Field(..., alias="requiredParameters", description="A parameter required by a Compliance Template Variation")
|
|
34
35
|
properties: Dict[str, PerpetualProperty] = Field(..., description="Properties associated with the Compliance Template Variation")
|
|
35
36
|
accepted_address_keys: ResourceId = Field(..., alias="acceptedAddressKeys")
|
|
36
|
-
|
|
37
|
+
steps: conlist(ComplianceStep) = Field(..., description="The steps expressed in this template, with their required parameters")
|
|
38
|
+
__properties = ["label", "description", "requiredParameters", "properties", "acceptedAddressKeys", "steps"]
|
|
37
39
|
|
|
38
40
|
class Config:
|
|
39
41
|
"""Pydantic configuration"""
|
|
@@ -76,6 +78,13 @@ class ComplianceTemplateVariation(BaseModel):
|
|
|
76
78
|
# override the default output from pydantic by calling `to_dict()` of accepted_address_keys
|
|
77
79
|
if self.accepted_address_keys:
|
|
78
80
|
_dict['acceptedAddressKeys'] = self.accepted_address_keys.to_dict()
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in steps (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.steps:
|
|
84
|
+
for _item in self.steps:
|
|
85
|
+
if _item:
|
|
86
|
+
_items.append(_item.to_dict())
|
|
87
|
+
_dict['steps'] = _items
|
|
79
88
|
return _dict
|
|
80
89
|
|
|
81
90
|
@classmethod
|
|
@@ -97,6 +106,7 @@ class ComplianceTemplateVariation(BaseModel):
|
|
|
97
106
|
)
|
|
98
107
|
if obj.get("properties") is not None
|
|
99
108
|
else None,
|
|
100
|
-
"accepted_address_keys": ResourceId.from_dict(obj.get("acceptedAddressKeys")) if obj.get("acceptedAddressKeys") is not None else None
|
|
109
|
+
"accepted_address_keys": ResourceId.from_dict(obj.get("acceptedAddressKeys")) if obj.get("acceptedAddressKeys") is not None else None,
|
|
110
|
+
"steps": [ComplianceStep.from_dict(_item) for _item in obj.get("steps")] if obj.get("steps") is not None else None
|
|
101
111
|
})
|
|
102
112
|
return _obj
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic import BaseModel, Field, conlist, constr
|
|
23
|
+
from lusid.models.transaction_field_map import TransactionFieldMap
|
|
24
|
+
from lusid.models.transaction_property_map import TransactionPropertyMap
|
|
25
|
+
|
|
26
|
+
class ComponentTransaction(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ComponentTransaction
|
|
29
|
+
"""
|
|
30
|
+
display_name: constr(strict=True, max_length=100, min_length=0) = Field(..., alias="displayName")
|
|
31
|
+
condition: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
|
|
32
|
+
transaction_field_map: TransactionFieldMap = Field(..., alias="transactionFieldMap")
|
|
33
|
+
transaction_property_map: conlist(TransactionPropertyMap) = Field(..., alias="transactionPropertyMap")
|
|
34
|
+
__properties = ["displayName", "condition", "transactionFieldMap", "transactionPropertyMap"]
|
|
35
|
+
|
|
36
|
+
class Config:
|
|
37
|
+
"""Pydantic configuration"""
|
|
38
|
+
allow_population_by_field_name = True
|
|
39
|
+
validate_assignment = True
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> ComponentTransaction:
|
|
51
|
+
"""Create an instance of ComponentTransaction from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self):
|
|
55
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
56
|
+
_dict = self.dict(by_alias=True,
|
|
57
|
+
exclude={
|
|
58
|
+
},
|
|
59
|
+
exclude_none=True)
|
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of transaction_field_map
|
|
61
|
+
if self.transaction_field_map:
|
|
62
|
+
_dict['transactionFieldMap'] = self.transaction_field_map.to_dict()
|
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each item in transaction_property_map (list)
|
|
64
|
+
_items = []
|
|
65
|
+
if self.transaction_property_map:
|
|
66
|
+
for _item in self.transaction_property_map:
|
|
67
|
+
if _item:
|
|
68
|
+
_items.append(_item.to_dict())
|
|
69
|
+
_dict['transactionPropertyMap'] = _items
|
|
70
|
+
# set to None if condition (nullable) is None
|
|
71
|
+
# and __fields_set__ contains the field
|
|
72
|
+
if self.condition is None and "condition" in self.__fields_set__:
|
|
73
|
+
_dict['condition'] = None
|
|
74
|
+
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: dict) -> ComponentTransaction:
|
|
79
|
+
"""Create an instance of ComponentTransaction from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return ComponentTransaction.parse_obj(obj)
|
|
85
|
+
|
|
86
|
+
_obj = ComponentTransaction.parse_obj({
|
|
87
|
+
"display_name": obj.get("displayName"),
|
|
88
|
+
"condition": obj.get("condition"),
|
|
89
|
+
"transaction_field_map": TransactionFieldMap.from_dict(obj.get("transactionFieldMap")) if obj.get("transactionFieldMap") is not None else None,
|
|
90
|
+
"transaction_property_map": [TransactionPropertyMap.from_dict(_item) for _item in obj.get("transactionPropertyMap")] if obj.get("transactionPropertyMap") is not None else None
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
@@ -27,11 +27,11 @@ class CompositeDispersion(BaseModel):
|
|
|
27
27
|
A list of Dispersion calculations for the given years. # noqa: E501
|
|
28
28
|
"""
|
|
29
29
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The date for which dipsersion calculation has been done. This should be 31 Dec for each given year.")
|
|
30
|
-
dispersion_calculation: Union[StrictFloat, StrictInt] = Field(
|
|
31
|
-
variance: Union[StrictFloat, StrictInt] = Field(
|
|
32
|
-
first_quartile: Union[StrictFloat, StrictInt] = Field(
|
|
33
|
-
third_quartile: Union[StrictFloat, StrictInt] = Field(
|
|
34
|
-
range: Union[StrictFloat, StrictInt] = Field(
|
|
30
|
+
dispersion_calculation: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="dispersionCalculation", description="The result for the dispersion calculation on the given effectiveAt.")
|
|
31
|
+
variance: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The variance on the given effectiveAt.")
|
|
32
|
+
first_quartile: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="firstQuartile", description="First Quartile (Q1) = (lower quartile) = the middle of the bottom half of the returns.")
|
|
33
|
+
third_quartile: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="thirdQuartile", description="Third Quartile (Q3) = (higher quartile) = the middle of the top half of the returns.")
|
|
34
|
+
range: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Highest return - Lowest return.")
|
|
35
35
|
constituents_in_scope: Optional[conlist(ResourceId)] = Field(None, alias="constituentsInScope", description="List containing Composite members which are part of the dispersion calcualtion.")
|
|
36
36
|
constituents_excluded: Optional[conlist(ResourceId)] = Field(None, alias="constituentsExcluded", description="List containing the Composite members which are not part of the dispersion calculation")
|
|
37
37
|
__properties = ["effectiveAt", "dispersionCalculation", "variance", "firstQuartile", "thirdQuartile", "range", "constituentsInScope", "constituentsExcluded"]
|
|
@@ -74,6 +74,31 @@ class CompositeDispersion(BaseModel):
|
|
|
74
74
|
if _item:
|
|
75
75
|
_items.append(_item.to_dict())
|
|
76
76
|
_dict['constituentsExcluded'] = _items
|
|
77
|
+
# set to None if dispersion_calculation (nullable) is None
|
|
78
|
+
# and __fields_set__ contains the field
|
|
79
|
+
if self.dispersion_calculation is None and "dispersion_calculation" in self.__fields_set__:
|
|
80
|
+
_dict['dispersionCalculation'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if variance (nullable) is None
|
|
83
|
+
# and __fields_set__ contains the field
|
|
84
|
+
if self.variance is None and "variance" in self.__fields_set__:
|
|
85
|
+
_dict['variance'] = None
|
|
86
|
+
|
|
87
|
+
# set to None if first_quartile (nullable) is None
|
|
88
|
+
# and __fields_set__ contains the field
|
|
89
|
+
if self.first_quartile is None and "first_quartile" in self.__fields_set__:
|
|
90
|
+
_dict['firstQuartile'] = None
|
|
91
|
+
|
|
92
|
+
# set to None if third_quartile (nullable) is None
|
|
93
|
+
# and __fields_set__ contains the field
|
|
94
|
+
if self.third_quartile is None and "third_quartile" in self.__fields_set__:
|
|
95
|
+
_dict['thirdQuartile'] = None
|
|
96
|
+
|
|
97
|
+
# set to None if range (nullable) is None
|
|
98
|
+
# and __fields_set__ contains the field
|
|
99
|
+
if self.range is None and "range" in self.__fields_set__:
|
|
100
|
+
_dict['range'] = None
|
|
101
|
+
|
|
77
102
|
# set to None if constituents_in_scope (nullable) is None
|
|
78
103
|
# and __fields_set__ contains the field
|
|
79
104
|
if self.constituents_in_scope is None and "constituents_in_scope" in self.__fields_set__:
|
lusid/models/compounding.py
CHANGED
|
@@ -25,12 +25,12 @@ class Compounding(BaseModel):
|
|
|
25
25
|
"""
|
|
26
26
|
The compounding settings used on interest rate. # noqa: E501
|
|
27
27
|
"""
|
|
28
|
-
averaging_method: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="averagingMethod", description="Defines whether a weighted or unweighted average is used when calculating the average rate. It applies only when CompoundingMethod = ‘
|
|
28
|
+
averaging_method: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="averagingMethod", description="Defines whether a weighted or unweighted average is used when calculating the average rate. It applies only when CompoundingMethod = ‘Averaging‘. Supported string (enumeration) values are: [Unweighted, Weighted].")
|
|
29
29
|
calculation_shift_method: Optional[StrictStr] = Field(None, alias="calculationShiftMethod", description="Defines which resets and day counts are used for the rate calculation Supported string (enumeration) values are: [Lookback, NoShift, ObservationPeriodShift, Lockout].")
|
|
30
|
-
compounding_method: constr(strict=True, min_length=1) = Field(..., alias="compoundingMethod", description="If the interest rate is simple, compounded or using a pre-computed compounded index. Supported string (enumeration) values are: [
|
|
31
|
-
reset_frequency: constr(strict=True, min_length=1) = Field(..., alias="resetFrequency", description="The interest payment frequency.")
|
|
30
|
+
compounding_method: constr(strict=True, min_length=1) = Field(..., alias="compoundingMethod", description="If the interest rate is simple, compounded or using a pre-computed compounded index. Supported string (enumeration) values are: [Averaging, Compounding, CompoundedIndex].")
|
|
31
|
+
reset_frequency: constr(strict=True, min_length=1) = Field(..., alias="resetFrequency", description="The interest payment frequency. For more information on tenors, see [knowledge base article KA-02097](https://support.lusid.com/knowledgebase/article/KA-02097)")
|
|
32
32
|
shift: Optional[StrictInt] = Field(None, description="Defines the number of days to lockout or shift observation period by - should be a non-negative integer")
|
|
33
|
-
spread_compounding_method: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="spreadCompoundingMethod", description="Defines how the computed leg spread is applied to compounded rate. It applies only when CompoundingMethod = ‘
|
|
33
|
+
spread_compounding_method: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="spreadCompoundingMethod", description="Defines how the computed leg spread is applied to compounded rate. It applies only when CompoundingMethod = ‘Compounding‘ or ‘CompoundedIndex‘. Available compounding methods: | Method | Description | | ------ | ----------- | | Straight | Compounding rate in each compound period includes the spread. | | Flat | Compounding rate does not include the spread, and the spread is used for simple interest in each compound period. | | SpreadExclusive | Compounding rate does not include the spread, and the spread is used for simple interest for whole accrual period. | The values \"IsdaCompounding\", \"NoCompounding\", \"IsdaFlatCompounding\", and \"None\" are accepted for compatibility with existing instruments and their use is discouraged. Supported string (enumeration) values are: [Straight, IsdaCompounding, NoCompounding, SpreadExclusive, IsdaFlatCompounding, Flat, None].")
|
|
34
34
|
__properties = ["averagingMethod", "calculationShiftMethod", "compoundingMethod", "resetFrequency", "shift", "spreadCompoundingMethod"]
|
|
35
35
|
|
|
36
36
|
class Config:
|
|
@@ -18,13 +18,13 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
from typing import Any, Dict,
|
|
22
|
-
from pydantic import BaseModel, Field,
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic import BaseModel, Field, constr, validator
|
|
23
23
|
from lusid.models.aggregation_context import AggregationContext
|
|
24
24
|
from lusid.models.holding_context import HoldingContext
|
|
25
25
|
from lusid.models.market_context import MarketContext
|
|
26
26
|
from lusid.models.pricing_context import PricingContext
|
|
27
|
-
from lusid.models.
|
|
27
|
+
from lusid.models.translation_context import TranslationContext
|
|
28
28
|
|
|
29
29
|
class ConfigurationRecipe(BaseModel):
|
|
30
30
|
"""
|
|
@@ -35,10 +35,10 @@ class ConfigurationRecipe(BaseModel):
|
|
|
35
35
|
market: Optional[MarketContext] = None
|
|
36
36
|
pricing: Optional[PricingContext] = None
|
|
37
37
|
aggregation: Optional[AggregationContext] = None
|
|
38
|
-
inherited_recipes: Optional[conlist(ResourceId)] = Field(None, alias="inheritedRecipes", description="A list of parent recipes (scope,code) that can be used to share functionality between recipes. For instance one might use common recipes to set up pricing for individual asset classes, e.g. rates or credit, and then combine them into a single recipe to be used by an exotics desk in conjunction with some overrides that it requires for models or other pricing options.")
|
|
39
38
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="User can assign a description to understand more humanly the recipe.")
|
|
40
39
|
holding: Optional[HoldingContext] = None
|
|
41
|
-
|
|
40
|
+
translation: Optional[TranslationContext] = None
|
|
41
|
+
__properties = ["scope", "code", "market", "pricing", "aggregation", "description", "holding", "translation"]
|
|
42
42
|
|
|
43
43
|
@validator('scope')
|
|
44
44
|
def scope_validate_regular_expression(cls, value):
|
|
@@ -97,21 +97,12 @@ class ConfigurationRecipe(BaseModel):
|
|
|
97
97
|
# override the default output from pydantic by calling `to_dict()` of aggregation
|
|
98
98
|
if self.aggregation:
|
|
99
99
|
_dict['aggregation'] = self.aggregation.to_dict()
|
|
100
|
-
# override the default output from pydantic by calling `to_dict()` of each item in inherited_recipes (list)
|
|
101
|
-
_items = []
|
|
102
|
-
if self.inherited_recipes:
|
|
103
|
-
for _item in self.inherited_recipes:
|
|
104
|
-
if _item:
|
|
105
|
-
_items.append(_item.to_dict())
|
|
106
|
-
_dict['inheritedRecipes'] = _items
|
|
107
100
|
# override the default output from pydantic by calling `to_dict()` of holding
|
|
108
101
|
if self.holding:
|
|
109
102
|
_dict['holding'] = self.holding.to_dict()
|
|
110
|
-
#
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
_dict['inheritedRecipes'] = None
|
|
114
|
-
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of translation
|
|
104
|
+
if self.translation:
|
|
105
|
+
_dict['translation'] = self.translation.to_dict()
|
|
115
106
|
# set to None if description (nullable) is None
|
|
116
107
|
# and __fields_set__ contains the field
|
|
117
108
|
if self.description is None and "description" in self.__fields_set__:
|
|
@@ -134,8 +125,8 @@ class ConfigurationRecipe(BaseModel):
|
|
|
134
125
|
"market": MarketContext.from_dict(obj.get("market")) if obj.get("market") is not None else None,
|
|
135
126
|
"pricing": PricingContext.from_dict(obj.get("pricing")) if obj.get("pricing") is not None else None,
|
|
136
127
|
"aggregation": AggregationContext.from_dict(obj.get("aggregation")) if obj.get("aggregation") is not None else None,
|
|
137
|
-
"inherited_recipes": [ResourceId.from_dict(_item) for _item in obj.get("inheritedRecipes")] if obj.get("inheritedRecipes") is not None else None,
|
|
138
128
|
"description": obj.get("description"),
|
|
139
|
-
"holding": HoldingContext.from_dict(obj.get("holding")) if obj.get("holding") is not None else None
|
|
129
|
+
"holding": HoldingContext.from_dict(obj.get("holding")) if obj.get("holding") is not None else None,
|
|
130
|
+
"translation": TranslationContext.from_dict(obj.get("translation")) if obj.get("translation") is not None else None
|
|
140
131
|
})
|
|
141
132
|
return _obj
|