lusid-sdk 2.1.405__py3-none-any.whl → 2.1.537__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.
- lusid/__init__.py +142 -8
- lusid/api/__init__.py +2 -2
- lusid/api/abor_api.py +126 -133
- lusid/api/abor_configuration_api.py +46 -45
- lusid/api/address_key_definition_api.py +28 -27
- lusid/api/aggregation_api.py +37 -36
- lusid/api/allocations_api.py +39 -38
- lusid/api/amortisation_rule_sets_api.py +55 -54
- lusid/api/application_metadata_api.py +28 -27
- lusid/api/blocks_api.py +37 -36
- lusid/api/calendars_api.py +469 -111
- lusid/api/chart_of_accounts_api.py +454 -279
- lusid/api/complex_market_data_api.py +37 -36
- lusid/api/compliance_api.py +136 -135
- lusid/api/configuration_recipe_api.py +100 -99
- lusid/api/conventions_api.py +109 -108
- lusid/api/corporate_action_sources_api.py +82 -81
- lusid/api/counterparties_api.py +73 -72
- lusid/api/custom_entities_api.py +102 -101
- lusid/api/custom_entity_definitions_api.py +37 -36
- lusid/api/custom_entity_types_api.py +37 -36
- lusid/api/cut_label_definitions_api.py +46 -45
- lusid/api/data_types_api.py +248 -72
- lusid/api/derived_transaction_portfolios_api.py +19 -18
- lusid/api/entities_api.py +431 -46
- lusid/api/executions_api.py +37 -36
- lusid/api/fee_types_api.py +55 -54
- lusid/api/{fund_configurations_api.py → fund_configuration_api.py} +222 -46
- lusid/api/funds_api.py +337 -162
- lusid/api/group_reconciliations_api.py +2182 -63
- lusid/api/instrument_event_types_api.py +64 -63
- lusid/api/instrument_events_api.py +46 -45
- lusid/api/instruments_api.py +374 -186
- lusid/api/legacy_compliance_api.py +73 -72
- lusid/api/legal_entities_api.py +167 -166
- lusid/api/order_graph_api.py +32 -31
- lusid/api/order_instructions_api.py +37 -36
- lusid/api/order_management_api.py +251 -90
- lusid/api/orders_api.py +37 -36
- lusid/api/packages_api.py +37 -36
- lusid/api/participations_api.py +37 -36
- lusid/api/persons_api.py +163 -162
- lusid/api/placements_api.py +37 -36
- lusid/api/portfolio_groups_api.py +235 -234
- lusid/api/portfolios_api.py +307 -309
- lusid/api/property_definitions_api.py +100 -99
- lusid/api/queryable_keys_api.py +10 -9
- lusid/api/quotes_api.py +82 -81
- lusid/api/reconciliations_api.py +136 -135
- lusid/api/reference_lists_api.py +39 -38
- lusid/api/reference_portfolio_api.py +213 -36
- lusid/api/relation_definitions_api.py +28 -27
- lusid/api/relations_api.py +19 -18
- lusid/api/relationship_definitions_api.py +46 -45
- lusid/api/relationships_api.py +19 -18
- lusid/api/schemas_api.py +37 -36
- lusid/api/scopes_api.py +19 -18
- lusid/api/scripted_translation_api.py +73 -72
- lusid/api/search_api.py +37 -36
- lusid/api/sequences_api.py +37 -36
- lusid/api/staged_modifications_api.py +37 -36
- lusid/api/staging_rule_set_api.py +46 -45
- lusid/api/structured_result_data_api.py +82 -81
- lusid/api/system_configuration_api.py +64 -63
- lusid/api/tax_rule_sets_api.py +46 -45
- lusid/api/transaction_configuration_api.py +100 -99
- lusid/api/transaction_fees_api.py +46 -45
- lusid/api/transaction_portfolios_api.py +771 -328
- lusid/api/translation_api.py +19 -18
- lusid/api/workspace_api.py +181 -180
- lusid/api_client.py +26 -17
- lusid/configuration.py +87 -2
- lusid/extensions/api_client.py +25 -17
- lusid/extensions/api_client_factory.py +14 -5
- lusid/extensions/api_configuration.py +50 -1
- lusid/extensions/configuration_loaders.py +39 -11
- lusid/extensions/configuration_options.py +67 -0
- lusid/extensions/rest.py +78 -26
- lusid/extensions/retry.py +109 -37
- lusid/models/__init__.py +140 -6
- lusid/models/access_metadata_value.py +1 -1
- lusid/models/accounting_method.py +7 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/address_key_list.py +3 -3
- lusid/models/amortisation_event.py +3 -3
- lusid/models/amount.py +69 -0
- lusid/models/applicable_instrument_event.py +7 -2
- lusid/models/asset_leg.py +1 -1
- lusid/models/basket.py +3 -3
- lusid/models/batch_update_user_review_for_comparison_result_request.py +81 -0
- lusid/models/batch_update_user_review_for_comparison_result_response.py +146 -0
- lusid/models/batch_upsert_dates_for_calendar_response.py +146 -0
- lusid/models/batch_upsert_portfolio_access_metadata_request.py +27 -17
- lusid/models/batch_upsert_portfolio_access_metadata_response.py +56 -16
- lusid/models/{metadata_key_value.py → batch_upsert_portfolio_access_metadata_response_item.py} +15 -9
- lusid/models/bond.py +3 -3
- lusid/models/bond_coupon_event.py +10 -5
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +10 -5
- lusid/models/bonus_issue_event.py +166 -0
- lusid/models/{component_rule.py → break_code_source.py} +17 -21
- lusid/models/call_on_intermediate_securities_event.py +139 -0
- lusid/models/cancel_order_and_move_remaining_result.py +84 -0
- lusid/models/cancel_orders_and_move_remaining_request.py +83 -0
- lusid/models/cancel_orders_and_move_remaining_response.py +153 -0
- lusid/models/cap_floor.py +3 -3
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash.py +3 -3
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_credit_event.py +6 -6
- lusid/models/cds_index.py +3 -3
- lusid/models/cdx_credit_event.py +6 -6
- lusid/models/change_interval.py +123 -0
- lusid/models/change_interval_with_order_management_detail.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/comparison_attribute_value_pair.py +71 -0
- lusid/models/complex_bond.py +3 -3
- lusid/models/component_transaction.py +10 -3
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/create_derived_transaction_portfolio_request.py +3 -3
- lusid/models/create_group_reconciliation_definition_request.py +113 -0
- lusid/models/create_staging_rule_set_request.py +1 -6
- lusid/models/create_transaction_portfolio_request.py +3 -3
- lusid/models/credit_default_swap.py +3 -3
- lusid/models/credit_premium_cash_flow_event.py +3 -3
- lusid/models/custodian_account_request.py +1 -1
- lusid/models/custom_entity_entity.py +146 -0
- lusid/models/custom_entity_response.py +7 -1
- lusid/models/decimal_list.py +3 -3
- lusid/models/delete_instrument_properties_response.py +7 -1
- lusid/models/delete_instrument_response.py +7 -1
- lusid/models/delete_instruments_response.py +22 -1
- lusid/models/deleted_entity_response.py +7 -1
- lusid/models/diary_entry_request.py +10 -1
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +9 -4
- lusid/models/effective_range.py +71 -0
- lusid/models/equity.py +3 -3
- lusid/models/equity_option.py +22 -7
- lusid/models/equity_swap.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- lusid/models/exchange_traded_option_contract_details.py +1 -1
- lusid/models/exercise_event.py +3 -3
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee.py +17 -10
- lusid/models/fee_request.py +20 -13
- lusid/models/fee_type.py +4 -4
- lusid/models/fee_type_request.py +3 -3
- lusid/models/fixed_leg.py +3 -3
- lusid/models/fixed_schedule.py +3 -3
- lusid/models/flexible_loan.py +3 -3
- lusid/models/float_schedule.py +4 -4
- lusid/models/floating_leg.py +3 -3
- lusid/models/flow_conventions.py +7 -1
- lusid/models/forward_rate_agreement.py +3 -3
- lusid/models/fund_configuration.py +44 -17
- lusid/models/fund_configuration_request.py +31 -19
- lusid/models/fund_id_list.py +99 -0
- lusid/models/fund_share_class.py +23 -8
- lusid/models/funding_leg.py +3 -3
- lusid/models/future.py +3 -3
- lusid/models/future_expiry_event.py +3 -3
- lusid/models/fx_forward.py +3 -3
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_swap.py +3 -3
- lusid/models/group_reconciliation_aggregate_attribute_rule.py +2 -2
- lusid/models/group_reconciliation_aggregate_attribute_values.py +86 -0
- lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_comparison_result.py +148 -0
- lusid/models/group_reconciliation_core_attribute_values.py +86 -0
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_date_pair.py +81 -0
- lusid/models/group_reconciliation_dates.py +78 -0
- lusid/models/group_reconciliation_definition.py +136 -0
- lusid/models/group_reconciliation_definition_comparison_ruleset_ids.py +83 -0
- lusid/models/group_reconciliation_definition_currencies.py +71 -0
- lusid/models/group_reconciliation_definition_portfolio_entity_ids.py +86 -0
- lusid/models/group_reconciliation_definition_recipe_ids.py +78 -0
- lusid/models/group_reconciliation_instance_id.py +71 -0
- lusid/models/group_reconciliation_result_statuses.py +89 -0
- lusid/models/group_reconciliation_result_types.py +96 -0
- lusid/models/group_reconciliation_review_statuses.py +96 -0
- lusid/models/group_reconciliation_run_details.py +76 -0
- lusid/models/group_reconciliation_run_request.py +75 -0
- lusid/models/{metadata_key_value_response.py → group_reconciliation_run_response.py} +20 -29
- lusid/models/group_reconciliation_summary.py +121 -0
- lusid/models/group_reconciliation_user_review.py +112 -0
- lusid/models/group_reconciliation_user_review_add.py +88 -0
- lusid/models/group_reconciliation_user_review_break_code.py +80 -0
- lusid/models/group_reconciliation_user_review_comment.py +80 -0
- lusid/models/group_reconciliation_user_review_match_key.py +80 -0
- lusid/models/group_reconciliation_user_review_remove.py +88 -0
- lusid/models/holding_contributor.py +11 -4
- lusid/models/holding_ids_request.py +69 -0
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +3 -3
- lusid/models/inflation_swap.py +3 -3
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument.py +7 -1
- lusid/models/instrument_definition.py +8 -2
- lusid/models/instrument_event.py +17 -5
- lusid/models/instrument_event_holder.py +9 -1
- lusid/models/instrument_event_type.py +12 -0
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_list.py +3 -3
- lusid/models/instrument_type.py +2 -0
- lusid/models/interest_rate_swap.py +3 -3
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/intermediate_securities_distribution_event.py +140 -0
- lusid/models/lapse_election.py +73 -0
- lusid/models/loan_facility.py +97 -0
- lusid/models/lusid_instrument.py +7 -5
- lusid/models/market_data_key_rule.py +5 -3
- lusid/models/market_data_specific_rule.py +5 -3
- lusid/models/mastered_instrument.py +139 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/mbs_coupon_event.py +102 -0
- lusid/models/mbs_interest_deferral_event.py +102 -0
- lusid/models/mbs_interest_shortfall_event.py +102 -0
- lusid/models/mbs_principal_event.py +102 -0
- lusid/models/mbs_principal_write_off_event.py +102 -0
- lusid/models/merger_event.py +22 -22
- lusid/models/new_instrument.py +1 -1
- lusid/models/open_event.py +3 -3
- lusid/models/option_exercise_cash_event.py +144 -0
- lusid/models/option_exercise_election.py +73 -0
- lusid/models/option_exercise_physical_event.py +149 -0
- lusid/models/output_transaction.py +9 -2
- lusid/models/paged_resource_list_of_group_reconciliation_comparison_result.py +113 -0
- lusid/models/paged_resource_list_of_group_reconciliation_comparison_ruleset.py +113 -0
- lusid/models/paged_resource_list_of_group_reconciliation_definition.py +113 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_details.py +3 -3
- lusid/models/portfolio_group_id_list.py +3 -3
- lusid/models/portfolio_id_list.py +3 -3
- lusid/models/portfolio_without_href.py +3 -3
- lusid/models/pricing_options.py +8 -2
- lusid/models/property_list.py +3 -3
- lusid/models/protection_payout_cash_flow_event.py +102 -0
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reference_instrument.py +3 -3
- lusid/models/reference_list.py +6 -5
- lusid/models/reference_list_type.py +1 -0
- lusid/models/repo.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/resource_list_of_change_interval.py +113 -0
- lusid/models/resource_list_of_output_transaction.py +113 -0
- lusid/models/return_zero_pv_options.py +69 -0
- lusid/models/reverse_stock_split_event.py +21 -7
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/settlement_cycle.py +79 -0
- lusid/models/share_class_dealing_breakdown.py +3 -2
- lusid/models/share_class_details.py +18 -1
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/simple_rounding_convention.py +76 -0
- lusid/models/spin_off_event.py +3 -3
- lusid/models/staged_modification_effective_range.py +2 -2
- lusid/models/stock_dividend_event.py +20 -6
- lusid/models/stock_split_event.py +3 -3
- lusid/models/string_list.py +3 -3
- lusid/models/swap_cash_flow_event.py +3 -3
- lusid/models/swap_principal_event.py +3 -3
- lusid/models/target_tax_lot.py +23 -2
- lusid/models/target_tax_lot_request.py +23 -2
- lusid/models/tender_event.py +172 -0
- lusid/models/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +4 -4
- lusid/models/transaction.py +9 -2
- lusid/models/transaction_date_windows.py +85 -0
- lusid/models/transaction_price.py +3 -3
- lusid/models/transaction_price_type.py +2 -0
- lusid/models/transaction_request.py +9 -2
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/update_fee_type_request.py +4 -4
- lusid/models/update_group_reconciliation_comparison_ruleset_request.py +91 -0
- lusid/models/update_group_reconciliation_definition_request.py +107 -0
- lusid/models/update_reference_data_request.py +87 -0
- lusid/models/update_staging_rule_set_request.py +1 -6
- lusid/models/upsert_custom_entities_response.py +20 -1
- lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
- lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
- lusid/models/valuation_point_data_query_parameters.py +3 -3
- lusid/models/valuation_point_data_response.py +8 -13
- lusid/rest.py +70 -20
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.537.dist-info}/METADATA +118 -26
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.537.dist-info}/RECORD +294 -226
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.537.dist-info}/WHEEL +0 -0
@@ -0,0 +1,113 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, constr
|
23
|
+
from lusid.models.break_code_source import BreakCodeSource
|
24
|
+
from lusid.models.group_reconciliation_definition_comparison_ruleset_ids import GroupReconciliationDefinitionComparisonRulesetIds
|
25
|
+
from lusid.models.group_reconciliation_definition_currencies import GroupReconciliationDefinitionCurrencies
|
26
|
+
from lusid.models.group_reconciliation_definition_portfolio_entity_ids import GroupReconciliationDefinitionPortfolioEntityIds
|
27
|
+
from lusid.models.group_reconciliation_definition_recipe_ids import GroupReconciliationDefinitionRecipeIds
|
28
|
+
from lusid.models.resource_id import ResourceId
|
29
|
+
from lusid.models.transaction_date_windows import TransactionDateWindows
|
30
|
+
|
31
|
+
class CreateGroupReconciliationDefinitionRequest(BaseModel):
|
32
|
+
"""
|
33
|
+
CreateGroupReconciliationDefinitionRequest
|
34
|
+
"""
|
35
|
+
id: Optional[ResourceId] = None
|
36
|
+
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The name of the Group Reconciliation Definition")
|
37
|
+
description: constr(strict=True, min_length=1) = Field(..., description="The description of the Group Reconciliation Definition")
|
38
|
+
portfolio_entity_ids: GroupReconciliationDefinitionPortfolioEntityIds = Field(..., alias="portfolioEntityIds")
|
39
|
+
recipe_ids: Optional[GroupReconciliationDefinitionRecipeIds] = Field(None, alias="recipeIds")
|
40
|
+
currencies: Optional[GroupReconciliationDefinitionCurrencies] = None
|
41
|
+
transaction_date_windows: Optional[TransactionDateWindows] = Field(None, alias="transactionDateWindows")
|
42
|
+
comparison_ruleset_ids: Optional[GroupReconciliationDefinitionComparisonRulesetIds] = Field(None, alias="comparisonRulesetIds")
|
43
|
+
break_code_source: BreakCodeSource = Field(..., alias="breakCodeSource")
|
44
|
+
__properties = ["id", "displayName", "description", "portfolioEntityIds", "recipeIds", "currencies", "transactionDateWindows", "comparisonRulesetIds", "breakCodeSource"]
|
45
|
+
|
46
|
+
class Config:
|
47
|
+
"""Pydantic configuration"""
|
48
|
+
allow_population_by_field_name = True
|
49
|
+
validate_assignment = True
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> CreateGroupReconciliationDefinitionRequest:
|
61
|
+
"""Create an instance of CreateGroupReconciliationDefinitionRequest from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
71
|
+
if self.id:
|
72
|
+
_dict['id'] = self.id.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of portfolio_entity_ids
|
74
|
+
if self.portfolio_entity_ids:
|
75
|
+
_dict['portfolioEntityIds'] = self.portfolio_entity_ids.to_dict()
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of recipe_ids
|
77
|
+
if self.recipe_ids:
|
78
|
+
_dict['recipeIds'] = self.recipe_ids.to_dict()
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of currencies
|
80
|
+
if self.currencies:
|
81
|
+
_dict['currencies'] = self.currencies.to_dict()
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of transaction_date_windows
|
83
|
+
if self.transaction_date_windows:
|
84
|
+
_dict['transactionDateWindows'] = self.transaction_date_windows.to_dict()
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of comparison_ruleset_ids
|
86
|
+
if self.comparison_ruleset_ids:
|
87
|
+
_dict['comparisonRulesetIds'] = self.comparison_ruleset_ids.to_dict()
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of break_code_source
|
89
|
+
if self.break_code_source:
|
90
|
+
_dict['breakCodeSource'] = self.break_code_source.to_dict()
|
91
|
+
return _dict
|
92
|
+
|
93
|
+
@classmethod
|
94
|
+
def from_dict(cls, obj: dict) -> CreateGroupReconciliationDefinitionRequest:
|
95
|
+
"""Create an instance of CreateGroupReconciliationDefinitionRequest from a dict"""
|
96
|
+
if obj is None:
|
97
|
+
return None
|
98
|
+
|
99
|
+
if not isinstance(obj, dict):
|
100
|
+
return CreateGroupReconciliationDefinitionRequest.parse_obj(obj)
|
101
|
+
|
102
|
+
_obj = CreateGroupReconciliationDefinitionRequest.parse_obj({
|
103
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
104
|
+
"display_name": obj.get("displayName"),
|
105
|
+
"description": obj.get("description"),
|
106
|
+
"portfolio_entity_ids": GroupReconciliationDefinitionPortfolioEntityIds.from_dict(obj.get("portfolioEntityIds")) if obj.get("portfolioEntityIds") is not None else None,
|
107
|
+
"recipe_ids": GroupReconciliationDefinitionRecipeIds.from_dict(obj.get("recipeIds")) if obj.get("recipeIds") is not None else None,
|
108
|
+
"currencies": GroupReconciliationDefinitionCurrencies.from_dict(obj.get("currencies")) if obj.get("currencies") is not None else None,
|
109
|
+
"transaction_date_windows": TransactionDateWindows.from_dict(obj.get("transactionDateWindows")) if obj.get("transactionDateWindows") is not None else None,
|
110
|
+
"comparison_ruleset_ids": GroupReconciliationDefinitionComparisonRulesetIds.from_dict(obj.get("comparisonRulesetIds")) if obj.get("comparisonRulesetIds") is not None else None,
|
111
|
+
"break_code_source": BreakCodeSource.from_dict(obj.get("breakCodeSource")) if obj.get("breakCodeSource") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
@@ -26,7 +26,7 @@ class CreateStagingRuleSetRequest(BaseModel):
|
|
26
26
|
"""
|
27
27
|
CreateStagingRuleSetRequest
|
28
28
|
"""
|
29
|
-
display_name:
|
29
|
+
display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the staging rule set.")
|
30
30
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the staging rule set.")
|
31
31
|
rules: conlist(StagingRule) = Field(..., description="The list of staging rules that apply to a specific entity type.")
|
32
32
|
__properties = ["displayName", "description", "rules"]
|
@@ -62,11 +62,6 @@ class CreateStagingRuleSetRequest(BaseModel):
|
|
62
62
|
if _item:
|
63
63
|
_items.append(_item.to_dict())
|
64
64
|
_dict['rules'] = _items
|
65
|
-
# set to None if display_name (nullable) is None
|
66
|
-
# and __fields_set__ contains the field
|
67
|
-
if self.display_name is None and "display_name" in self.__fields_set__:
|
68
|
-
_dict['displayName'] = None
|
69
|
-
|
70
65
|
# set to None if description (nullable) is None
|
71
66
|
# and __fields_set__ contains the field
|
72
67
|
if self.description is None and "description" in self.__fields_set__:
|
@@ -34,7 +34,7 @@ class CreateTransactionPortfolioRequest(BaseModel):
|
|
34
34
|
created: Optional[datetime] = Field(None, description="The effective datetime at which to create the transaction portfolio. No transactions can be added to the transaction portfolio before this date. Defaults to the current LUSID system datetime if not specified.")
|
35
35
|
base_currency: StrictStr = Field(..., alias="baseCurrency", description="The base currency of the transaction portfolio in ISO 4217 currency code format.")
|
36
36
|
corporate_action_source_id: Optional[ResourceId] = Field(None, alias="corporateActionSourceId")
|
37
|
-
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency")
|
37
|
+
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency, IntraDayThenFirstInFirstOut, LongTermHighestCostFirst, LongTermHighestCostFirstPortfolioCurrency, HighestCostFirstPortfolioCurrency, LowestCostFirstPortfolioCurrency, MaximumLossMinimumGain, MaximumLossMinimumGainPortfolioCurrency")
|
38
38
|
sub_holding_keys: Optional[conlist(StrictStr, max_items=100)] = Field(None, alias="subHoldingKeys", description="A set of unique transaction properties to group the transaction portfolio's holdings by, perhaps for strategy tagging. Each property must be from the 'Transaction' domain and identified by a key in the format {domain}/{scope}/{code}, for example 'Transaction/strategies/quantsignal'. See https://support.lusid.com/knowledgebase/article/KA-01879/en-us for more information.")
|
39
39
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of unique portfolio properties to add custom data to the transaction portfolio. Each property must be from the 'Portfolio' domain and identified by a key in the format {domain}/{scope}/{code}, for example 'Portfolio/Manager/Id'. Note these properties must be pre-defined.")
|
40
40
|
instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="instrumentScopes", description="The resolution strategy used to resolve instruments of transactions/holdings upserted to this portfolio.")
|
@@ -51,8 +51,8 @@ class CreateTransactionPortfolioRequest(BaseModel):
|
|
51
51
|
if value is None:
|
52
52
|
return value
|
53
53
|
|
54
|
-
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency'):
|
55
|
-
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency')")
|
54
|
+
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency'):
|
55
|
+
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency', 'IntraDayThenFirstInFirstOut', 'LongTermHighestCostFirst', 'LongTermHighestCostFirstPortfolioCurrency', 'HighestCostFirstPortfolioCurrency', 'LowestCostFirstPortfolioCurrency', 'MaximumLossMinimumGain', 'MaximumLossMinimumGainPortfolioCurrency')")
|
56
56
|
return value
|
57
57
|
|
58
58
|
@validator('transaction_type_scope')
|
@@ -37,15 +37,15 @@ class CreditDefaultSwap(LusidInstrument):
|
|
37
37
|
convention_name: Optional[FlowConventionName] = Field(None, alias="conventionName")
|
38
38
|
notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The notional protected by the Credit Default Swap")
|
39
39
|
protection_detail_specification: CdsProtectionDetailSpecification = Field(..., alias="protectionDetailSpecification")
|
40
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
40
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility")
|
41
41
|
additional_properties: Dict[str, Any] = {}
|
42
42
|
__properties = ["instrumentType", "ticker", "startDate", "maturityDate", "flowConventions", "couponRate", "conventionName", "notional", "protectionDetailSpecification"]
|
43
43
|
|
44
44
|
@validator('instrument_type')
|
45
45
|
def instrument_type_validate_enum(cls, value):
|
46
46
|
"""Validates the enum"""
|
47
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
48
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
47
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility'):
|
48
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash', 'MasteredInstrument', 'LoanFacility')")
|
49
49
|
return value
|
50
50
|
|
51
51
|
class Config:
|
@@ -30,15 +30,15 @@ class CreditPremiumCashFlowEvent(InstrumentEvent):
|
|
30
30
|
payment_date: datetime = Field(..., alias="paymentDate", description="The payment date of the cashflow.")
|
31
31
|
currency: StrictStr = Field(..., description="The currency in which the cashflow is paid.")
|
32
32
|
cash_flow_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cashFlowPerUnit", description="The cashflow amount received for each unit of the instrument held on the ex date.")
|
33
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
33
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent")
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
35
35
|
__properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "cashFlowPerUnit"]
|
36
36
|
|
37
37
|
@validator('instrument_event_type')
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
39
39
|
"""Validates the enum"""
|
40
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
41
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
40
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent'):
|
41
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent', 'BonusIssueEvent', 'MbsPrincipalWriteOffEvent', 'MbsInterestDeferralEvent', 'MbsInterestShortfallEvent', 'TenderEvent', 'CallOnIntermediateSecuritiesEvent', 'IntermediateSecuritiesDistributionEvent', 'OptionExercisePhysicalEvent', 'OptionExerciseCashEvent', 'ProtectionPayoutCashFlowEvent')")
|
42
42
|
return value
|
43
43
|
|
44
44
|
class Config:
|
@@ -27,7 +27,7 @@ class CustodianAccountRequest(BaseModel):
|
|
27
27
|
"""
|
28
28
|
CustodianAccountRequest
|
29
29
|
"""
|
30
|
-
scope: Optional[constr(strict=True, max_length=64, min_length=
|
30
|
+
scope: Optional[constr(strict=True, max_length=64, min_length=0)] = Field(None, description="The Scope assigned to the Custodian Account, where left blank the parent Portfolio Scope will be used")
|
31
31
|
code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="Unique Code representing the Custodian Account")
|
32
32
|
status: Optional[StrictStr] = Field(None, description="The Account status. Can be Active, Inactive or Deleted.")
|
33
33
|
account_number: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="accountNumber", description="The Custodian Account Number")
|
@@ -0,0 +1,146 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from datetime import datetime
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist, constr
|
23
|
+
from lusid.models.custom_entity_response import CustomEntityResponse
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class CustomEntityEntity(BaseModel):
|
27
|
+
"""
|
28
|
+
CustomEntityEntity
|
29
|
+
"""
|
30
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
31
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
32
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
33
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
34
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
35
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
36
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
37
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
38
|
+
prevailing_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="prevailingCustomEntity")
|
39
|
+
deleted_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="deletedCustomEntity")
|
40
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
41
|
+
previewed_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="previewedCustomEntity")
|
42
|
+
links: Optional[conlist(Link)] = None
|
43
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingCustomEntity", "deletedCustomEntity", "previewedStatus", "previewedCustomEntity", "links"]
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
"""Pydantic configuration"""
|
47
|
+
allow_population_by_field_name = True
|
48
|
+
validate_assignment = True
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> CustomEntityEntity:
|
60
|
+
"""Create an instance of CustomEntityEntity from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self):
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
65
|
+
_dict = self.dict(by_alias=True,
|
66
|
+
exclude={
|
67
|
+
},
|
68
|
+
exclude_none=True)
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of prevailing_custom_entity
|
70
|
+
if self.prevailing_custom_entity:
|
71
|
+
_dict['prevailingCustomEntity'] = self.prevailing_custom_entity.to_dict()
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_custom_entity
|
73
|
+
if self.deleted_custom_entity:
|
74
|
+
_dict['deletedCustomEntity'] = self.deleted_custom_entity.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_custom_entity
|
76
|
+
if self.previewed_custom_entity:
|
77
|
+
_dict['previewedCustomEntity'] = self.previewed_custom_entity.to_dict()
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
79
|
+
_items = []
|
80
|
+
if self.links:
|
81
|
+
for _item in self.links:
|
82
|
+
if _item:
|
83
|
+
_items.append(_item.to_dict())
|
84
|
+
_dict['links'] = _items
|
85
|
+
# set to None if as_at_version_number (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
88
|
+
_dict['asAtVersionNumber'] = None
|
89
|
+
|
90
|
+
# set to None if as_at_deleted (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
93
|
+
_dict['asAtDeleted'] = None
|
94
|
+
|
95
|
+
# set to None if user_id_deleted (nullable) is None
|
96
|
+
# and __fields_set__ contains the field
|
97
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
98
|
+
_dict['userIdDeleted'] = None
|
99
|
+
|
100
|
+
# set to None if request_id_deleted (nullable) is None
|
101
|
+
# and __fields_set__ contains the field
|
102
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
103
|
+
_dict['requestIdDeleted'] = None
|
104
|
+
|
105
|
+
# set to None if effective_at_created (nullable) is None
|
106
|
+
# and __fields_set__ contains the field
|
107
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
108
|
+
_dict['effectiveAtCreated'] = None
|
109
|
+
|
110
|
+
# set to None if previewed_status (nullable) is None
|
111
|
+
# and __fields_set__ contains the field
|
112
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
113
|
+
_dict['previewedStatus'] = None
|
114
|
+
|
115
|
+
# set to None if links (nullable) is None
|
116
|
+
# and __fields_set__ contains the field
|
117
|
+
if self.links is None and "links" in self.__fields_set__:
|
118
|
+
_dict['links'] = None
|
119
|
+
|
120
|
+
return _dict
|
121
|
+
|
122
|
+
@classmethod
|
123
|
+
def from_dict(cls, obj: dict) -> CustomEntityEntity:
|
124
|
+
"""Create an instance of CustomEntityEntity from a dict"""
|
125
|
+
if obj is None:
|
126
|
+
return None
|
127
|
+
|
128
|
+
if not isinstance(obj, dict):
|
129
|
+
return CustomEntityEntity.parse_obj(obj)
|
130
|
+
|
131
|
+
_obj = CustomEntityEntity.parse_obj({
|
132
|
+
"href": obj.get("href"),
|
133
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
134
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
135
|
+
"status": obj.get("status"),
|
136
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
137
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
138
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
139
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
140
|
+
"prevailing_custom_entity": CustomEntityResponse.from_dict(obj.get("prevailingCustomEntity")) if obj.get("prevailingCustomEntity") is not None else None,
|
141
|
+
"deleted_custom_entity": CustomEntityResponse.from_dict(obj.get("deletedCustomEntity")) if obj.get("deletedCustomEntity") is not None else None,
|
142
|
+
"previewed_status": obj.get("previewedStatus"),
|
143
|
+
"previewed_custom_entity": CustomEntityResponse.from_dict(obj.get("previewedCustomEntity")) if obj.get("previewedCustomEntity") is not None else None,
|
144
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
145
|
+
})
|
146
|
+
return _obj
|
@@ -24,6 +24,7 @@ from lusid.models.custom_entity_field import CustomEntityField
|
|
24
24
|
from lusid.models.custom_entity_id import CustomEntityId
|
25
25
|
from lusid.models.link import Link
|
26
26
|
from lusid.models.relationship import Relationship
|
27
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
27
28
|
from lusid.models.version import Version
|
28
29
|
|
29
30
|
class CustomEntityResponse(BaseModel):
|
@@ -33,13 +34,14 @@ class CustomEntityResponse(BaseModel):
|
|
33
34
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
34
35
|
entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The type of custom entity this is.")
|
35
36
|
version: Version = Field(...)
|
37
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
36
38
|
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="A display label for the custom entity.")
|
37
39
|
description: Optional[StrictStr] = Field(None, description="A description of the custom entity.")
|
38
40
|
identifiers: conlist(CustomEntityId) = Field(..., description="The identifiers the custom entity will be upserted with.")
|
39
41
|
fields: conlist(CustomEntityField) = Field(..., description="The fields that decorate the custom entity.")
|
40
42
|
relationships: conlist(Relationship) = Field(..., description="A set of relationships associated to the custom entity.")
|
41
43
|
links: Optional[conlist(Link)] = None
|
42
|
-
__properties = ["href", "entityType", "version", "displayName", "description", "identifiers", "fields", "relationships", "links"]
|
44
|
+
__properties = ["href", "entityType", "version", "stagedModifications", "displayName", "description", "identifiers", "fields", "relationships", "links"]
|
43
45
|
|
44
46
|
class Config:
|
45
47
|
"""Pydantic configuration"""
|
@@ -68,6 +70,9 @@ class CustomEntityResponse(BaseModel):
|
|
68
70
|
# override the default output from pydantic by calling `to_dict()` of version
|
69
71
|
if self.version:
|
70
72
|
_dict['version'] = self.version.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
74
|
+
if self.staged_modifications:
|
75
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
71
76
|
# override the default output from pydantic by calling `to_dict()` of each item in identifiers (list)
|
72
77
|
_items = []
|
73
78
|
if self.identifiers:
|
@@ -126,6 +131,7 @@ class CustomEntityResponse(BaseModel):
|
|
126
131
|
"href": obj.get("href"),
|
127
132
|
"entity_type": obj.get("entityType"),
|
128
133
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
134
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
129
135
|
"display_name": obj.get("displayName"),
|
130
136
|
"description": obj.get("description"),
|
131
137
|
"identifiers": [CustomEntityId.from_dict(_item) for _item in obj.get("identifiers")] if obj.get("identifiers") is not None else None,
|
lusid/models/decimal_list.py
CHANGED
@@ -27,15 +27,15 @@ class DecimalList(ReferenceList):
|
|
27
27
|
DecimalList
|
28
28
|
"""
|
29
29
|
values: conlist(Union[StrictFloat, StrictInt], max_items=100, min_items=0) = Field(...)
|
30
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
30
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
32
32
|
__properties = ["referenceListType", "values"]
|
33
33
|
|
34
34
|
@validator('reference_list_type')
|
35
35
|
def reference_list_type_validate_enum(cls, value):
|
36
36
|
"""Validates the enum"""
|
37
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
38
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
37
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
38
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
39
39
|
return value
|
40
40
|
|
41
41
|
class Config:
|
@@ -21,14 +21,16 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, conlist
|
23
23
|
from lusid.models.link import Link
|
24
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
24
25
|
|
25
26
|
class DeleteInstrumentPropertiesResponse(BaseModel):
|
26
27
|
"""
|
27
28
|
DeleteInstrumentPropertiesResponse
|
28
29
|
"""
|
29
30
|
as_at: datetime = Field(..., alias="asAt", description="The as-at datetime at which properties were deleted.")
|
31
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
30
32
|
links: Optional[conlist(Link)] = None
|
31
|
-
__properties = ["asAt", "links"]
|
33
|
+
__properties = ["asAt", "stagedModifications", "links"]
|
32
34
|
|
33
35
|
class Config:
|
34
36
|
"""Pydantic configuration"""
|
@@ -54,6 +56,9 @@ class DeleteInstrumentPropertiesResponse(BaseModel):
|
|
54
56
|
exclude={
|
55
57
|
},
|
56
58
|
exclude_none=True)
|
59
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
60
|
+
if self.staged_modifications:
|
61
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
57
62
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
58
63
|
_items = []
|
59
64
|
if self.links:
|
@@ -79,6 +84,7 @@ class DeleteInstrumentPropertiesResponse(BaseModel):
|
|
79
84
|
|
80
85
|
_obj = DeleteInstrumentPropertiesResponse.parse_obj({
|
81
86
|
"as_at": obj.get("asAt"),
|
87
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
82
88
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
83
89
|
})
|
84
90
|
return _obj
|
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
23
|
from lusid.models.link import Link
|
24
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
24
25
|
|
25
26
|
class DeleteInstrumentResponse(BaseModel):
|
26
27
|
"""
|
@@ -28,8 +29,9 @@ class DeleteInstrumentResponse(BaseModel):
|
|
28
29
|
"""
|
29
30
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
30
31
|
as_at: datetime = Field(..., alias="asAt", description="The as-at datetime at which the instrument was deleted.")
|
32
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
31
33
|
links: Optional[conlist(Link)] = None
|
32
|
-
__properties = ["href", "asAt", "links"]
|
34
|
+
__properties = ["href", "asAt", "stagedModifications", "links"]
|
33
35
|
|
34
36
|
class Config:
|
35
37
|
"""Pydantic configuration"""
|
@@ -55,6 +57,9 @@ class DeleteInstrumentResponse(BaseModel):
|
|
55
57
|
exclude={
|
56
58
|
},
|
57
59
|
exclude_none=True)
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
61
|
+
if self.staged_modifications:
|
62
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
58
63
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
59
64
|
_items = []
|
60
65
|
if self.links:
|
@@ -86,6 +91,7 @@ class DeleteInstrumentResponse(BaseModel):
|
|
86
91
|
_obj = DeleteInstrumentResponse.parse_obj({
|
87
92
|
"href": obj.get("href"),
|
88
93
|
"as_at": obj.get("asAt"),
|
94
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
89
95
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
90
96
|
})
|
91
97
|
return _obj
|
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
23
|
from lusid.models.link import Link
|
24
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
24
25
|
|
25
26
|
class DeleteInstrumentsResponse(BaseModel):
|
26
27
|
"""
|
@@ -28,8 +29,9 @@ class DeleteInstrumentsResponse(BaseModel):
|
|
28
29
|
"""
|
29
30
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
30
31
|
as_at: datetime = Field(..., alias="asAt", description="The as-at datetime at which the instrument was deleted.")
|
32
|
+
staged: Optional[Dict[str, StagedModificationsInfo]] = Field(None, description="Information about the pending staged modifications for the current entity.")
|
31
33
|
links: Optional[conlist(Link)] = None
|
32
|
-
__properties = ["href", "asAt", "links"]
|
34
|
+
__properties = ["href", "asAt", "staged", "links"]
|
33
35
|
|
34
36
|
class Config:
|
35
37
|
"""Pydantic configuration"""
|
@@ -53,8 +55,16 @@ class DeleteInstrumentsResponse(BaseModel):
|
|
53
55
|
"""Returns the dictionary representation of the model using alias"""
|
54
56
|
_dict = self.dict(by_alias=True,
|
55
57
|
exclude={
|
58
|
+
"staged",
|
56
59
|
},
|
57
60
|
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each value in staged (dict)
|
62
|
+
_field_dict = {}
|
63
|
+
if self.staged:
|
64
|
+
for _key in self.staged:
|
65
|
+
if self.staged[_key]:
|
66
|
+
_field_dict[_key] = self.staged[_key].to_dict()
|
67
|
+
_dict['staged'] = _field_dict
|
58
68
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
59
69
|
_items = []
|
60
70
|
if self.links:
|
@@ -67,6 +77,11 @@ class DeleteInstrumentsResponse(BaseModel):
|
|
67
77
|
if self.href is None and "href" in self.__fields_set__:
|
68
78
|
_dict['href'] = None
|
69
79
|
|
80
|
+
# set to None if staged (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.staged is None and "staged" in self.__fields_set__:
|
83
|
+
_dict['staged'] = None
|
84
|
+
|
70
85
|
# set to None if links (nullable) is None
|
71
86
|
# and __fields_set__ contains the field
|
72
87
|
if self.links is None and "links" in self.__fields_set__:
|
@@ -86,6 +101,12 @@ class DeleteInstrumentsResponse(BaseModel):
|
|
86
101
|
_obj = DeleteInstrumentsResponse.parse_obj({
|
87
102
|
"href": obj.get("href"),
|
88
103
|
"as_at": obj.get("asAt"),
|
104
|
+
"staged": dict(
|
105
|
+
(_k, StagedModificationsInfo.from_dict(_v))
|
106
|
+
for _k, _v in obj.get("staged").items()
|
107
|
+
)
|
108
|
+
if obj.get("staged") is not None
|
109
|
+
else None,
|
89
110
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
90
111
|
})
|
91
112
|
return _obj
|
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
23
|
from lusid.models.link import Link
|
24
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
24
25
|
|
25
26
|
class DeletedEntityResponse(BaseModel):
|
26
27
|
"""
|
@@ -31,8 +32,9 @@ class DeletedEntityResponse(BaseModel):
|
|
31
32
|
as_at: datetime = Field(..., alias="asAt", description="The asAt datetime at which the deletion was committed to LUSID.")
|
32
33
|
entity_type: Optional[StrictStr] = Field(None, alias="entityType", description="The type of the entity that the deleted response applies to.")
|
33
34
|
entity_unique_id: Optional[StrictStr] = Field(None, alias="entityUniqueId", description="The unique Id of the entity that the deleted response applies to.")
|
35
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
34
36
|
links: Optional[conlist(Link)] = None
|
35
|
-
__properties = ["href", "effectiveFrom", "asAt", "entityType", "entityUniqueId", "links"]
|
37
|
+
__properties = ["href", "effectiveFrom", "asAt", "entityType", "entityUniqueId", "stagedModifications", "links"]
|
36
38
|
|
37
39
|
class Config:
|
38
40
|
"""Pydantic configuration"""
|
@@ -58,6 +60,9 @@ class DeletedEntityResponse(BaseModel):
|
|
58
60
|
exclude={
|
59
61
|
},
|
60
62
|
exclude_none=True)
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
64
|
+
if self.staged_modifications:
|
65
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
61
66
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
62
67
|
_items = []
|
63
68
|
if self.links:
|
@@ -107,6 +112,7 @@ class DeletedEntityResponse(BaseModel):
|
|
107
112
|
"as_at": obj.get("asAt"),
|
108
113
|
"entity_type": obj.get("entityType"),
|
109
114
|
"entity_unique_id": obj.get("entityUniqueId"),
|
115
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
110
116
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
111
117
|
})
|
112
118
|
return _obj
|