lusid-sdk 2.1.414__py3-none-any.whl → 2.1.429__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 +40 -4
- lusid/api/__init__.py +2 -2
- lusid/api/allocations_api.py +2 -2
- lusid/api/chart_of_accounts_api.py +174 -0
- lusid/api/custom_entities_api.py +2 -2
- lusid/api/{fund_configurations_api.py → fund_configuration_entities_api.py} +1 -1
- lusid/api/group_reconciliations_api.py +1265 -34
- lusid/api/instruments_api.py +6 -6
- lusid/api/legal_entities_api.py +4 -4
- lusid/api/order_graph_api.py +4 -4
- lusid/api/portfolios_api.py +2 -2
- lusid/api/reference_lists_api.py +2 -2
- lusid/api/reference_portfolio_api.py +176 -0
- lusid/api/transaction_portfolios_api.py +2 -2
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +38 -2
- 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/bond_coupon_event.py +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/{component_rule.py → break_code_source.py} +17 -21
- lusid/models/capital_distribution_event.py +3 -3
- lusid/models/cash_dividend_event.py +3 -3
- lusid/models/cash_flow_event.py +3 -3
- lusid/models/cds_credit_event.py +3 -3
- lusid/models/cdx_credit_event.py +3 -3
- lusid/models/close_event.py +3 -3
- lusid/models/create_group_reconciliation_definition_request.py +113 -0
- lusid/models/credit_premium_cash_flow_event.py +3 -3
- lusid/models/decimal_list.py +3 -3
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/exercise_event.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fixed_schedule.py +3 -3
- lusid/models/float_schedule.py +4 -4
- 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/future_expiry_event.py +3 -3
- lusid/models/fx_forward_settlement_event.py +3 -3
- 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/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 +7 -5
- lusid/models/instrument_event_type.py +2 -0
- lusid/models/instrument_list.py +3 -3
- lusid/models/market_data_key_rule.py +5 -3
- lusid/models/market_data_specific_rule.py +5 -3
- lusid/models/maturity_event.py +3 -3
- lusid/models/mbs_coupon_event.py +97 -0
- lusid/models/mbs_principal_event.py +97 -0
- lusid/models/merger_event.py +22 -22
- lusid/models/open_event.py +3 -3
- lusid/models/output_transaction.py +9 -2
- 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_group_id_list.py +3 -3
- lusid/models/portfolio_id_list.py +3 -3
- lusid/models/property_list.py +3 -3
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reference_list.py +6 -5
- lusid/models/reference_list_type.py +1 -0
- lusid/models/reset_event.py +3 -3
- lusid/models/reverse_stock_split_event.py +3 -3
- 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/spin_off_event.py +3 -3
- 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/transaction.py +9 -2
- lusid/models/transaction_date_windows.py +85 -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_group_reconciliation_comparison_ruleset_request.py +91 -0
- lusid/models/update_group_reconciliation_definition_request.py +107 -0
- lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
- lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
- {lusid_sdk-2.1.414.dist-info → lusid_sdk-2.1.429.dist-info}/METADATA +46 -19
- {lusid_sdk-2.1.414.dist-info → lusid_sdk-2.1.429.dist-info}/RECORD +95 -77
- {lusid_sdk-2.1.414.dist-info → lusid_sdk-2.1.429.dist-info}/WHEEL +0 -0
@@ -18,9 +18,9 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, constr, validator
|
23
|
-
from lusid.models.
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist, constr, validator
|
23
|
+
from lusid.models.component_filter import ComponentFilter
|
24
24
|
from lusid.models.model_property import ModelProperty
|
25
25
|
|
26
26
|
class FundConfigurationRequest(BaseModel):
|
@@ -30,11 +30,11 @@ class FundConfigurationRequest(BaseModel):
|
|
30
30
|
code: constr(strict=True, max_length=64, min_length=1) = Field(...)
|
31
31
|
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
|
32
32
|
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
dealing_filters: conlist(ComponentFilter) = Field(..., alias="dealingFilters", description="The set of filters used to decide which JE lines are included in the dealing.")
|
34
|
+
pnl_filters: conlist(ComponentFilter) = Field(..., alias="pnlFilters", description="The set of filters used to decide which JE lines are included in the PnL.")
|
35
|
+
back_out_filters: conlist(ComponentFilter) = Field(..., alias="backOutFilters", description="The set of filters used to decide which JE lines are included in the back outs.")
|
36
36
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
|
37
|
-
__properties = ["code", "displayName", "description", "
|
37
|
+
__properties = ["code", "displayName", "description", "dealingFilters", "pnlFilters", "backOutFilters", "properties"]
|
38
38
|
|
39
39
|
@validator('code')
|
40
40
|
def code_validate_regular_expression(cls, value):
|
@@ -77,15 +77,27 @@ class FundConfigurationRequest(BaseModel):
|
|
77
77
|
exclude={
|
78
78
|
},
|
79
79
|
exclude_none=True)
|
80
|
-
# override the default output from pydantic by calling `to_dict()` of
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each item in dealing_filters (list)
|
81
|
+
_items = []
|
82
|
+
if self.dealing_filters:
|
83
|
+
for _item in self.dealing_filters:
|
84
|
+
if _item:
|
85
|
+
_items.append(_item.to_dict())
|
86
|
+
_dict['dealingFilters'] = _items
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of each item in pnl_filters (list)
|
88
|
+
_items = []
|
89
|
+
if self.pnl_filters:
|
90
|
+
for _item in self.pnl_filters:
|
91
|
+
if _item:
|
92
|
+
_items.append(_item.to_dict())
|
93
|
+
_dict['pnlFilters'] = _items
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each item in back_out_filters (list)
|
95
|
+
_items = []
|
96
|
+
if self.back_out_filters:
|
97
|
+
for _item in self.back_out_filters:
|
98
|
+
if _item:
|
99
|
+
_items.append(_item.to_dict())
|
100
|
+
_dict['backOutFilters'] = _items
|
89
101
|
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
90
102
|
_field_dict = {}
|
91
103
|
if self.properties:
|
@@ -123,9 +135,9 @@ class FundConfigurationRequest(BaseModel):
|
|
123
135
|
"code": obj.get("code"),
|
124
136
|
"display_name": obj.get("displayName"),
|
125
137
|
"description": obj.get("description"),
|
126
|
-
"
|
127
|
-
"
|
128
|
-
"
|
138
|
+
"dealing_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("dealingFilters")] if obj.get("dealingFilters") is not None else None,
|
139
|
+
"pnl_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("pnlFilters")] if obj.get("pnlFilters") is not None else None,
|
140
|
+
"back_out_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("backOutFilters")] if obj.get("backOutFilters") is not None else None,
|
129
141
|
"properties": dict(
|
130
142
|
(_k, ModelProperty.from_dict(_v))
|
131
143
|
for _k, _v in obj.get("properties").items()
|
@@ -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.v1 import Field, StrictStr, conlist, validator
|
23
|
+
from lusid.models.reference_list import ReferenceList
|
24
|
+
from lusid.models.resource_id import ResourceId
|
25
|
+
|
26
|
+
class FundIdList(ReferenceList):
|
27
|
+
"""
|
28
|
+
FundIdList
|
29
|
+
"""
|
30
|
+
values: conlist(ResourceId, max_items=100) = Field(...)
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
33
|
+
__properties = ["referenceListType", "values"]
|
34
|
+
|
35
|
+
@validator('reference_list_type')
|
36
|
+
def reference_list_type_validate_enum(cls, value):
|
37
|
+
"""Validates the enum"""
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
40
|
+
return value
|
41
|
+
|
42
|
+
class Config:
|
43
|
+
"""Pydantic configuration"""
|
44
|
+
allow_population_by_field_name = True
|
45
|
+
validate_assignment = True
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
return json.dumps(self.to_dict())
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_json(cls, json_str: str) -> FundIdList:
|
57
|
+
"""Create an instance of FundIdList from a JSON string"""
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
59
|
+
|
60
|
+
def to_dict(self):
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
62
|
+
_dict = self.dict(by_alias=True,
|
63
|
+
exclude={
|
64
|
+
"additional_properties"
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
68
|
+
_items = []
|
69
|
+
if self.values:
|
70
|
+
for _item in self.values:
|
71
|
+
if _item:
|
72
|
+
_items.append(_item.to_dict())
|
73
|
+
_dict['values'] = _items
|
74
|
+
# puts key-value pairs in additional_properties in the top level
|
75
|
+
if self.additional_properties is not None:
|
76
|
+
for _key, _value in self.additional_properties.items():
|
77
|
+
_dict[_key] = _value
|
78
|
+
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> FundIdList:
|
83
|
+
"""Create an instance of FundIdList from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return FundIdList.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = FundIdList.parse_obj({
|
91
|
+
"reference_list_type": obj.get("referenceListType"),
|
92
|
+
"values": [ResourceId.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None
|
93
|
+
})
|
94
|
+
# store additional fields in additional_properties
|
95
|
+
for _key in obj.keys():
|
96
|
+
if _key not in cls.__properties:
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
98
|
+
|
99
|
+
return _obj
|
@@ -29,15 +29,15 @@ class FutureExpiryEvent(InstrumentEvent):
|
|
29
29
|
expiry_date: datetime = Field(..., alias="expiryDate", description="Expiry date of the Future instrument.")
|
30
30
|
settlement_currency: StrictStr = Field(..., alias="settlementCurrency", description="Settlement currency of the Future instrument.")
|
31
31
|
notional_amount_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="notionalAmountPerUnit", description="The notional amount of each unit in the Future instrument.")
|
32
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
32
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent")
|
33
33
|
additional_properties: Dict[str, Any] = {}
|
34
34
|
__properties = ["instrumentEventType", "expiryDate", "settlementCurrency", "notionalAmountPerUnit"]
|
35
35
|
|
36
36
|
@validator('instrument_event_type')
|
37
37
|
def instrument_event_type_validate_enum(cls, value):
|
38
38
|
"""Validates the enum"""
|
39
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
40
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
39
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent'):
|
40
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent', 'MbsCouponEvent', 'MbsPrincipalEvent')")
|
41
41
|
return value
|
42
42
|
|
43
43
|
class Config:
|
@@ -38,15 +38,15 @@ class FxForwardSettlementEvent(InstrumentEvent):
|
|
38
38
|
domestic_to_foreign_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="domesticToForeignRate", description="Domestic currency to foreign currency FX rate. Not required, only used to override quotes.")
|
39
39
|
domestic_to_settlement_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="domesticToSettlementRate", description="Domestic currency to settlement currency FX rate Not required, only used to override quotes.")
|
40
40
|
foreign_to_settlement_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="foreignToSettlementRate", description="Foreign currency to settlement currency FX rate Not required, only used to override quotes.")
|
41
|
-
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")
|
41
|
+
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")
|
42
42
|
additional_properties: Dict[str, Any] = {}
|
43
43
|
__properties = ["instrumentEventType", "maturityDate", "domAmountPerUnit", "domCcy", "fgnAmountPerUnit", "fgnCcy", "isNdf", "fixingDate", "settlementCcy", "cashFlowPerUnit", "domesticToForeignRate", "domesticToSettlementRate", "foreignToSettlementRate"]
|
44
44
|
|
45
45
|
@validator('instrument_event_type')
|
46
46
|
def instrument_event_type_validate_enum(cls, value):
|
47
47
|
"""Validates the enum"""
|
48
|
-
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'):
|
49
|
-
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')")
|
48
|
+
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'):
|
49
|
+
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')")
|
50
50
|
return value
|
51
51
|
|
52
52
|
class Config:
|
@@ -0,0 +1,136 @@
|
|
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, StrictStr
|
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
|
+
from lusid.models.version import Version
|
31
|
+
|
32
|
+
class GroupReconciliationDefinition(BaseModel):
|
33
|
+
"""
|
34
|
+
GroupReconciliationDefinition
|
35
|
+
"""
|
36
|
+
id: Optional[ResourceId] = None
|
37
|
+
display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the Group Reconciliation Definition")
|
38
|
+
description: Optional[StrictStr] = Field(None, description="The description of the Group Reconciliation Definition")
|
39
|
+
portfolio_entity_ids: Optional[GroupReconciliationDefinitionPortfolioEntityIds] = Field(None, alias="portfolioEntityIds")
|
40
|
+
recipe_ids: Optional[GroupReconciliationDefinitionRecipeIds] = Field(None, alias="recipeIds")
|
41
|
+
currencies: Optional[GroupReconciliationDefinitionCurrencies] = None
|
42
|
+
transaction_date_windows: Optional[TransactionDateWindows] = Field(None, alias="transactionDateWindows")
|
43
|
+
comparison_ruleset_ids: Optional[GroupReconciliationDefinitionComparisonRulesetIds] = Field(None, alias="comparisonRulesetIds")
|
44
|
+
break_code_source: Optional[BreakCodeSource] = Field(None, alias="breakCodeSource")
|
45
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
46
|
+
version: Optional[Version] = None
|
47
|
+
__properties = ["id", "displayName", "description", "portfolioEntityIds", "recipeIds", "currencies", "transactionDateWindows", "comparisonRulesetIds", "breakCodeSource", "href", "version"]
|
48
|
+
|
49
|
+
class Config:
|
50
|
+
"""Pydantic configuration"""
|
51
|
+
allow_population_by_field_name = True
|
52
|
+
validate_assignment = True
|
53
|
+
|
54
|
+
def to_str(self) -> str:
|
55
|
+
"""Returns the string representation of the model using alias"""
|
56
|
+
return pprint.pformat(self.dict(by_alias=True))
|
57
|
+
|
58
|
+
def to_json(self) -> str:
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
60
|
+
return json.dumps(self.to_dict())
|
61
|
+
|
62
|
+
@classmethod
|
63
|
+
def from_json(cls, json_str: str) -> GroupReconciliationDefinition:
|
64
|
+
"""Create an instance of GroupReconciliationDefinition from a JSON string"""
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
66
|
+
|
67
|
+
def to_dict(self):
|
68
|
+
"""Returns the dictionary representation of the model using alias"""
|
69
|
+
_dict = self.dict(by_alias=True,
|
70
|
+
exclude={
|
71
|
+
},
|
72
|
+
exclude_none=True)
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
74
|
+
if self.id:
|
75
|
+
_dict['id'] = self.id.to_dict()
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of portfolio_entity_ids
|
77
|
+
if self.portfolio_entity_ids:
|
78
|
+
_dict['portfolioEntityIds'] = self.portfolio_entity_ids.to_dict()
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of recipe_ids
|
80
|
+
if self.recipe_ids:
|
81
|
+
_dict['recipeIds'] = self.recipe_ids.to_dict()
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of currencies
|
83
|
+
if self.currencies:
|
84
|
+
_dict['currencies'] = self.currencies.to_dict()
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of transaction_date_windows
|
86
|
+
if self.transaction_date_windows:
|
87
|
+
_dict['transactionDateWindows'] = self.transaction_date_windows.to_dict()
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of comparison_ruleset_ids
|
89
|
+
if self.comparison_ruleset_ids:
|
90
|
+
_dict['comparisonRulesetIds'] = self.comparison_ruleset_ids.to_dict()
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of break_code_source
|
92
|
+
if self.break_code_source:
|
93
|
+
_dict['breakCodeSource'] = self.break_code_source.to_dict()
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
95
|
+
if self.version:
|
96
|
+
_dict['version'] = self.version.to_dict()
|
97
|
+
# set to None if display_name (nullable) is None
|
98
|
+
# and __fields_set__ contains the field
|
99
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
100
|
+
_dict['displayName'] = None
|
101
|
+
|
102
|
+
# set to None if description (nullable) is None
|
103
|
+
# and __fields_set__ contains the field
|
104
|
+
if self.description is None and "description" in self.__fields_set__:
|
105
|
+
_dict['description'] = None
|
106
|
+
|
107
|
+
# set to None if href (nullable) is None
|
108
|
+
# and __fields_set__ contains the field
|
109
|
+
if self.href is None and "href" in self.__fields_set__:
|
110
|
+
_dict['href'] = None
|
111
|
+
|
112
|
+
return _dict
|
113
|
+
|
114
|
+
@classmethod
|
115
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationDefinition:
|
116
|
+
"""Create an instance of GroupReconciliationDefinition from a dict"""
|
117
|
+
if obj is None:
|
118
|
+
return None
|
119
|
+
|
120
|
+
if not isinstance(obj, dict):
|
121
|
+
return GroupReconciliationDefinition.parse_obj(obj)
|
122
|
+
|
123
|
+
_obj = GroupReconciliationDefinition.parse_obj({
|
124
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
125
|
+
"display_name": obj.get("displayName"),
|
126
|
+
"description": obj.get("description"),
|
127
|
+
"portfolio_entity_ids": GroupReconciliationDefinitionPortfolioEntityIds.from_dict(obj.get("portfolioEntityIds")) if obj.get("portfolioEntityIds") is not None else None,
|
128
|
+
"recipe_ids": GroupReconciliationDefinitionRecipeIds.from_dict(obj.get("recipeIds")) if obj.get("recipeIds") is not None else None,
|
129
|
+
"currencies": GroupReconciliationDefinitionCurrencies.from_dict(obj.get("currencies")) if obj.get("currencies") is not None else None,
|
130
|
+
"transaction_date_windows": TransactionDateWindows.from_dict(obj.get("transactionDateWindows")) if obj.get("transactionDateWindows") is not None else None,
|
131
|
+
"comparison_ruleset_ids": GroupReconciliationDefinitionComparisonRulesetIds.from_dict(obj.get("comparisonRulesetIds")) if obj.get("comparisonRulesetIds") is not None else None,
|
132
|
+
"break_code_source": BreakCodeSource.from_dict(obj.get("breakCodeSource")) if obj.get("breakCodeSource") is not None else None,
|
133
|
+
"href": obj.get("href"),
|
134
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
135
|
+
})
|
136
|
+
return _obj
|
@@ -0,0 +1,83 @@
|
|
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
|
23
|
+
from lusid.models.resource_id import ResourceId
|
24
|
+
|
25
|
+
class GroupReconciliationDefinitionComparisonRulesetIds(BaseModel):
|
26
|
+
"""
|
27
|
+
GroupReconciliationDefinitionComparisonRulesetIds
|
28
|
+
"""
|
29
|
+
transaction_reconciliation: Optional[ResourceId] = Field(None, alias="transactionReconciliation")
|
30
|
+
holding_reconciliation: Optional[ResourceId] = Field(None, alias="holdingReconciliation")
|
31
|
+
valuation_reconciliation: Optional[ResourceId] = Field(None, alias="valuationReconciliation")
|
32
|
+
__properties = ["transactionReconciliation", "holdingReconciliation", "valuationReconciliation"]
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
"""Pydantic configuration"""
|
36
|
+
allow_population_by_field_name = True
|
37
|
+
validate_assignment = True
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> GroupReconciliationDefinitionComparisonRulesetIds:
|
49
|
+
"""Create an instance of GroupReconciliationDefinitionComparisonRulesetIds from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.dict(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of transaction_reconciliation
|
59
|
+
if self.transaction_reconciliation:
|
60
|
+
_dict['transactionReconciliation'] = self.transaction_reconciliation.to_dict()
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of holding_reconciliation
|
62
|
+
if self.holding_reconciliation:
|
63
|
+
_dict['holdingReconciliation'] = self.holding_reconciliation.to_dict()
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of valuation_reconciliation
|
65
|
+
if self.valuation_reconciliation:
|
66
|
+
_dict['valuationReconciliation'] = self.valuation_reconciliation.to_dict()
|
67
|
+
return _dict
|
68
|
+
|
69
|
+
@classmethod
|
70
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationDefinitionComparisonRulesetIds:
|
71
|
+
"""Create an instance of GroupReconciliationDefinitionComparisonRulesetIds from a dict"""
|
72
|
+
if obj is None:
|
73
|
+
return None
|
74
|
+
|
75
|
+
if not isinstance(obj, dict):
|
76
|
+
return GroupReconciliationDefinitionComparisonRulesetIds.parse_obj(obj)
|
77
|
+
|
78
|
+
_obj = GroupReconciliationDefinitionComparisonRulesetIds.parse_obj({
|
79
|
+
"transaction_reconciliation": ResourceId.from_dict(obj.get("transactionReconciliation")) if obj.get("transactionReconciliation") is not None else None,
|
80
|
+
"holding_reconciliation": ResourceId.from_dict(obj.get("holdingReconciliation")) if obj.get("holdingReconciliation") is not None else None,
|
81
|
+
"valuation_reconciliation": ResourceId.from_dict(obj.get("valuationReconciliation")) if obj.get("valuationReconciliation") is not None else None
|
82
|
+
})
|
83
|
+
return _obj
|
@@ -0,0 +1,71 @@
|
|
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
|
22
|
+
from pydantic.v1 import BaseModel, Field, constr
|
23
|
+
|
24
|
+
class GroupReconciliationDefinitionCurrencies(BaseModel):
|
25
|
+
"""
|
26
|
+
GroupReconciliationDefinitionCurrencies
|
27
|
+
"""
|
28
|
+
left: constr(strict=True, max_length=3, min_length=0) = Field(..., description="Currency for the left side of a reconciliation")
|
29
|
+
right: constr(strict=True, max_length=3, min_length=0) = Field(..., description="Currency for the right side of a reconciliation")
|
30
|
+
__properties = ["left", "right"]
|
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) -> GroupReconciliationDefinitionCurrencies:
|
47
|
+
"""Create an instance of GroupReconciliationDefinitionCurrencies 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
|
+
return _dict
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationDefinitionCurrencies:
|
60
|
+
"""Create an instance of GroupReconciliationDefinitionCurrencies from a dict"""
|
61
|
+
if obj is None:
|
62
|
+
return None
|
63
|
+
|
64
|
+
if not isinstance(obj, dict):
|
65
|
+
return GroupReconciliationDefinitionCurrencies.parse_obj(obj)
|
66
|
+
|
67
|
+
_obj = GroupReconciliationDefinitionCurrencies.parse_obj({
|
68
|
+
"left": obj.get("left"),
|
69
|
+
"right": obj.get("right")
|
70
|
+
})
|
71
|
+
return _obj
|
@@ -0,0 +1,86 @@
|
|
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.v1 import BaseModel, Field, conlist
|
23
|
+
from lusid.models.portfolio_entity_id import PortfolioEntityId
|
24
|
+
|
25
|
+
class GroupReconciliationDefinitionPortfolioEntityIds(BaseModel):
|
26
|
+
"""
|
27
|
+
GroupReconciliationDefinitionPortfolioEntityIds
|
28
|
+
"""
|
29
|
+
left: conlist(PortfolioEntityId, min_items=1) = Field(..., description="Portfolio Entity Id of the left side of a reconciliation")
|
30
|
+
right: conlist(PortfolioEntityId, min_items=1) = Field(..., description="Portfolio Entity Id of the right side of a reconciliation")
|
31
|
+
__properties = ["left", "right"]
|
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) -> GroupReconciliationDefinitionPortfolioEntityIds:
|
48
|
+
"""Create an instance of GroupReconciliationDefinitionPortfolioEntityIds 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 left (list)
|
58
|
+
_items = []
|
59
|
+
if self.left:
|
60
|
+
for _item in self.left:
|
61
|
+
if _item:
|
62
|
+
_items.append(_item.to_dict())
|
63
|
+
_dict['left'] = _items
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of each item in right (list)
|
65
|
+
_items = []
|
66
|
+
if self.right:
|
67
|
+
for _item in self.right:
|
68
|
+
if _item:
|
69
|
+
_items.append(_item.to_dict())
|
70
|
+
_dict['right'] = _items
|
71
|
+
return _dict
|
72
|
+
|
73
|
+
@classmethod
|
74
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationDefinitionPortfolioEntityIds:
|
75
|
+
"""Create an instance of GroupReconciliationDefinitionPortfolioEntityIds from a dict"""
|
76
|
+
if obj is None:
|
77
|
+
return None
|
78
|
+
|
79
|
+
if not isinstance(obj, dict):
|
80
|
+
return GroupReconciliationDefinitionPortfolioEntityIds.parse_obj(obj)
|
81
|
+
|
82
|
+
_obj = GroupReconciliationDefinitionPortfolioEntityIds.parse_obj({
|
83
|
+
"left": [PortfolioEntityId.from_dict(_item) for _item in obj.get("left")] if obj.get("left") is not None else None,
|
84
|
+
"right": [PortfolioEntityId.from_dict(_item) for _item in obj.get("right")] if obj.get("right") is not None else None
|
85
|
+
})
|
86
|
+
return _obj
|