lusid-sdk 2.1.405__py3-none-any.whl → 2.1.423__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 -8
- lusid/api/__init__.py +2 -2
- lusid/api/abor_api.py +8 -16
- 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/entities_api.py +180 -0
- lusid/api/{fund_configurations_api.py → fund_configuration_entities_api.py} +1 -1
- lusid/api/group_reconciliations_api.py +1418 -27
- 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 +27 -30
- 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 -6
- lusid/models/access_metadata_value.py +1 -1
- lusid/models/address_key_list.py +3 -3
- lusid/models/amount.py +69 -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/{component_rule.py → break_code_source.py} +17 -21
- lusid/models/create_group_reconciliation_definition_request.py +113 -0
- lusid/models/custom_entity_entity.py +146 -0
- lusid/models/decimal_list.py +3 -3
- lusid/models/diary_entry_request.py +10 -1
- lusid/models/fixed_schedule.py +3 -3
- lusid/models/float_schedule.py +4 -4
- lusid/models/flow_conventions.py +7 -1
- 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/group_reconciliation_aggregate_attribute_rule.py +2 -2
- lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
- 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/instrument.py +7 -1
- lusid/models/instrument_definition.py +8 -2
- 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/merger_event.py +19 -19
- 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/reference_list.py +6 -5
- lusid/models/reference_list_type.py +1 -0
- lusid/models/settlement_cycle.py +79 -0
- lusid/models/share_class_dealing_breakdown.py +3 -2
- lusid/models/stock_dividend_event.py +17 -3
- lusid/models/string_list.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/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.405.dist-info → lusid_sdk-2.1.423.dist-info}/METADATA +50 -23
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.423.dist-info}/RECORD +71 -55
- lusid/models/metadata_key_value_response.py +0 -86
- {lusid_sdk-2.1.405.dist-info → lusid_sdk-2.1.423.dist-info}/WHEEL +0 -0
lusid/models/instrument_list.py
CHANGED
@@ -27,15 +27,15 @@ class InstrumentList(ReferenceList):
|
|
27
27
|
InstrumentList
|
28
28
|
"""
|
29
29
|
values: conlist(StrictStr, 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:
|
@@ -19,7 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
21
|
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator
|
23
23
|
|
24
24
|
class MarketDataKeyRule(BaseModel):
|
25
25
|
"""
|
@@ -35,7 +35,8 @@ class MarketDataKeyRule(BaseModel):
|
|
35
35
|
price_source: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="priceSource", description="The source of the quote. For a given provider/supplier of market data there may be an additional qualifier, e.g. the exchange or bank that provided the quote")
|
36
36
|
mask: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, description="Allows for partial or complete override of the market asset resolved for a dependency Either a named override or a dot separated string (A.B.C.D.*). e.g. for Rates curve 'EUR.*' will replace the resolve MarketAsset 'GBP/12M', 'GBP/3M' with the EUR equivalent, if there are no wildcards in the mask, the mask is taken as the MarketAsset for any dependency matching the rule.")
|
37
37
|
source_system: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="sourceSystem", description="If set, this parameter will seek an external source of market data. Optional and, if omitted, will default to \"Lusid\". This means that data will be retrieved from the LUSID Quote Store and LUSID Complex Market Data Store. This can be set to \"MarketDataOverrides\" if Supplier is set to \"Client\".")
|
38
|
-
|
38
|
+
fall_through_on_access_denied: Optional[StrictBool] = Field(None, alias="fallThroughOnAccessDenied", description="When a user attempts to use a rule to access data to which they are not entitled, the rule will fail to resolve any market data. By default, such an access denied failure will stop any further attempts to resolve market data. This is so that differently entitled users always receive the same market data from market data resolution, if they have sufficient entitlements to retrieve the required data. If set to true, then an access denied failure will not stop further market data resolution, and resolution will continue with the next specified MarketDataKeyRule. Optional, and defaults to false.")
|
39
|
+
__properties = ["key", "supplier", "dataScope", "quoteType", "field", "quoteInterval", "asAt", "priceSource", "mask", "sourceSystem", "fallThroughOnAccessDenied"]
|
39
40
|
|
40
41
|
@validator('data_scope')
|
41
42
|
def data_scope_validate_regular_expression(cls, value):
|
@@ -126,6 +127,7 @@ class MarketDataKeyRule(BaseModel):
|
|
126
127
|
"as_at": obj.get("asAt"),
|
127
128
|
"price_source": obj.get("priceSource"),
|
128
129
|
"mask": obj.get("mask"),
|
129
|
-
"source_system": obj.get("sourceSystem")
|
130
|
+
"source_system": obj.get("sourceSystem"),
|
131
|
+
"fall_through_on_access_denied": obj.get("fallThroughOnAccessDenied")
|
130
132
|
})
|
131
133
|
return _obj
|
@@ -19,7 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
21
|
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator
|
23
23
|
from lusid.models.dependency_source_filter import DependencySourceFilter
|
24
24
|
|
25
25
|
class MarketDataSpecificRule(BaseModel):
|
@@ -37,7 +37,8 @@ class MarketDataSpecificRule(BaseModel):
|
|
37
37
|
mask: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, description="Allows for partial or complete override of the market asset resolved for a dependency Either a named override or a dot separated string (A.B.C.D.*). e.g. for Rates curve 'EUR.*' will replace the resolve MarketAsset 'GBP/12M', 'GBP/3M' with the EUR equivalent, if there are no wildcards in the mask, the mask is taken as the MarketAsset for any dependency matching the rule.")
|
38
38
|
dependency_source_filter: DependencySourceFilter = Field(..., alias="dependencySourceFilter")
|
39
39
|
source_system: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="sourceSystem", description="Determines from where LUSID should attempt to find the data. Optional and, if omitted, will default to \"Lusid\". This means that data will be retrieved from the Quotes store and the ComplexMarketData store. These can be populated using the Quotes and ComplexMarketData endpoints.")
|
40
|
-
|
40
|
+
fall_through_on_access_denied: Optional[StrictBool] = Field(None, alias="fallThroughOnAccessDenied", description="When a user attempts to use a rule to access data to which they are not entitled, the rule will fail to resolve any market data. By default, such an access denied failure will stop any further attempts to resolve market data. This is so that differently entitled users always receive the same market data from market data resolution, if they have sufficient entitlements to retrieve the required data. If set to true, then an access denied failure will not stop further market data resolution, and resolution will continue with the next specified MarketDataKeyRule. Optional, and defaults to false.")
|
41
|
+
__properties = ["key", "supplier", "dataScope", "quoteType", "field", "quoteInterval", "asAt", "priceSource", "mask", "dependencySourceFilter", "sourceSystem", "fallThroughOnAccessDenied"]
|
41
42
|
|
42
43
|
@validator('data_scope')
|
43
44
|
def data_scope_validate_regular_expression(cls, value):
|
@@ -127,6 +128,7 @@ class MarketDataSpecificRule(BaseModel):
|
|
127
128
|
"price_source": obj.get("priceSource"),
|
128
129
|
"mask": obj.get("mask"),
|
129
130
|
"dependency_source_filter": DependencySourceFilter.from_dict(obj.get("dependencySourceFilter")) if obj.get("dependencySourceFilter") is not None else None,
|
130
|
-
"source_system": obj.get("sourceSystem")
|
131
|
+
"source_system": obj.get("sourceSystem"),
|
132
|
+
"fall_through_on_access_denied": obj.get("fallThroughOnAccessDenied")
|
131
133
|
})
|
132
134
|
return _obj
|
lusid/models/merger_event.py
CHANGED
@@ -32,17 +32,17 @@ class MergerEvent(InstrumentEvent):
|
|
32
32
|
"""
|
33
33
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="The date the merger is announced.")
|
34
34
|
cash_and_security_offer_elections: Optional[conlist(CashAndSecurityOfferElection)] = Field(None, alias="cashAndSecurityOfferElections", description="List of possible CashAndSecurityOfferElections for this merger event")
|
35
|
-
|
35
|
+
cash_offer_elections: Optional[conlist(CashOfferElection)] = Field(None, alias="cashOfferElections", description="List of possible CashOfferElections for this merger event")
|
36
36
|
ex_date: datetime = Field(..., alias="exDate", description="The first date on which the holder of record of the original shares has entitled ownership of the new shares.")
|
37
37
|
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
38
38
|
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="Optional. Used in calculating cash-in-lieu of fractional shares.")
|
39
39
|
new_instrument: NewInstrument = Field(..., alias="newInstrument")
|
40
40
|
payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
|
41
41
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Optional. Date you have to be the holder of record of the original shares in order to receive the new shares.")
|
42
|
-
|
42
|
+
security_offer_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityOfferElections", description="List of possible SecurityOfferElections for this merger event")
|
43
43
|
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")
|
44
44
|
additional_properties: Dict[str, Any] = {}
|
45
|
-
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "
|
45
|
+
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashOfferElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityOfferElections"]
|
46
46
|
|
47
47
|
@validator('instrument_event_type')
|
48
48
|
def instrument_event_type_validate_enum(cls, value):
|
@@ -83,23 +83,23 @@ class MergerEvent(InstrumentEvent):
|
|
83
83
|
if _item:
|
84
84
|
_items.append(_item.to_dict())
|
85
85
|
_dict['cashAndSecurityOfferElections'] = _items
|
86
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cash_offer_elections (list)
|
87
87
|
_items = []
|
88
|
-
if self.
|
89
|
-
for _item in self.
|
88
|
+
if self.cash_offer_elections:
|
89
|
+
for _item in self.cash_offer_elections:
|
90
90
|
if _item:
|
91
91
|
_items.append(_item.to_dict())
|
92
|
-
_dict['
|
92
|
+
_dict['cashOfferElections'] = _items
|
93
93
|
# override the default output from pydantic by calling `to_dict()` of new_instrument
|
94
94
|
if self.new_instrument:
|
95
95
|
_dict['newInstrument'] = self.new_instrument.to_dict()
|
96
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of each item in security_offer_elections (list)
|
97
97
|
_items = []
|
98
|
-
if self.
|
99
|
-
for _item in self.
|
98
|
+
if self.security_offer_elections:
|
99
|
+
for _item in self.security_offer_elections:
|
100
100
|
if _item:
|
101
101
|
_items.append(_item.to_dict())
|
102
|
-
_dict['
|
102
|
+
_dict['securityOfferElections'] = _items
|
103
103
|
# puts key-value pairs in additional_properties in the top level
|
104
104
|
if self.additional_properties is not None:
|
105
105
|
for _key, _value in self.additional_properties.items():
|
@@ -115,10 +115,10 @@ class MergerEvent(InstrumentEvent):
|
|
115
115
|
if self.cash_and_security_offer_elections is None and "cash_and_security_offer_elections" in self.__fields_set__:
|
116
116
|
_dict['cashAndSecurityOfferElections'] = None
|
117
117
|
|
118
|
-
# set to None if
|
118
|
+
# set to None if cash_offer_elections (nullable) is None
|
119
119
|
# and __fields_set__ contains the field
|
120
|
-
if self.
|
121
|
-
_dict['
|
120
|
+
if self.cash_offer_elections is None and "cash_offer_elections" in self.__fields_set__:
|
121
|
+
_dict['cashOfferElections'] = None
|
122
122
|
|
123
123
|
# set to None if fractional_units_cash_currency (nullable) is None
|
124
124
|
# and __fields_set__ contains the field
|
@@ -135,10 +135,10 @@ class MergerEvent(InstrumentEvent):
|
|
135
135
|
if self.record_date is None and "record_date" in self.__fields_set__:
|
136
136
|
_dict['recordDate'] = None
|
137
137
|
|
138
|
-
# set to None if
|
138
|
+
# set to None if security_offer_elections (nullable) is None
|
139
139
|
# and __fields_set__ contains the field
|
140
|
-
if self.
|
141
|
-
_dict['
|
140
|
+
if self.security_offer_elections is None and "security_offer_elections" in self.__fields_set__:
|
141
|
+
_dict['securityOfferElections'] = None
|
142
142
|
|
143
143
|
return _dict
|
144
144
|
|
@@ -155,14 +155,14 @@ class MergerEvent(InstrumentEvent):
|
|
155
155
|
"instrument_event_type": obj.get("instrumentEventType"),
|
156
156
|
"announcement_date": obj.get("announcementDate"),
|
157
157
|
"cash_and_security_offer_elections": [CashAndSecurityOfferElection.from_dict(_item) for _item in obj.get("cashAndSecurityOfferElections")] if obj.get("cashAndSecurityOfferElections") is not None else None,
|
158
|
-
"
|
158
|
+
"cash_offer_elections": [CashOfferElection.from_dict(_item) for _item in obj.get("cashOfferElections")] if obj.get("cashOfferElections") is not None else None,
|
159
159
|
"ex_date": obj.get("exDate"),
|
160
160
|
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency"),
|
161
161
|
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
162
162
|
"new_instrument": NewInstrument.from_dict(obj.get("newInstrument")) if obj.get("newInstrument") is not None else None,
|
163
163
|
"payment_date": obj.get("paymentDate"),
|
164
164
|
"record_date": obj.get("recordDate"),
|
165
|
-
"
|
165
|
+
"security_offer_elections": [SecurityOfferElection.from_dict(_item) for _item in obj.get("securityOfferElections")] if obj.get("securityOfferElections") is not None else None
|
166
166
|
})
|
167
167
|
# store additional fields in additional_properties
|
168
168
|
for _key in obj.keys():
|
@@ -54,7 +54,8 @@ class OutputTransaction(BaseModel):
|
|
54
54
|
holding_ids: Optional[conlist(StrictInt)] = Field(None, alias="holdingIds", description="The collection of single identifiers for the holding within the portfolio. The holdingId is constructed from the LusidInstrumentId, sub-holding keys and currrency and is unique within the portfolio.")
|
55
55
|
source_type: Optional[StrictStr] = Field(None, alias="sourceType", description="The type of source that the transaction originated from, eg: InputTransaction, InstrumentEvent, HoldingAdjustment")
|
56
56
|
source_instrument_event_id: Optional[StrictStr] = Field(None, alias="sourceInstrumentEventId", description="The unique ID of the instrument event that the transaction is related to.")
|
57
|
-
|
57
|
+
transaction_group_id: Optional[StrictStr] = Field(None, alias="transactionGroupId", description="The identifier for grouping economic events across multiple transactions")
|
58
|
+
__properties = ["transactionId", "type", "description", "instrumentIdentifiers", "instrumentScope", "instrumentUid", "transactionDate", "settlementDate", "units", "transactionAmount", "transactionPrice", "totalConsideration", "exchangeRate", "transactionToPortfolioRate", "transactionCurrency", "properties", "counterpartyId", "source", "transactionStatus", "entryDateTime", "cancelDateTime", "realisedGainLoss", "holdingIds", "sourceType", "sourceInstrumentEventId", "transactionGroupId"]
|
58
59
|
|
59
60
|
@validator('transaction_status')
|
60
61
|
def transaction_status_validate_enum(cls, value):
|
@@ -175,6 +176,11 @@ class OutputTransaction(BaseModel):
|
|
175
176
|
if self.source_instrument_event_id is None and "source_instrument_event_id" in self.__fields_set__:
|
176
177
|
_dict['sourceInstrumentEventId'] = None
|
177
178
|
|
179
|
+
# set to None if transaction_group_id (nullable) is None
|
180
|
+
# and __fields_set__ contains the field
|
181
|
+
if self.transaction_group_id is None and "transaction_group_id" in self.__fields_set__:
|
182
|
+
_dict['transactionGroupId'] = None
|
183
|
+
|
178
184
|
return _dict
|
179
185
|
|
180
186
|
@classmethod
|
@@ -216,6 +222,7 @@ class OutputTransaction(BaseModel):
|
|
216
222
|
"realised_gain_loss": [RealisedGainLoss.from_dict(_item) for _item in obj.get("realisedGainLoss")] if obj.get("realisedGainLoss") is not None else None,
|
217
223
|
"holding_ids": obj.get("holdingIds"),
|
218
224
|
"source_type": obj.get("sourceType"),
|
219
|
-
"source_instrument_event_id": obj.get("sourceInstrumentEventId")
|
225
|
+
"source_instrument_event_id": obj.get("sourceInstrumentEventId"),
|
226
|
+
"transaction_group_id": obj.get("transactionGroupId")
|
220
227
|
})
|
221
228
|
return _obj
|
@@ -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, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.group_reconciliation_comparison_ruleset import GroupReconciliationComparisonRuleset
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfGroupReconciliationComparisonRuleset(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfGroupReconciliationComparisonRuleset
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(GroupReconciliationComparisonRuleset) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfGroupReconciliationComparisonRuleset:
|
52
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationComparisonRuleset from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self):
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
57
|
+
_dict = self.dict(by_alias=True,
|
58
|
+
exclude={
|
59
|
+
},
|
60
|
+
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
62
|
+
_items = []
|
63
|
+
if self.values:
|
64
|
+
for _item in self.values:
|
65
|
+
if _item:
|
66
|
+
_items.append(_item.to_dict())
|
67
|
+
_dict['values'] = _items
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
69
|
+
_items = []
|
70
|
+
if self.links:
|
71
|
+
for _item in self.links:
|
72
|
+
if _item:
|
73
|
+
_items.append(_item.to_dict())
|
74
|
+
_dict['links'] = _items
|
75
|
+
# set to None if next_page (nullable) is None
|
76
|
+
# and __fields_set__ contains the field
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
78
|
+
_dict['nextPage'] = None
|
79
|
+
|
80
|
+
# set to None if previous_page (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
83
|
+
_dict['previousPage'] = None
|
84
|
+
|
85
|
+
# set to None if href (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
88
|
+
_dict['href'] = None
|
89
|
+
|
90
|
+
# set to None if links (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
93
|
+
_dict['links'] = None
|
94
|
+
|
95
|
+
return _dict
|
96
|
+
|
97
|
+
@classmethod
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfGroupReconciliationComparisonRuleset:
|
99
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationComparisonRuleset from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfGroupReconciliationComparisonRuleset.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfGroupReconciliationComparisonRuleset.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [GroupReconciliationComparisonRuleset.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
110
|
+
"href": obj.get("href"),
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
@@ -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, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.group_reconciliation_definition import GroupReconciliationDefinition
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfGroupReconciliationDefinition(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfGroupReconciliationDefinition
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(GroupReconciliationDefinition) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfGroupReconciliationDefinition:
|
52
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationDefinition from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self):
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
57
|
+
_dict = self.dict(by_alias=True,
|
58
|
+
exclude={
|
59
|
+
},
|
60
|
+
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
62
|
+
_items = []
|
63
|
+
if self.values:
|
64
|
+
for _item in self.values:
|
65
|
+
if _item:
|
66
|
+
_items.append(_item.to_dict())
|
67
|
+
_dict['values'] = _items
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
69
|
+
_items = []
|
70
|
+
if self.links:
|
71
|
+
for _item in self.links:
|
72
|
+
if _item:
|
73
|
+
_items.append(_item.to_dict())
|
74
|
+
_dict['links'] = _items
|
75
|
+
# set to None if next_page (nullable) is None
|
76
|
+
# and __fields_set__ contains the field
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
78
|
+
_dict['nextPage'] = None
|
79
|
+
|
80
|
+
# set to None if previous_page (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
83
|
+
_dict['previousPage'] = None
|
84
|
+
|
85
|
+
# set to None if href (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
88
|
+
_dict['href'] = None
|
89
|
+
|
90
|
+
# set to None if links (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
93
|
+
_dict['links'] = None
|
94
|
+
|
95
|
+
return _dict
|
96
|
+
|
97
|
+
@classmethod
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfGroupReconciliationDefinition:
|
99
|
+
"""Create an instance of PagedResourceListOfGroupReconciliationDefinition from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfGroupReconciliationDefinition.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfGroupReconciliationDefinition.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [GroupReconciliationDefinition.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
110
|
+
"href": obj.get("href"),
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
@@ -28,15 +28,15 @@ class PortfolioGroupIdList(ReferenceList):
|
|
28
28
|
PortfolioGroupIdList
|
29
29
|
"""
|
30
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")
|
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
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
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
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -28,15 +28,15 @@ class PortfolioIdList(ReferenceList):
|
|
28
28
|
PortfolioIdList
|
29
29
|
"""
|
30
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")
|
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
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
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
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
lusid/models/property_list.py
CHANGED
@@ -28,15 +28,15 @@ class PropertyList(ReferenceList):
|
|
28
28
|
PropertyList
|
29
29
|
"""
|
30
30
|
values: conlist(ModelProperty, max_items=100, min_items=0) = 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")
|
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
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["referenceListType", "values"]
|
34
34
|
|
35
35
|
@validator('reference_list_type')
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
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
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
lusid/models/reference_list.py
CHANGED
@@ -26,14 +26,14 @@ class ReferenceList(BaseModel):
|
|
26
26
|
"""
|
27
27
|
ReferenceList
|
28
28
|
"""
|
29
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
29
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
|
30
30
|
__properties = ["referenceListType"]
|
31
31
|
|
32
32
|
@validator('reference_list_type')
|
33
33
|
def reference_list_type_validate_enum(cls, value):
|
34
34
|
"""Validates the enum"""
|
35
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
36
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
35
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
|
36
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
|
37
37
|
return value
|
38
38
|
|
39
39
|
class Config:
|
@@ -48,6 +48,7 @@ class ReferenceList(BaseModel):
|
|
48
48
|
__discriminator_value_class_map = {
|
49
49
|
'AddressKeyList': 'AddressKeyList',
|
50
50
|
'DecimalList': 'DecimalList',
|
51
|
+
'FundIdList': 'FundIdList',
|
51
52
|
'InstrumentList': 'InstrumentList',
|
52
53
|
'PortfolioGroupIdList': 'PortfolioGroupIdList',
|
53
54
|
'PortfolioIdList': 'PortfolioIdList',
|
@@ -73,7 +74,7 @@ class ReferenceList(BaseModel):
|
|
73
74
|
return json.dumps(self.to_dict())
|
74
75
|
|
75
76
|
@classmethod
|
76
|
-
def from_json(cls, json_str: str) -> Union(AddressKeyList, DecimalList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
77
|
+
def from_json(cls, json_str: str) -> Union(AddressKeyList, DecimalList, FundIdList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
77
78
|
"""Create an instance of ReferenceList from a JSON string"""
|
78
79
|
return cls.from_dict(json.loads(json_str))
|
79
80
|
|
@@ -86,7 +87,7 @@ class ReferenceList(BaseModel):
|
|
86
87
|
return _dict
|
87
88
|
|
88
89
|
@classmethod
|
89
|
-
def from_dict(cls, obj: dict) -> Union(AddressKeyList, DecimalList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
90
|
+
def from_dict(cls, obj: dict) -> Union(AddressKeyList, DecimalList, FundIdList, InstrumentList, PortfolioGroupIdList, PortfolioIdList, PropertyList, StringList):
|
90
91
|
"""Create an instance of ReferenceList from a dict"""
|
91
92
|
# look up the object type based on discriminator mapping
|
92
93
|
object_type = cls.get_discriminator_value(obj)
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List
|
22
|
+
from pydantic.v1 import BaseModel, Field, conint, conlist
|
23
|
+
from lusid.models.resource_id import ResourceId
|
24
|
+
|
25
|
+
class SettlementCycle(BaseModel):
|
26
|
+
"""
|
27
|
+
The settlement cycle for an instrument # noqa: E501
|
28
|
+
"""
|
29
|
+
business_day_offset: conint(strict=True, le=2147483647, ge=0) = Field(..., alias="businessDayOffset")
|
30
|
+
calendars: conlist(ResourceId) = Field(...)
|
31
|
+
__properties = ["businessDayOffset", "calendars"]
|
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) -> SettlementCycle:
|
48
|
+
"""Create an instance of SettlementCycle 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 calendars (list)
|
58
|
+
_items = []
|
59
|
+
if self.calendars:
|
60
|
+
for _item in self.calendars:
|
61
|
+
if _item:
|
62
|
+
_items.append(_item.to_dict())
|
63
|
+
_dict['calendars'] = _items
|
64
|
+
return _dict
|
65
|
+
|
66
|
+
@classmethod
|
67
|
+
def from_dict(cls, obj: dict) -> SettlementCycle:
|
68
|
+
"""Create an instance of SettlementCycle from a dict"""
|
69
|
+
if obj is None:
|
70
|
+
return None
|
71
|
+
|
72
|
+
if not isinstance(obj, dict):
|
73
|
+
return SettlementCycle.parse_obj(obj)
|
74
|
+
|
75
|
+
_obj = SettlementCycle.parse_obj({
|
76
|
+
"business_day_offset": obj.get("businessDayOffset"),
|
77
|
+
"calendars": [ResourceId.from_dict(_item) for _item in obj.get("calendars")] if obj.get("calendars") is not None else None
|
78
|
+
})
|
79
|
+
return _obj
|