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
|
@@ -26,7 +26,7 @@ class TransactionPrice(BaseModel):
|
|
|
26
26
|
TransactionPrice
|
|
27
27
|
"""
|
|
28
28
|
price: Optional[Union[StrictFloat, StrictInt]] = None
|
|
29
|
-
type: Optional[StrictStr] = Field(None, description="The available values are: Price, Yield, Spread")
|
|
29
|
+
type: Optional[StrictStr] = Field(None, description="The available values are: Price, Yield, Spread, CashFlowPerUnit")
|
|
30
30
|
__properties = ["price", "type"]
|
|
31
31
|
|
|
32
32
|
@validator('type')
|
|
@@ -35,8 +35,8 @@ class TransactionPrice(BaseModel):
|
|
|
35
35
|
if value is None:
|
|
36
36
|
return value
|
|
37
37
|
|
|
38
|
-
if value not in ('Price', 'Yield', 'Spread'):
|
|
39
|
-
raise ValueError("must be one of enum values ('Price', 'Yield', 'Spread')")
|
|
38
|
+
if value not in ('Price', 'Yield', 'Spread', 'CashFlowPerUnit'):
|
|
39
|
+
raise ValueError("must be one of enum values ('Price', 'Yield', 'Spread', 'CashFlowPerUnit')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
42
|
class Config:
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic import BaseModel, constr
|
|
23
|
+
|
|
24
|
+
class TransactionPriceAndType(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
TransactionPriceAndType
|
|
27
|
+
"""
|
|
28
|
+
price: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
|
|
29
|
+
type: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
|
|
30
|
+
__properties = ["price", "type"]
|
|
31
|
+
|
|
32
|
+
class Config:
|
|
33
|
+
"""Pydantic configuration"""
|
|
34
|
+
allow_population_by_field_name = True
|
|
35
|
+
validate_assignment = True
|
|
36
|
+
|
|
37
|
+
def to_str(self) -> str:
|
|
38
|
+
"""Returns the string representation of the model using alias"""
|
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
40
|
+
|
|
41
|
+
def to_json(self) -> str:
|
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
|
43
|
+
return json.dumps(self.to_dict())
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_json(cls, json_str: str) -> TransactionPriceAndType:
|
|
47
|
+
"""Create an instance of TransactionPriceAndType from a JSON string"""
|
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
|
49
|
+
|
|
50
|
+
def to_dict(self):
|
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
52
|
+
_dict = self.dict(by_alias=True,
|
|
53
|
+
exclude={
|
|
54
|
+
},
|
|
55
|
+
exclude_none=True)
|
|
56
|
+
# set to None if price (nullable) is None
|
|
57
|
+
# and __fields_set__ contains the field
|
|
58
|
+
if self.price is None and "price" in self.__fields_set__:
|
|
59
|
+
_dict['price'] = None
|
|
60
|
+
|
|
61
|
+
# set to None if type (nullable) is None
|
|
62
|
+
# and __fields_set__ contains the field
|
|
63
|
+
if self.type is None and "type" in self.__fields_set__:
|
|
64
|
+
_dict['type'] = None
|
|
65
|
+
|
|
66
|
+
return _dict
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls, obj: dict) -> TransactionPriceAndType:
|
|
70
|
+
"""Create an instance of TransactionPriceAndType from a dict"""
|
|
71
|
+
if obj is None:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
if not isinstance(obj, dict):
|
|
75
|
+
return TransactionPriceAndType.parse_obj(obj)
|
|
76
|
+
|
|
77
|
+
_obj = TransactionPriceAndType.parse_obj({
|
|
78
|
+
"price": obj.get("price"),
|
|
79
|
+
"type": obj.get("type")
|
|
80
|
+
})
|
|
81
|
+
return _obj
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr
|
|
23
|
+
from lusid.models.property_value import PropertyValue
|
|
24
|
+
|
|
25
|
+
class TransactionPropertyMap(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
TransactionPropertyMap
|
|
28
|
+
"""
|
|
29
|
+
property_key: Optional[StrictStr] = Field(None, alias="propertyKey", description="The key that uniquely identifies the property. It has the format {domain}/{scope}/{code}.")
|
|
30
|
+
property_value: Optional[PropertyValue] = Field(None, alias="propertyValue")
|
|
31
|
+
__properties = ["propertyKey", "propertyValue"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> TransactionPropertyMap:
|
|
48
|
+
"""Create an instance of TransactionPropertyMap from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of property_value
|
|
58
|
+
if self.property_value:
|
|
59
|
+
_dict['propertyValue'] = self.property_value.to_dict()
|
|
60
|
+
# set to None if property_key (nullable) is None
|
|
61
|
+
# and __fields_set__ contains the field
|
|
62
|
+
if self.property_key is None and "property_key" in self.__fields_set__:
|
|
63
|
+
_dict['propertyKey'] = None
|
|
64
|
+
|
|
65
|
+
return _dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls, obj: dict) -> TransactionPropertyMap:
|
|
69
|
+
"""Create an instance of TransactionPropertyMap from a dict"""
|
|
70
|
+
if obj is None:
|
|
71
|
+
return None
|
|
72
|
+
|
|
73
|
+
if not isinstance(obj, dict):
|
|
74
|
+
return TransactionPropertyMap.parse_obj(obj)
|
|
75
|
+
|
|
76
|
+
_obj = TransactionPropertyMap.parse_obj({
|
|
77
|
+
"property_key": obj.get("propertyKey"),
|
|
78
|
+
"property_value": PropertyValue.from_dict(obj.get("propertyValue")) if obj.get("propertyValue") is not None else None
|
|
79
|
+
})
|
|
80
|
+
return _obj
|
|
@@ -0,0 +1,100 @@
|
|
|
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.component_transaction import ComponentTransaction
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
|
|
26
|
+
class TransactionTemplate(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TransactionTemplate
|
|
29
|
+
"""
|
|
30
|
+
instrument_type: constr(strict=True, min_length=1) = Field(..., alias="instrumentType", description="A value that represents the instrument type.")
|
|
31
|
+
instrument_event_type: constr(strict=True, min_length=1) = Field(..., alias="instrumentEventType", description="A value that represents the instrument event type.")
|
|
32
|
+
description: constr(strict=True, min_length=1) = Field(..., description="The description of the transaction template.")
|
|
33
|
+
scope: constr(strict=True, min_length=1) = Field(..., description="The scope in which the transaction template resides.")
|
|
34
|
+
component_transactions: conlist(ComponentTransaction) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the template to be created.")
|
|
35
|
+
links: Optional[conlist(Link)] = None
|
|
36
|
+
__properties = ["instrumentType", "instrumentEventType", "description", "scope", "componentTransactions", "links"]
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
"""Pydantic configuration"""
|
|
40
|
+
allow_population_by_field_name = True
|
|
41
|
+
validate_assignment = True
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> TransactionTemplate:
|
|
53
|
+
"""Create an instance of TransactionTemplate from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self):
|
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
58
|
+
_dict = self.dict(by_alias=True,
|
|
59
|
+
exclude={
|
|
60
|
+
},
|
|
61
|
+
exclude_none=True)
|
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of each item in component_transactions (list)
|
|
63
|
+
_items = []
|
|
64
|
+
if self.component_transactions:
|
|
65
|
+
for _item in self.component_transactions:
|
|
66
|
+
if _item:
|
|
67
|
+
_items.append(_item.to_dict())
|
|
68
|
+
_dict['componentTransactions'] = _items
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
70
|
+
_items = []
|
|
71
|
+
if self.links:
|
|
72
|
+
for _item in self.links:
|
|
73
|
+
if _item:
|
|
74
|
+
_items.append(_item.to_dict())
|
|
75
|
+
_dict['links'] = _items
|
|
76
|
+
# set to None if links (nullable) is None
|
|
77
|
+
# and __fields_set__ contains the field
|
|
78
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
79
|
+
_dict['links'] = None
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: dict) -> TransactionTemplate:
|
|
85
|
+
"""Create an instance of TransactionTemplate from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return TransactionTemplate.parse_obj(obj)
|
|
91
|
+
|
|
92
|
+
_obj = TransactionTemplate.parse_obj({
|
|
93
|
+
"instrument_type": obj.get("instrumentType"),
|
|
94
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
|
95
|
+
"description": obj.get("description"),
|
|
96
|
+
"scope": obj.get("scope"),
|
|
97
|
+
"component_transactions": [ComponentTransaction.from_dict(_item) for _item in obj.get("componentTransactions")] if obj.get("componentTransactions") is not None else None,
|
|
98
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
|
22
|
+
from pydantic import BaseModel, Field, conlist, constr
|
|
23
|
+
from lusid.models.component_transaction import ComponentTransaction
|
|
24
|
+
|
|
25
|
+
class TransactionTemplateRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
TransactionTemplateRequest
|
|
28
|
+
"""
|
|
29
|
+
description: constr(strict=True, max_length=100, min_length=0) = Field(..., description="The description of the transaction template.")
|
|
30
|
+
component_transactions: conlist(ComponentTransaction) = Field(..., alias="componentTransactions", description="A set of component transactions that relate to the template to be created.")
|
|
31
|
+
__properties = ["description", "componentTransactions"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> TransactionTemplateRequest:
|
|
48
|
+
"""Create an instance of TransactionTemplateRequest from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of each item in component_transactions (list)
|
|
58
|
+
_items = []
|
|
59
|
+
if self.component_transactions:
|
|
60
|
+
for _item in self.component_transactions:
|
|
61
|
+
if _item:
|
|
62
|
+
_items.append(_item.to_dict())
|
|
63
|
+
_dict['componentTransactions'] = _items
|
|
64
|
+
return _dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls, obj: dict) -> TransactionTemplateRequest:
|
|
68
|
+
"""Create an instance of TransactionTemplateRequest from a dict"""
|
|
69
|
+
if obj is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
if not isinstance(obj, dict):
|
|
73
|
+
return TransactionTemplateRequest.parse_obj(obj)
|
|
74
|
+
|
|
75
|
+
_obj = TransactionTemplateRequest.parse_obj({
|
|
76
|
+
"description": obj.get("description"),
|
|
77
|
+
"component_transactions": [ComponentTransaction.from_dict(_item) for _item in obj.get("componentTransactions")] if obj.get("componentTransactions") is not None else None
|
|
78
|
+
})
|
|
79
|
+
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, List
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.election_specification import ElectionSpecification
|
|
24
|
+
from lusid.models.eligibility_calculation import EligibilityCalculation
|
|
25
|
+
from lusid.models.template_field import TemplateField
|
|
26
|
+
|
|
27
|
+
class TransactionTemplateSpecification(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TransactionTemplateSpecification
|
|
30
|
+
"""
|
|
31
|
+
instrument_event_type: constr(strict=True, min_length=1) = Field(..., alias="instrumentEventType")
|
|
32
|
+
supported_instrument_types: conlist(StrictStr) = Field(..., alias="supportedInstrumentTypes")
|
|
33
|
+
supported_participation_types: conlist(StrictStr) = Field(..., alias="supportedParticipationTypes")
|
|
34
|
+
supported_election_types: conlist(ElectionSpecification) = Field(..., alias="supportedElectionTypes")
|
|
35
|
+
supported_template_fields: conlist(TemplateField) = Field(..., alias="supportedTemplateFields")
|
|
36
|
+
eligibility_calculation: EligibilityCalculation = Field(..., alias="eligibilityCalculation")
|
|
37
|
+
__properties = ["instrumentEventType", "supportedInstrumentTypes", "supportedParticipationTypes", "supportedElectionTypes", "supportedTemplateFields", "eligibilityCalculation"]
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
"""Pydantic configuration"""
|
|
41
|
+
allow_population_by_field_name = True
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> TransactionTemplateSpecification:
|
|
54
|
+
"""Create an instance of TransactionTemplateSpecification from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self):
|
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
59
|
+
_dict = self.dict(by_alias=True,
|
|
60
|
+
exclude={
|
|
61
|
+
},
|
|
62
|
+
exclude_none=True)
|
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each item in supported_election_types (list)
|
|
64
|
+
_items = []
|
|
65
|
+
if self.supported_election_types:
|
|
66
|
+
for _item in self.supported_election_types:
|
|
67
|
+
if _item:
|
|
68
|
+
_items.append(_item.to_dict())
|
|
69
|
+
_dict['supportedElectionTypes'] = _items
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each item in supported_template_fields (list)
|
|
71
|
+
_items = []
|
|
72
|
+
if self.supported_template_fields:
|
|
73
|
+
for _item in self.supported_template_fields:
|
|
74
|
+
if _item:
|
|
75
|
+
_items.append(_item.to_dict())
|
|
76
|
+
_dict['supportedTemplateFields'] = _items
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of eligibility_calculation
|
|
78
|
+
if self.eligibility_calculation:
|
|
79
|
+
_dict['eligibilityCalculation'] = self.eligibility_calculation.to_dict()
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: dict) -> TransactionTemplateSpecification:
|
|
84
|
+
"""Create an instance of TransactionTemplateSpecification from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return TransactionTemplateSpecification.parse_obj(obj)
|
|
90
|
+
|
|
91
|
+
_obj = TransactionTemplateSpecification.parse_obj({
|
|
92
|
+
"instrument_event_type": obj.get("instrumentEventType"),
|
|
93
|
+
"supported_instrument_types": obj.get("supportedInstrumentTypes"),
|
|
94
|
+
"supported_participation_types": obj.get("supportedParticipationTypes"),
|
|
95
|
+
"supported_election_types": [ElectionSpecification.from_dict(_item) for _item in obj.get("supportedElectionTypes")] if obj.get("supportedElectionTypes") is not None else None,
|
|
96
|
+
"supported_template_fields": [TemplateField.from_dict(_item) for _item in obj.get("supportedTemplateFields")] if obj.get("supportedTemplateFields") is not None else None,
|
|
97
|
+
"eligibility_calculation": EligibilityCalculation.from_dict(obj.get("eligibilityCalculation")) if obj.get("eligibilityCalculation") is not None else None
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
@@ -32,13 +32,6 @@ class TransactionTypeAlias(BaseModel):
|
|
|
32
32
|
is_default: Optional[StrictBool] = Field(None, alias="isDefault", description="IsDefault is a flag that denotes the default alias for a source. There can only be, at most, one per source.")
|
|
33
33
|
__properties = ["type", "description", "transactionClass", "transactionRoles", "isDefault"]
|
|
34
34
|
|
|
35
|
-
@validator('type')
|
|
36
|
-
def type_validate_regular_expression(cls, value):
|
|
37
|
-
"""Validates the regular expression"""
|
|
38
|
-
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
39
|
-
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
40
|
-
return value
|
|
41
|
-
|
|
42
35
|
@validator('description')
|
|
43
36
|
def description_validate_regular_expression(cls, value):
|
|
44
37
|
"""Validates the regular expression"""
|
|
@@ -26,7 +26,7 @@ class TransactionTypeCalculation(BaseModel):
|
|
|
26
26
|
TransactionTypeCalculation
|
|
27
27
|
"""
|
|
28
28
|
type: constr(strict=True, min_length=1) = Field(..., description="The type of calculation to perform")
|
|
29
|
-
side: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The
|
|
29
|
+
side: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The side to which the calculation is applied")
|
|
30
30
|
__properties = ["type", "side"]
|
|
31
31
|
|
|
32
32
|
@validator('side')
|
lusid/models/transition_event.py
CHANGED
|
@@ -34,15 +34,15 @@ class TransitionEvent(InstrumentEvent):
|
|
|
34
34
|
payment_date: Optional[datetime] = Field(None, alias="paymentDate", description="The payment date of the corporate action")
|
|
35
35
|
input_transition: Optional[InputTransition] = Field(None, alias="inputTransition")
|
|
36
36
|
output_transitions: Optional[conlist(OutputTransition)] = Field(None, alias="outputTransitions", description="The resulting transitions from this event")
|
|
37
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent")
|
|
37
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent")
|
|
38
38
|
additional_properties: Dict[str, Any] = {}
|
|
39
39
|
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "inputTransition", "outputTransitions"]
|
|
40
40
|
|
|
41
41
|
@validator('instrument_event_type')
|
|
42
42
|
def instrument_event_type_validate_enum(cls, value):
|
|
43
43
|
"""Validates the enum"""
|
|
44
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent'):
|
|
45
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent')")
|
|
44
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent'):
|
|
45
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent')")
|
|
46
46
|
return value
|
|
47
47
|
|
|
48
48
|
class Config:
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic import BaseModel, Field, StrictBool
|
|
23
|
+
from lusid.models.script_map_reference import ScriptMapReference
|
|
24
|
+
|
|
25
|
+
class TranslationContext(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Options for overriding default scripted translation configuration. # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
disable_scripted_translation: Optional[StrictBool] = Field(None, alias="disableScriptedTranslation")
|
|
30
|
+
script_map: Optional[ScriptMapReference] = Field(None, alias="scriptMap")
|
|
31
|
+
__properties = ["disableScriptedTranslation", "scriptMap"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> TranslationContext:
|
|
48
|
+
"""Create an instance of TranslationContext from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
# override the default output from pydantic by calling `to_dict()` of script_map
|
|
58
|
+
if self.script_map:
|
|
59
|
+
_dict['scriptMap'] = self.script_map.to_dict()
|
|
60
|
+
return _dict
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls, obj: dict) -> TranslationContext:
|
|
64
|
+
"""Create an instance of TranslationContext from a dict"""
|
|
65
|
+
if obj is None:
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
if not isinstance(obj, dict):
|
|
69
|
+
return TranslationContext.parse_obj(obj)
|
|
70
|
+
|
|
71
|
+
_obj = TranslationContext.parse_obj({
|
|
72
|
+
"disable_scripted_translation": obj.get("disableScriptedTranslation"),
|
|
73
|
+
"script_map": ScriptMapReference.from_dict(obj.get("scriptMap")) if obj.get("scriptMap") is not None else None
|
|
74
|
+
})
|
|
75
|
+
return _obj
|
|
@@ -18,9 +18,10 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
from typing import Any, Dict
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
22
|
from pydantic import BaseModel, Field, constr
|
|
23
23
|
from lusid.models.translation_script_id import TranslationScriptId
|
|
24
|
+
from lusid.models.version import Version
|
|
24
25
|
|
|
25
26
|
class TranslationScript(BaseModel):
|
|
26
27
|
"""
|
|
@@ -28,7 +29,8 @@ class TranslationScript(BaseModel):
|
|
|
28
29
|
"""
|
|
29
30
|
id: TranslationScriptId = Field(...)
|
|
30
31
|
body: constr(strict=True, max_length=500000, min_length=0) = Field(..., description="Body of the translation script, i.e. the actual translation code.")
|
|
31
|
-
|
|
32
|
+
version: Optional[Version] = None
|
|
33
|
+
__properties = ["id", "body", "version"]
|
|
32
34
|
|
|
33
35
|
class Config:
|
|
34
36
|
"""Pydantic configuration"""
|
|
@@ -57,6 +59,9 @@ class TranslationScript(BaseModel):
|
|
|
57
59
|
# override the default output from pydantic by calling `to_dict()` of id
|
|
58
60
|
if self.id:
|
|
59
61
|
_dict['id'] = self.id.to_dict()
|
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
|
63
|
+
if self.version:
|
|
64
|
+
_dict['version'] = self.version.to_dict()
|
|
60
65
|
return _dict
|
|
61
66
|
|
|
62
67
|
@classmethod
|
|
@@ -70,6 +75,7 @@ class TranslationScript(BaseModel):
|
|
|
70
75
|
|
|
71
76
|
_obj = TranslationScript.parse_obj({
|
|
72
77
|
"id": TranslationScriptId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
|
73
|
-
"body": obj.get("body")
|
|
78
|
+
"body": obj.get("body"),
|
|
79
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
|
74
80
|
})
|
|
75
81
|
return _obj
|