lusid-sdk 2.1.322__py3-none-any.whl → 2.1.390__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 +64 -0
- lusid/api/__init__.py +5 -1
- lusid/api/data_types_api.py +160 -0
- lusid/api/entities_api.py +172 -0
- lusid/api/funds_api.py +221 -8
- lusid/api/group_reconciliations_api.py +378 -0
- lusid/api/order_management_api.py +321 -0
- lusid/api/workspace_api.py +3433 -0
- lusid/configuration.py +16 -7
- lusid/models/__init__.py +60 -0
- lusid/models/accept_estimate_valuation_point_response.py +100 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/action_id.py +1 -1
- lusid/models/amortisation_event.py +3 -3
- lusid/models/applicable_instrument_event.py +14 -2
- 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/calendar.py +17 -2
- 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/close_event.py +3 -3
- lusid/models/close_period_diary_entry_request.py +1 -1
- lusid/models/create_group_reconciliation_comparison_ruleset_request.py +97 -0
- lusid/models/custom_entity_definition.py +17 -2
- lusid/models/custom_entity_type.py +17 -2
- lusid/models/data_type.py +14 -8
- lusid/models/data_type_entity.py +131 -0
- lusid/models/diary_entry.py +1 -1
- lusid/models/diary_entry_request.py +1 -1
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/entity_change_item.py +121 -0
- lusid/models/exercise_event.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee.py +1 -1
- lusid/models/fee_request.py +1 -1
- lusid/models/flow_conventions.py +1 -1
- lusid/models/fund_amount.py +1 -1
- lusid/models/fund_configuration.py +6 -6
- lusid/models/fund_configuration_request.py +6 -6
- lusid/models/fund_details.py +74 -0
- lusid/models/future_expiry_event.py +3 -3
- lusid/models/futures_contract_details.py +6 -1
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/generated_event_diagnostics.py +75 -0
- lusid/models/group_reconciliation_aggregate_attribute_rule.py +84 -0
- lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +71 -0
- lusid/models/group_reconciliation_comparison_rule_string_value_map.py +73 -0
- lusid/models/group_reconciliation_comparison_rule_tolerance.py +71 -0
- lusid/models/group_reconciliation_comparison_ruleset.py +125 -0
- lusid/models/group_reconciliation_core_attribute_rule.py +95 -0
- lusid/models/group_reconciliation_core_comparison_rule_operand.py +71 -0
- lusid/models/index_convention.py +1 -1
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument_event.py +7 -5
- lusid/models/instrument_event_instruction.py +19 -4
- lusid/models/instrument_event_type.py +2 -0
- lusid/models/instrument_resolution_detail.py +19 -5
- lusid/models/journal_entry_line.py +5 -3
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/new_instrument.py +10 -2
- lusid/models/open_event.py +3 -3
- lusid/models/order_graph_block_order_detail.py +1 -1
- lusid/models/order_update_request.py +121 -0
- lusid/models/paged_resource_list_of_valuation_point_overview.py +113 -0
- lusid/models/paged_resource_list_of_workspace.py +113 -0
- lusid/models/paged_resource_list_of_workspace_item.py +113 -0
- lusid/models/person.py +17 -2
- lusid/models/placement_update_request.py +6 -1
- lusid/models/previous_nav.py +3 -3
- lusid/models/quote_access_metadata_rule_id.py +2 -2
- lusid/models/quote_series_id.py +2 -2
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/resource_list_of_entity_change_item.py +113 -0
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +20 -6
- lusid/models/share_class_amount.py +7 -9
- lusid/models/share_class_breakdown.py +9 -18
- lusid/models/share_class_dealing_breakdown.py +96 -0
- lusid/models/share_class_details.py +5 -3
- lusid/models/spin_off_event.py +3 -3
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +21 -7
- lusid/models/swap_cash_flow_event.py +97 -0
- lusid/models/swap_principal_event.py +97 -0
- lusid/models/transaction_diagnostics.py +71 -0
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/update_orders_response.py +153 -0
- lusid/models/valuation_point_data_response.py +22 -2
- lusid/models/valuation_point_overview.py +125 -0
- lusid/models/weighted_instrument.py +9 -2
- lusid/models/workspace.py +92 -0
- lusid/models/workspace_creation_request.py +78 -0
- lusid/models/workspace_item.py +105 -0
- lusid/models/workspace_item_creation_request.py +91 -0
- lusid/models/workspace_item_update_request.py +82 -0
- lusid/models/workspace_update_request.py +69 -0
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.390.dist-info}/METADATA +58 -1
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.390.dist-info}/RECORD +106 -74
- {lusid_sdk-2.1.322.dist-info → lusid_sdk-2.1.390.dist-info}/WHEEL +0 -0
lusid/models/calendar.py
CHANGED
@@ -20,6 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
|
+
from lusid.models.link import Link
|
23
24
|
from lusid.models.model_property import ModelProperty
|
24
25
|
from lusid.models.resource_id import ResourceId
|
25
26
|
from lusid.models.version import Version
|
@@ -36,7 +37,8 @@ class Calendar(BaseModel):
|
|
36
37
|
source_provider: constr(strict=True, min_length=1) = Field(..., alias="sourceProvider")
|
37
38
|
properties: conlist(ModelProperty) = Field(...)
|
38
39
|
version: Optional[Version] = None
|
39
|
-
|
40
|
+
links: Optional[conlist(Link)] = None
|
41
|
+
__properties = ["href", "id", "type", "weekendMask", "sourceProvider", "properties", "version", "links"]
|
40
42
|
|
41
43
|
class Config:
|
42
44
|
"""Pydantic configuration"""
|
@@ -78,11 +80,23 @@ class Calendar(BaseModel):
|
|
78
80
|
# override the default output from pydantic by calling `to_dict()` of version
|
79
81
|
if self.version:
|
80
82
|
_dict['version'] = self.version.to_dict()
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
84
|
+
_items = []
|
85
|
+
if self.links:
|
86
|
+
for _item in self.links:
|
87
|
+
if _item:
|
88
|
+
_items.append(_item.to_dict())
|
89
|
+
_dict['links'] = _items
|
81
90
|
# set to None if href (nullable) is None
|
82
91
|
# and __fields_set__ contains the field
|
83
92
|
if self.href is None and "href" in self.__fields_set__:
|
84
93
|
_dict['href'] = None
|
85
94
|
|
95
|
+
# set to None if links (nullable) is None
|
96
|
+
# and __fields_set__ contains the field
|
97
|
+
if self.links is None and "links" in self.__fields_set__:
|
98
|
+
_dict['links'] = None
|
99
|
+
|
86
100
|
return _dict
|
87
101
|
|
88
102
|
@classmethod
|
@@ -101,6 +115,7 @@ class Calendar(BaseModel):
|
|
101
115
|
"weekend_mask": WeekendMask.from_dict(obj.get("weekendMask")) if obj.get("weekendMask") is not None else None,
|
102
116
|
"source_provider": obj.get("sourceProvider"),
|
103
117
|
"properties": [ModelProperty.from_dict(_item) for _item in obj.get("properties")] if obj.get("properties") is not None else None,
|
104
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
118
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
119
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
105
120
|
})
|
106
121
|
return _obj
|
@@ -32,15 +32,15 @@ class CapitalDistributionEvent(InstrumentEvent):
|
|
32
32
|
ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party.")
|
33
33
|
payment_date: datetime = Field(..., alias="paymentDate", description="The date the company begins distributing the dividend.")
|
34
34
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
35
|
-
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")
|
35
|
+
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")
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
37
37
|
__properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate"]
|
38
38
|
|
39
39
|
@validator('instrument_event_type')
|
40
40
|
def instrument_event_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
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'):
|
43
|
-
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')")
|
42
|
+
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'):
|
43
|
+
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')")
|
44
44
|
return value
|
45
45
|
|
46
46
|
class Config:
|
@@ -32,15 +32,15 @@ class CashDividendEvent(InstrumentEvent):
|
|
32
32
|
cash_elections: conlist(CashElection) = Field(..., alias="cashElections", description="Possible elections for this event, each keyed with a unique identifier.")
|
33
33
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date on which the dividend is announced by the company.")
|
34
34
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
35
|
-
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")
|
35
|
+
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")
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
37
37
|
__properties = ["instrumentEventType", "paymentDate", "exDate", "cashElections", "announcementDate", "recordDate"]
|
38
38
|
|
39
39
|
@validator('instrument_event_type')
|
40
40
|
def instrument_event_type_validate_enum(cls, value):
|
41
41
|
"""Validates the enum"""
|
42
|
-
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'):
|
43
|
-
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')")
|
42
|
+
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'):
|
43
|
+
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')")
|
44
44
|
return value
|
45
45
|
|
46
46
|
class Config:
|
lusid/models/cash_flow_event.py
CHANGED
@@ -29,15 +29,15 @@ class CashFlowEvent(InstrumentEvent):
|
|
29
29
|
"""
|
30
30
|
cash_flow_value: CashFlowValue = Field(..., alias="cashFlowValue")
|
31
31
|
event_type: constr(strict=True, min_length=1) = Field(..., alias="eventType", description="What type of internal event does this represent; coupon, principal, premium etc.")
|
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")
|
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")
|
33
33
|
additional_properties: Dict[str, Any] = {}
|
34
34
|
__properties = ["instrumentEventType", "cashFlowValue", "eventType"]
|
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'):
|
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')")
|
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'):
|
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')")
|
41
41
|
return value
|
42
42
|
|
43
43
|
class Config:
|
lusid/models/close_event.py
CHANGED
@@ -28,15 +28,15 @@ class CloseEvent(InstrumentEvent):
|
|
28
28
|
"""
|
29
29
|
start_date: Optional[datetime] = Field(None, alias="startDate", description="The first date on which the instrument could close")
|
30
30
|
end_date: Optional[datetime] = Field(None, alias="endDate", description="The last date on which the instrument could close")
|
31
|
-
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")
|
31
|
+
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")
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
33
33
|
__properties = ["instrumentEventType", "startDate", "endDate"]
|
34
34
|
|
35
35
|
@validator('instrument_event_type')
|
36
36
|
def instrument_event_type_validate_enum(cls, value):
|
37
37
|
"""Validates the enum"""
|
38
|
-
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'):
|
39
|
-
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')")
|
38
|
+
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'):
|
39
|
+
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')")
|
40
40
|
return value
|
41
41
|
|
42
42
|
class Config:
|
@@ -30,7 +30,7 @@ class ClosePeriodDiaryEntryRequest(BaseModel):
|
|
30
30
|
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="Identifiable Name assigned to the period. Where left blank, the system will generate a name in the format 'yyyyMMDD'.")
|
31
31
|
effective_at: Optional[datetime] = Field(None, alias="effectiveAt", description="The effective time of the diary entry.")
|
32
32
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
33
|
-
status: Optional[StrictStr] = Field(None, description="The status of
|
33
|
+
status: Optional[StrictStr] = Field(None, description="The status of a Diary Entry of Type 'PeriodBoundary'. Defaults to 'Estimate' when closing a period, and supports 'Estimate' and 'Final' for closing periods and 'Final' for locking periods.")
|
34
34
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
|
35
35
|
closing_options: Optional[conlist(StrictStr)] = Field(None, alias="closingOptions", description="The options which will be executed once a period is closed or locked.")
|
36
36
|
__properties = ["diaryEntryCode", "name", "effectiveAt", "queryAsAt", "status", "properties", "closingOptions"]
|
@@ -0,0 +1,97 @@
|
|
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, constr
|
23
|
+
from lusid.models.group_reconciliation_aggregate_attribute_rule import GroupReconciliationAggregateAttributeRule
|
24
|
+
from lusid.models.group_reconciliation_core_attribute_rule import GroupReconciliationCoreAttributeRule
|
25
|
+
from lusid.models.resource_id import ResourceId
|
26
|
+
|
27
|
+
class CreateGroupReconciliationComparisonRulesetRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
CreateGroupReconciliationComparisonRulesetRequest
|
30
|
+
"""
|
31
|
+
id: ResourceId = Field(...)
|
32
|
+
display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="The name of the ruleset")
|
33
|
+
reconciliation_type: constr(strict=True, min_length=1) = Field(..., alias="reconciliationType", description="The type of reconciliation to perform. \"Holding\" | \"Transaction\" | \"Valuation\"")
|
34
|
+
core_attribute_rules: conlist(GroupReconciliationCoreAttributeRule, min_items=1) = Field(..., alias="coreAttributeRules", description="The core comparison rules")
|
35
|
+
aggregate_attribute_rules: conlist(GroupReconciliationAggregateAttributeRule, min_items=1) = Field(..., alias="aggregateAttributeRules", description="The aggregate comparison rules")
|
36
|
+
__properties = ["id", "displayName", "reconciliationType", "coreAttributeRules", "aggregateAttributeRules"]
|
37
|
+
|
38
|
+
class Config:
|
39
|
+
"""Pydantic configuration"""
|
40
|
+
allow_population_by_field_name = True
|
41
|
+
validate_assignment = True
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
return json.dumps(self.to_dict())
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_json(cls, json_str: str) -> CreateGroupReconciliationComparisonRulesetRequest:
|
53
|
+
"""Create an instance of CreateGroupReconciliationComparisonRulesetRequest from a JSON string"""
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
55
|
+
|
56
|
+
def to_dict(self):
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
58
|
+
_dict = self.dict(by_alias=True,
|
59
|
+
exclude={
|
60
|
+
},
|
61
|
+
exclude_none=True)
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
63
|
+
if self.id:
|
64
|
+
_dict['id'] = self.id.to_dict()
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each item in core_attribute_rules (list)
|
66
|
+
_items = []
|
67
|
+
if self.core_attribute_rules:
|
68
|
+
for _item in self.core_attribute_rules:
|
69
|
+
if _item:
|
70
|
+
_items.append(_item.to_dict())
|
71
|
+
_dict['coreAttributeRules'] = _items
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in aggregate_attribute_rules (list)
|
73
|
+
_items = []
|
74
|
+
if self.aggregate_attribute_rules:
|
75
|
+
for _item in self.aggregate_attribute_rules:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['aggregateAttributeRules'] = _items
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> CreateGroupReconciliationComparisonRulesetRequest:
|
83
|
+
"""Create an instance of CreateGroupReconciliationComparisonRulesetRequest from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return CreateGroupReconciliationComparisonRulesetRequest.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = CreateGroupReconciliationComparisonRulesetRequest.parse_obj({
|
91
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
92
|
+
"display_name": obj.get("displayName"),
|
93
|
+
"reconciliation_type": obj.get("reconciliationType"),
|
94
|
+
"core_attribute_rules": [GroupReconciliationCoreAttributeRule.from_dict(_item) for _item in obj.get("coreAttributeRules")] if obj.get("coreAttributeRules") is not None else None,
|
95
|
+
"aggregate_attribute_rules": [GroupReconciliationAggregateAttributeRule.from_dict(_item) for _item in obj.get("aggregateAttributeRules")] if obj.get("aggregateAttributeRules") is not None else None
|
96
|
+
})
|
97
|
+
return _obj
|
@@ -21,6 +21,7 @@ import json
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
23
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
24
|
+
from lusid.models.link import Link
|
24
25
|
from lusid.models.version import Version
|
25
26
|
|
26
27
|
class CustomEntityDefinition(BaseModel):
|
@@ -34,7 +35,8 @@ class CustomEntityDefinition(BaseModel):
|
|
34
35
|
entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The identifier for the custom entity type, derived from the “entityTypeName” provided on creation.")
|
35
36
|
field_schema: conlist(CustomEntityFieldDefinition) = Field(..., alias="fieldSchema", description="The description of the fields on the custom entity type.")
|
36
37
|
version: Version = Field(...)
|
37
|
-
|
38
|
+
links: Optional[conlist(Link)] = None
|
39
|
+
__properties = ["href", "entityTypeName", "displayName", "description", "entityType", "fieldSchema", "version", "links"]
|
38
40
|
|
39
41
|
class Config:
|
40
42
|
"""Pydantic configuration"""
|
@@ -70,6 +72,13 @@ class CustomEntityDefinition(BaseModel):
|
|
70
72
|
# override the default output from pydantic by calling `to_dict()` of version
|
71
73
|
if self.version:
|
72
74
|
_dict['version'] = self.version.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
76
|
+
_items = []
|
77
|
+
if self.links:
|
78
|
+
for _item in self.links:
|
79
|
+
if _item:
|
80
|
+
_items.append(_item.to_dict())
|
81
|
+
_dict['links'] = _items
|
73
82
|
# set to None if href (nullable) is None
|
74
83
|
# and __fields_set__ contains the field
|
75
84
|
if self.href is None and "href" in self.__fields_set__:
|
@@ -80,6 +89,11 @@ class CustomEntityDefinition(BaseModel):
|
|
80
89
|
if self.description is None and "description" in self.__fields_set__:
|
81
90
|
_dict['description'] = None
|
82
91
|
|
92
|
+
# set to None if links (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.links is None and "links" in self.__fields_set__:
|
95
|
+
_dict['links'] = None
|
96
|
+
|
83
97
|
return _dict
|
84
98
|
|
85
99
|
@classmethod
|
@@ -98,6 +112,7 @@ class CustomEntityDefinition(BaseModel):
|
|
98
112
|
"description": obj.get("description"),
|
99
113
|
"entity_type": obj.get("entityType"),
|
100
114
|
"field_schema": [CustomEntityFieldDefinition.from_dict(_item) for _item in obj.get("fieldSchema")] if obj.get("fieldSchema") is not None else None,
|
101
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
115
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
116
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
102
117
|
})
|
103
118
|
return _obj
|
@@ -21,6 +21,7 @@ import json
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
23
23
|
from lusid.models.custom_entity_field_definition import CustomEntityFieldDefinition
|
24
|
+
from lusid.models.link import Link
|
24
25
|
from lusid.models.version import Version
|
25
26
|
|
26
27
|
class CustomEntityType(BaseModel):
|
@@ -34,7 +35,8 @@ class CustomEntityType(BaseModel):
|
|
34
35
|
entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The identifier for the custom entity type, derived from the “entityTypeName” provided on creation.")
|
35
36
|
field_schema: conlist(CustomEntityFieldDefinition) = Field(..., alias="fieldSchema", description="The description of the fields on the custom entity type.")
|
36
37
|
version: Version = Field(...)
|
37
|
-
|
38
|
+
links: Optional[conlist(Link)] = None
|
39
|
+
__properties = ["href", "entityTypeName", "displayName", "description", "entityType", "fieldSchema", "version", "links"]
|
38
40
|
|
39
41
|
class Config:
|
40
42
|
"""Pydantic configuration"""
|
@@ -70,6 +72,13 @@ class CustomEntityType(BaseModel):
|
|
70
72
|
# override the default output from pydantic by calling `to_dict()` of version
|
71
73
|
if self.version:
|
72
74
|
_dict['version'] = self.version.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
76
|
+
_items = []
|
77
|
+
if self.links:
|
78
|
+
for _item in self.links:
|
79
|
+
if _item:
|
80
|
+
_items.append(_item.to_dict())
|
81
|
+
_dict['links'] = _items
|
73
82
|
# set to None if href (nullable) is None
|
74
83
|
# and __fields_set__ contains the field
|
75
84
|
if self.href is None and "href" in self.__fields_set__:
|
@@ -80,6 +89,11 @@ class CustomEntityType(BaseModel):
|
|
80
89
|
if self.description is None and "description" in self.__fields_set__:
|
81
90
|
_dict['description'] = None
|
82
91
|
|
92
|
+
# set to None if links (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.links is None and "links" in self.__fields_set__:
|
95
|
+
_dict['links'] = None
|
96
|
+
|
83
97
|
return _dict
|
84
98
|
|
85
99
|
@classmethod
|
@@ -98,6 +112,7 @@ class CustomEntityType(BaseModel):
|
|
98
112
|
"description": obj.get("description"),
|
99
113
|
"entity_type": obj.get("entityType"),
|
100
114
|
"field_schema": [CustomEntityFieldDefinition.from_dict(_item) for _item in obj.get("fieldSchema")] if obj.get("fieldSchema") is not None else None,
|
101
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
115
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
116
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
102
117
|
})
|
103
118
|
return _obj
|
lusid/models/data_type.py
CHANGED
@@ -24,13 +24,13 @@ from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
|
|
24
24
|
from lusid.models.link import Link
|
25
25
|
from lusid.models.reference_data import ReferenceData
|
26
26
|
from lusid.models.resource_id import ResourceId
|
27
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
27
28
|
from lusid.models.version import Version
|
28
29
|
|
29
30
|
class DataType(BaseModel):
|
30
31
|
"""
|
31
32
|
DataType
|
32
33
|
"""
|
33
|
-
href: Optional[StrictStr] = None
|
34
34
|
type_value_range: StrictStr = Field(..., alias="typeValueRange", description="The available values are: Open, Closed")
|
35
35
|
id: ResourceId = Field(...)
|
36
36
|
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName")
|
@@ -41,8 +41,10 @@ class DataType(BaseModel):
|
|
41
41
|
acceptable_units: Optional[conlist(IUnitDefinitionDto)] = Field(None, alias="acceptableUnits")
|
42
42
|
reference_data: Optional[ReferenceData] = Field(None, alias="referenceData")
|
43
43
|
version: Optional[Version] = None
|
44
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
45
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
44
46
|
links: Optional[conlist(Link)] = None
|
45
|
-
__properties = ["
|
47
|
+
__properties = ["typeValueRange", "id", "displayName", "description", "valueType", "acceptableValues", "unitSchema", "acceptableUnits", "referenceData", "version", "href", "stagedModifications", "links"]
|
46
48
|
|
47
49
|
@validator('type_value_range')
|
48
50
|
def type_value_range_validate_enum(cls, value):
|
@@ -108,6 +110,9 @@ class DataType(BaseModel):
|
|
108
110
|
# override the default output from pydantic by calling `to_dict()` of version
|
109
111
|
if self.version:
|
110
112
|
_dict['version'] = self.version.to_dict()
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
114
|
+
if self.staged_modifications:
|
115
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
111
116
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
112
117
|
_items = []
|
113
118
|
if self.links:
|
@@ -115,11 +120,6 @@ class DataType(BaseModel):
|
|
115
120
|
if _item:
|
116
121
|
_items.append(_item.to_dict())
|
117
122
|
_dict['links'] = _items
|
118
|
-
# set to None if href (nullable) is None
|
119
|
-
# and __fields_set__ contains the field
|
120
|
-
if self.href is None and "href" in self.__fields_set__:
|
121
|
-
_dict['href'] = None
|
122
|
-
|
123
123
|
# set to None if acceptable_values (nullable) is None
|
124
124
|
# and __fields_set__ contains the field
|
125
125
|
if self.acceptable_values is None and "acceptable_values" in self.__fields_set__:
|
@@ -130,6 +130,11 @@ class DataType(BaseModel):
|
|
130
130
|
if self.acceptable_units is None and "acceptable_units" in self.__fields_set__:
|
131
131
|
_dict['acceptableUnits'] = None
|
132
132
|
|
133
|
+
# set to None if href (nullable) is None
|
134
|
+
# and __fields_set__ contains the field
|
135
|
+
if self.href is None and "href" in self.__fields_set__:
|
136
|
+
_dict['href'] = None
|
137
|
+
|
133
138
|
# set to None if links (nullable) is None
|
134
139
|
# and __fields_set__ contains the field
|
135
140
|
if self.links is None and "links" in self.__fields_set__:
|
@@ -147,7 +152,6 @@ class DataType(BaseModel):
|
|
147
152
|
return DataType.parse_obj(obj)
|
148
153
|
|
149
154
|
_obj = DataType.parse_obj({
|
150
|
-
"href": obj.get("href"),
|
151
155
|
"type_value_range": obj.get("typeValueRange"),
|
152
156
|
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
153
157
|
"display_name": obj.get("displayName"),
|
@@ -158,6 +162,8 @@ class DataType(BaseModel):
|
|
158
162
|
"acceptable_units": [IUnitDefinitionDto.from_dict(_item) for _item in obj.get("acceptableUnits")] if obj.get("acceptableUnits") is not None else None,
|
159
163
|
"reference_data": ReferenceData.from_dict(obj.get("referenceData")) if obj.get("referenceData") is not None else None,
|
160
164
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
165
|
+
"href": obj.get("href"),
|
166
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
161
167
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
162
168
|
})
|
163
169
|
return _obj
|
@@ -0,0 +1,131 @@
|
|
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, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, constr
|
23
|
+
from lusid.models.data_type import DataType
|
24
|
+
|
25
|
+
class DataTypeEntity(BaseModel):
|
26
|
+
"""
|
27
|
+
DataTypeEntity
|
28
|
+
"""
|
29
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
30
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
31
|
+
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)")
|
32
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
33
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
34
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
35
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
36
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
37
|
+
prevailing_data_type: Optional[DataType] = Field(None, alias="prevailingDataType")
|
38
|
+
deleted_data_type: Optional[DataType] = Field(None, alias="deletedDataType")
|
39
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
40
|
+
previewed_data_type: Optional[DataType] = Field(None, alias="previewedDataType")
|
41
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingDataType", "deletedDataType", "previewedStatus", "previewedDataType"]
|
42
|
+
|
43
|
+
class Config:
|
44
|
+
"""Pydantic configuration"""
|
45
|
+
allow_population_by_field_name = True
|
46
|
+
validate_assignment = True
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> DataTypeEntity:
|
58
|
+
"""Create an instance of DataTypeEntity from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
63
|
+
_dict = self.dict(by_alias=True,
|
64
|
+
exclude={
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of prevailing_data_type
|
68
|
+
if self.prevailing_data_type:
|
69
|
+
_dict['prevailingDataType'] = self.prevailing_data_type.to_dict()
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_data_type
|
71
|
+
if self.deleted_data_type:
|
72
|
+
_dict['deletedDataType'] = self.deleted_data_type.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_data_type
|
74
|
+
if self.previewed_data_type:
|
75
|
+
_dict['previewedDataType'] = self.previewed_data_type.to_dict()
|
76
|
+
# set to None if as_at_version_number (nullable) is None
|
77
|
+
# and __fields_set__ contains the field
|
78
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
79
|
+
_dict['asAtVersionNumber'] = None
|
80
|
+
|
81
|
+
# set to None if as_at_deleted (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
84
|
+
_dict['asAtDeleted'] = None
|
85
|
+
|
86
|
+
# set to None if user_id_deleted (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
89
|
+
_dict['userIdDeleted'] = None
|
90
|
+
|
91
|
+
# set to None if request_id_deleted (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
94
|
+
_dict['requestIdDeleted'] = None
|
95
|
+
|
96
|
+
# set to None if effective_at_created (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
99
|
+
_dict['effectiveAtCreated'] = None
|
100
|
+
|
101
|
+
# set to None if previewed_status (nullable) is None
|
102
|
+
# and __fields_set__ contains the field
|
103
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
104
|
+
_dict['previewedStatus'] = None
|
105
|
+
|
106
|
+
return _dict
|
107
|
+
|
108
|
+
@classmethod
|
109
|
+
def from_dict(cls, obj: dict) -> DataTypeEntity:
|
110
|
+
"""Create an instance of DataTypeEntity from a dict"""
|
111
|
+
if obj is None:
|
112
|
+
return None
|
113
|
+
|
114
|
+
if not isinstance(obj, dict):
|
115
|
+
return DataTypeEntity.parse_obj(obj)
|
116
|
+
|
117
|
+
_obj = DataTypeEntity.parse_obj({
|
118
|
+
"href": obj.get("href"),
|
119
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
120
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
121
|
+
"status": obj.get("status"),
|
122
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
123
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
124
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
125
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
126
|
+
"prevailing_data_type": DataType.from_dict(obj.get("prevailingDataType")) if obj.get("prevailingDataType") is not None else None,
|
127
|
+
"deleted_data_type": DataType.from_dict(obj.get("deletedDataType")) if obj.get("deletedDataType") is not None else None,
|
128
|
+
"previewed_status": obj.get("previewedStatus"),
|
129
|
+
"previewed_data_type": DataType.from_dict(obj.get("previewedDataType")) if obj.get("previewedDataType") is not None else None
|
130
|
+
})
|
131
|
+
return _obj
|
lusid/models/diary_entry.py
CHANGED
@@ -34,7 +34,7 @@ class DiaryEntry(BaseModel):
|
|
34
34
|
diary_entry_code: Optional[StrictStr] = Field(None, alias="diaryEntryCode", description="The code of the diary entry.")
|
35
35
|
type: constr(strict=True, min_length=1) = Field(..., description="The type of the diary entry.")
|
36
36
|
name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The name of the diary entry.")
|
37
|
-
status: constr(strict=True, min_length=1) = Field(..., description="The status of the diary entry.
|
37
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the diary entry. Statuses are constrained and defaulted by 'Type' specified. Type 'Other' defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'. Type 'PeriodBoundary' defaults to 'Estimate' when closing a period, and supports 'Estimate' and 'Final' for closing periods and 'Final' for locking periods. Type 'ValuationPoint' defaults to 'Estimate' when upserting a diary entry, moves to 'Candidate' or 'Final' when a ValuationPoint is accepted, and 'Final' when it is finalised.")
|
38
38
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
|
39
39
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
40
40
|
previous_entry_time: Optional[datetime] = Field(None, alias="previousEntryTime", description="The entry time of the previous diary entry.")
|
@@ -27,7 +27,7 @@ class DiaryEntryRequest(BaseModel):
|
|
27
27
|
The request to add a diary entry # noqa: E501
|
28
28
|
"""
|
29
29
|
name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The name of the diary entry.")
|
30
|
-
status: Optional[StrictStr] = Field(None, description="The status of
|
30
|
+
status: Optional[StrictStr] = Field(None, description="The status of a Diary Entry of Type 'Other'. Defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'.")
|
31
31
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
|
32
32
|
query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
|
33
33
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
|