lusid-sdk 2.1.242__py3-none-any.whl → 2.1.261__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +28 -0
- lusid/api/__init__.py +2 -0
- lusid/api/entities_api.py +360 -0
- lusid/api/fee_types_api.py +143 -0
- lusid/api/fund_configurations_api.py +944 -0
- lusid/api/order_management_api.py +320 -1
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +26 -0
- lusid/models/accounting_method.py +3 -0
- lusid/models/accumulation_event.py +3 -3
- lusid/models/amortisation_event.py +3 -3
- 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/cancel_placements_response.py +153 -0
- lusid/models/cancelled_placement_result.py +83 -0
- 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/component_rule.py +83 -0
- lusid/models/create_derived_transaction_portfolio_request.py +3 -3
- lusid/models/create_transaction_portfolio_request.py +3 -3
- lusid/models/dependency_source_filter.py +9 -2
- lusid/models/dividend_option_event.py +3 -3
- lusid/models/dividend_reinvestment_event.py +3 -3
- lusid/models/exercise_event.py +3 -3
- lusid/models/expiry_event.py +3 -3
- lusid/models/fee_transaction_template_specification.py +79 -0
- lusid/models/fund_configuration.py +150 -0
- lusid/models/fund_configuration_properties.py +115 -0
- lusid/models/fund_configuration_request.py +130 -0
- lusid/models/future_expiry_event.py +100 -0
- lusid/models/fx_forward_settlement_event.py +3 -3
- lusid/models/informational_error_event.py +3 -3
- lusid/models/informational_event.py +3 -3
- lusid/models/instrument_entity.py +146 -0
- lusid/models/instrument_event.py +6 -5
- lusid/models/instrument_event_type.py +1 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
- lusid/models/placement_update_request.py +116 -0
- lusid/models/portfolio.py +3 -3
- lusid/models/portfolio_details.py +3 -3
- lusid/models/portfolio_without_href.py +3 -3
- lusid/models/property_definition.py +7 -1
- lusid/models/property_definition_entity.py +146 -0
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/spin_off_event.py +3 -3
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/transaction_field_map.py +7 -2
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/update_placements_response.py +153 -0
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.261.dist-info}/METADATA +26 -3
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.261.dist-info}/RECORD +63 -49
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.261.dist-info}/WHEEL +0 -0
|
@@ -30,15 +30,15 @@ class BondPrincipalEvent(InstrumentEvent):
|
|
|
30
30
|
ex_date: datetime = Field(..., alias="exDate", description="Ex-Dividend date of the principal payment")
|
|
31
31
|
payment_date: datetime = Field(..., alias="paymentDate", description="Payment date of the principal payment")
|
|
32
32
|
principal_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="principalPerUnit", description="Principal per unit")
|
|
33
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
|
|
33
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
|
35
35
|
__properties = ["instrumentEventType", "currency", "exDate", "paymentDate", "principalPerUnit"]
|
|
36
36
|
|
|
37
37
|
@validator('instrument_event_type')
|
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
|
39
39
|
"""Validates the enum"""
|
|
40
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
|
|
41
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
|
|
40
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
|
41
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
|
42
42
|
return value
|
|
43
43
|
|
|
44
44
|
class Config:
|
|
@@ -0,0 +1,153 @@
|
|
|
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.cancelled_placement_result import CancelledPlacementResult
|
|
24
|
+
from lusid.models.error_detail import ErrorDetail
|
|
25
|
+
from lusid.models.link import Link
|
|
26
|
+
from lusid.models.response_meta_data import ResponseMetaData
|
|
27
|
+
|
|
28
|
+
class CancelPlacementsResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
CancelPlacementsResponse
|
|
31
|
+
"""
|
|
32
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
33
|
+
values: Optional[Dict[str, CancelledPlacementResult]] = Field(None, description="The placements which have been successfully cancelled.")
|
|
34
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The placements that could not be cancelled, along with a reason for their failure.")
|
|
35
|
+
metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Meta data associated with the cancellation event.")
|
|
36
|
+
links: Optional[conlist(Link)] = None
|
|
37
|
+
__properties = ["href", "values", "failed", "metadata", "links"]
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
"""Pydantic configuration"""
|
|
41
|
+
allow_population_by_field_name = True
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> CancelPlacementsResponse:
|
|
54
|
+
"""Create an instance of CancelPlacementsResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self):
|
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
59
|
+
_dict = self.dict(by_alias=True,
|
|
60
|
+
exclude={
|
|
61
|
+
},
|
|
62
|
+
exclude_none=True)
|
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each value in values (dict)
|
|
64
|
+
_field_dict = {}
|
|
65
|
+
if self.values:
|
|
66
|
+
for _key in self.values:
|
|
67
|
+
if self.values[_key]:
|
|
68
|
+
_field_dict[_key] = self.values[_key].to_dict()
|
|
69
|
+
_dict['values'] = _field_dict
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
|
|
71
|
+
_field_dict = {}
|
|
72
|
+
if self.failed:
|
|
73
|
+
for _key in self.failed:
|
|
74
|
+
if self.failed[_key]:
|
|
75
|
+
_field_dict[_key] = self.failed[_key].to_dict()
|
|
76
|
+
_dict['failed'] = _field_dict
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
|
78
|
+
_field_dict_of_array = {}
|
|
79
|
+
if self.metadata:
|
|
80
|
+
for _key in self.metadata:
|
|
81
|
+
if self.metadata[_key]:
|
|
82
|
+
_field_dict_of_array[_key] = [
|
|
83
|
+
_item.to_dict() for _item in self.metadata[_key]
|
|
84
|
+
]
|
|
85
|
+
_dict['metadata'] = _field_dict_of_array
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
87
|
+
_items = []
|
|
88
|
+
if self.links:
|
|
89
|
+
for _item in self.links:
|
|
90
|
+
if _item:
|
|
91
|
+
_items.append(_item.to_dict())
|
|
92
|
+
_dict['links'] = _items
|
|
93
|
+
# set to None if href (nullable) is None
|
|
94
|
+
# and __fields_set__ contains the field
|
|
95
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
96
|
+
_dict['href'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if values (nullable) is None
|
|
99
|
+
# and __fields_set__ contains the field
|
|
100
|
+
if self.values is None and "values" in self.__fields_set__:
|
|
101
|
+
_dict['values'] = None
|
|
102
|
+
|
|
103
|
+
# set to None if failed (nullable) is None
|
|
104
|
+
# and __fields_set__ contains the field
|
|
105
|
+
if self.failed is None and "failed" in self.__fields_set__:
|
|
106
|
+
_dict['failed'] = None
|
|
107
|
+
|
|
108
|
+
# set to None if metadata (nullable) is None
|
|
109
|
+
# and __fields_set__ contains the field
|
|
110
|
+
if self.metadata is None and "metadata" in self.__fields_set__:
|
|
111
|
+
_dict['metadata'] = None
|
|
112
|
+
|
|
113
|
+
# set to None if links (nullable) is None
|
|
114
|
+
# and __fields_set__ contains the field
|
|
115
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
116
|
+
_dict['links'] = None
|
|
117
|
+
|
|
118
|
+
return _dict
|
|
119
|
+
|
|
120
|
+
@classmethod
|
|
121
|
+
def from_dict(cls, obj: dict) -> CancelPlacementsResponse:
|
|
122
|
+
"""Create an instance of CancelPlacementsResponse from a dict"""
|
|
123
|
+
if obj is None:
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
if not isinstance(obj, dict):
|
|
127
|
+
return CancelPlacementsResponse.parse_obj(obj)
|
|
128
|
+
|
|
129
|
+
_obj = CancelPlacementsResponse.parse_obj({
|
|
130
|
+
"href": obj.get("href"),
|
|
131
|
+
"values": dict(
|
|
132
|
+
(_k, CancelledPlacementResult.from_dict(_v))
|
|
133
|
+
for _k, _v in obj.get("values").items()
|
|
134
|
+
)
|
|
135
|
+
if obj.get("values") is not None
|
|
136
|
+
else None,
|
|
137
|
+
"failed": dict(
|
|
138
|
+
(_k, ErrorDetail.from_dict(_v))
|
|
139
|
+
for _k, _v in obj.get("failed").items()
|
|
140
|
+
)
|
|
141
|
+
if obj.get("failed") is not None
|
|
142
|
+
else None,
|
|
143
|
+
"metadata": dict(
|
|
144
|
+
(_k,
|
|
145
|
+
[ResponseMetaData.from_dict(_item) for _item in _v]
|
|
146
|
+
if _v is not None
|
|
147
|
+
else None
|
|
148
|
+
)
|
|
149
|
+
for _k, _v in obj.get("metadata").items()
|
|
150
|
+
),
|
|
151
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
152
|
+
})
|
|
153
|
+
return _obj
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist
|
|
23
|
+
from lusid.models.placement import Placement
|
|
24
|
+
from lusid.models.resource_id import ResourceId
|
|
25
|
+
|
|
26
|
+
class CancelledPlacementResult(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CancelledPlacementResult
|
|
29
|
+
"""
|
|
30
|
+
placement_state: Optional[Placement] = Field(None, alias="placementState")
|
|
31
|
+
cancelled_child_placements: conlist(ResourceId) = Field(..., alias="cancelledChildPlacements", description="Child placements which have also been cancelled following cancellation of the parent")
|
|
32
|
+
__properties = ["placementState", "cancelledChildPlacements"]
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
"""Pydantic configuration"""
|
|
36
|
+
allow_population_by_field_name = True
|
|
37
|
+
validate_assignment = True
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> CancelledPlacementResult:
|
|
49
|
+
"""Create an instance of CancelledPlacementResult from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True,
|
|
55
|
+
exclude={
|
|
56
|
+
},
|
|
57
|
+
exclude_none=True)
|
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of placement_state
|
|
59
|
+
if self.placement_state:
|
|
60
|
+
_dict['placementState'] = self.placement_state.to_dict()
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in cancelled_child_placements (list)
|
|
62
|
+
_items = []
|
|
63
|
+
if self.cancelled_child_placements:
|
|
64
|
+
for _item in self.cancelled_child_placements:
|
|
65
|
+
if _item:
|
|
66
|
+
_items.append(_item.to_dict())
|
|
67
|
+
_dict['cancelledChildPlacements'] = _items
|
|
68
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: dict) -> CancelledPlacementResult:
|
|
72
|
+
"""Create an instance of CancelledPlacementResult from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return CancelledPlacementResult.parse_obj(obj)
|
|
78
|
+
|
|
79
|
+
_obj = CancelledPlacementResult.parse_obj({
|
|
80
|
+
"placement_state": Placement.from_dict(obj.get("placementState")) if obj.get("placementState") is not None else None,
|
|
81
|
+
"cancelled_child_placements": [ResourceId.from_dict(_item) for _item in obj.get("cancelledChildPlacements")] if obj.get("cancelledChildPlacements") is not None else None
|
|
82
|
+
})
|
|
83
|
+
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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
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")
|
|
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")
|
|
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'):
|
|
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')")
|
|
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')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
42
|
class Config:
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
|
23
|
+
|
|
24
|
+
class ComponentRule(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
ComponentRule
|
|
27
|
+
"""
|
|
28
|
+
match_criteria: constr(strict=True, max_length=16384, min_length=1) = Field(..., alias="matchCriteria")
|
|
29
|
+
components: Optional[Dict[str, StrictStr]] = None
|
|
30
|
+
__properties = ["matchCriteria", "components"]
|
|
31
|
+
|
|
32
|
+
@validator('match_criteria')
|
|
33
|
+
def match_criteria_validate_regular_expression(cls, value):
|
|
34
|
+
"""Validates the regular expression"""
|
|
35
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
36
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
"""Pydantic configuration"""
|
|
41
|
+
allow_population_by_field_name = True
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> ComponentRule:
|
|
54
|
+
"""Create an instance of ComponentRule from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self):
|
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
59
|
+
_dict = self.dict(by_alias=True,
|
|
60
|
+
exclude={
|
|
61
|
+
},
|
|
62
|
+
exclude_none=True)
|
|
63
|
+
# set to None if components (nullable) is None
|
|
64
|
+
# and __fields_set__ contains the field
|
|
65
|
+
if self.components is None and "components" in self.__fields_set__:
|
|
66
|
+
_dict['components'] = None
|
|
67
|
+
|
|
68
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: dict) -> ComponentRule:
|
|
72
|
+
"""Create an instance of ComponentRule from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return ComponentRule.parse_obj(obj)
|
|
78
|
+
|
|
79
|
+
_obj = ComponentRule.parse_obj({
|
|
80
|
+
"match_criteria": obj.get("matchCriteria"),
|
|
81
|
+
"components": obj.get("components")
|
|
82
|
+
})
|
|
83
|
+
return _obj
|
|
@@ -32,7 +32,7 @@ class CreateDerivedTransactionPortfolioRequest(BaseModel):
|
|
|
32
32
|
parent_portfolio_id: ResourceId = Field(..., alias="parentPortfolioId")
|
|
33
33
|
created: Optional[datetime] = Field(None, description="This will be auto-populated to be the parent portfolio creation date.")
|
|
34
34
|
corporate_action_source_id: Optional[ResourceId] = Field(None, alias="corporateActionSourceId")
|
|
35
|
-
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst")
|
|
35
|
+
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency")
|
|
36
36
|
sub_holding_keys: Optional[conlist(StrictStr)] = Field(None, alias="subHoldingKeys", description="A set of unique transaction properties to group the derived transaction portfolio's holdings by, perhaps for strategy tagging. Each property must be from the 'Transaction' domain and identified by a key in the format {domain}/{scope}/{code}, for example 'Transaction/strategies/quantsignal'. See https://support.lusid.com/knowledgebase/article/KA-01879/en-us for more information.")
|
|
37
37
|
instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="instrumentScopes", description="The resolution strategy used to resolve instruments of transactions/holdings upserted to this derived portfolio.")
|
|
38
38
|
amortisation_method: Optional[StrictStr] = Field(None, alias="amortisationMethod", description="The amortisation method used by the portfolio for the calculation. The available values are: NoAmortisation, StraightLine, EffectiveYield, StraightLineSettlementDate, EffectiveYieldSettlementDate")
|
|
@@ -71,8 +71,8 @@ class CreateDerivedTransactionPortfolioRequest(BaseModel):
|
|
|
71
71
|
if value is None:
|
|
72
72
|
return value
|
|
73
73
|
|
|
74
|
-
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst'):
|
|
75
|
-
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst')")
|
|
74
|
+
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency'):
|
|
75
|
+
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency')")
|
|
76
76
|
return value
|
|
77
77
|
|
|
78
78
|
@validator('transaction_type_scope')
|
|
@@ -34,7 +34,7 @@ class CreateTransactionPortfolioRequest(BaseModel):
|
|
|
34
34
|
created: Optional[datetime] = Field(None, description="The effective datetime at which to create the transaction portfolio. No transactions can be added to the transaction portfolio before this date. Defaults to the current LUSID system datetime if not specified.")
|
|
35
35
|
base_currency: StrictStr = Field(..., alias="baseCurrency", description="The base currency of the transaction portfolio in ISO 4217 currency code format.")
|
|
36
36
|
corporate_action_source_id: Optional[ResourceId] = Field(None, alias="corporateActionSourceId")
|
|
37
|
-
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst")
|
|
37
|
+
accounting_method: Optional[StrictStr] = Field(None, alias="accountingMethod", description=". The available values are: Default, AverageCost, FirstInFirstOut, LastInFirstOut, HighestCostFirst, LowestCostFirst, ProRateByUnits, ProRateByCost, ProRateByCostPortfolioCurrency")
|
|
38
38
|
sub_holding_keys: Optional[conlist(StrictStr, max_items=100)] = Field(None, alias="subHoldingKeys", description="A set of unique transaction properties to group the transaction portfolio's holdings by, perhaps for strategy tagging. Each property must be from the 'Transaction' domain and identified by a key in the format {domain}/{scope}/{code}, for example 'Transaction/strategies/quantsignal'. See https://support.lusid.com/knowledgebase/article/KA-01879/en-us for more information.")
|
|
39
39
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of unique portfolio properties to add custom data to the transaction portfolio. Each property must be from the 'Portfolio' domain and identified by a key in the format {domain}/{scope}/{code}, for example 'Portfolio/Manager/Id'. Note these properties must be pre-defined.")
|
|
40
40
|
instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="instrumentScopes", description="The resolution strategy used to resolve instruments of transactions/holdings upserted to this portfolio.")
|
|
@@ -51,8 +51,8 @@ class CreateTransactionPortfolioRequest(BaseModel):
|
|
|
51
51
|
if value is None:
|
|
52
52
|
return value
|
|
53
53
|
|
|
54
|
-
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst'):
|
|
55
|
-
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst')")
|
|
54
|
+
if value not in ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency'):
|
|
55
|
+
raise ValueError("must be one of enum values ('Default', 'AverageCost', 'FirstInFirstOut', 'LastInFirstOut', 'HighestCostFirst', 'LowestCostFirst', 'ProRateByUnits', 'ProRateByCost', 'ProRateByCostPortfolioCurrency')")
|
|
56
56
|
return value
|
|
57
57
|
|
|
58
58
|
@validator('transaction_type_scope')
|
|
@@ -28,7 +28,8 @@ class DependencySourceFilter(BaseModel):
|
|
|
28
28
|
instrument_type: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="instrumentType", description="Specify that a rule should only apply if the market data is requested by an instrument of a given instrument type. If null, then no filtering on instrument type is applied.")
|
|
29
29
|
asset_class: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="assetClass", description="Specify that a rule should only apply if the market data is requested by an instrument of a given asset class. If null, then no filtering on asset class is applied.")
|
|
30
30
|
dom_ccy: Optional[StrictStr] = Field(None, alias="domCcy", description="Specify that a rule should only apply if the market data is requested by an instrument with a given domestic currency. If null, then no filtering on currency is applied.")
|
|
31
|
-
|
|
31
|
+
long_or_short_indicator: Optional[StrictStr] = Field(None, alias="longOrShortIndicator", description="Specify that a rule should apply if the market data is requested by a model with a given long or short indicator. If none, then no filtering on LongOrShortIndicator is applied.")
|
|
32
|
+
__properties = ["instrumentType", "assetClass", "domCcy", "longOrShortIndicator"]
|
|
32
33
|
|
|
33
34
|
class Config:
|
|
34
35
|
"""Pydantic configuration"""
|
|
@@ -69,6 +70,11 @@ class DependencySourceFilter(BaseModel):
|
|
|
69
70
|
if self.dom_ccy is None and "dom_ccy" in self.__fields_set__:
|
|
70
71
|
_dict['domCcy'] = None
|
|
71
72
|
|
|
73
|
+
# set to None if long_or_short_indicator (nullable) is None
|
|
74
|
+
# and __fields_set__ contains the field
|
|
75
|
+
if self.long_or_short_indicator is None and "long_or_short_indicator" in self.__fields_set__:
|
|
76
|
+
_dict['longOrShortIndicator'] = None
|
|
77
|
+
|
|
72
78
|
return _dict
|
|
73
79
|
|
|
74
80
|
@classmethod
|
|
@@ -83,6 +89,7 @@ class DependencySourceFilter(BaseModel):
|
|
|
83
89
|
_obj = DependencySourceFilter.parse_obj({
|
|
84
90
|
"instrument_type": obj.get("instrumentType"),
|
|
85
91
|
"asset_class": obj.get("assetClass"),
|
|
86
|
-
"dom_ccy": obj.get("domCcy")
|
|
92
|
+
"dom_ccy": obj.get("domCcy"),
|
|
93
|
+
"long_or_short_indicator": obj.get("longOrShortIndicator")
|
|
87
94
|
})
|
|
88
95
|
return _obj
|
|
@@ -35,15 +35,15 @@ class DividendOptionEvent(InstrumentEvent):
|
|
|
35
35
|
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.")
|
|
36
36
|
security_elections: conlist(SecurityElection) = Field(..., alias="securityElections", description="SecurityElection for this DividendReinvestmentEvent")
|
|
37
37
|
security_settlement_date: Optional[datetime] = Field(None, alias="securitySettlementDate", description="The settlement date of the additional units. Equal to the PaymentDate if not provided.")
|
|
38
|
-
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")
|
|
38
|
+
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")
|
|
39
39
|
additional_properties: Dict[str, Any] = {}
|
|
40
40
|
__properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate", "securityElections", "securitySettlementDate"]
|
|
41
41
|
|
|
42
42
|
@validator('instrument_event_type')
|
|
43
43
|
def instrument_event_type_validate_enum(cls, value):
|
|
44
44
|
"""Validates the enum"""
|
|
45
|
-
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'):
|
|
46
|
-
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')")
|
|
45
|
+
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'):
|
|
46
|
+
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')")
|
|
47
47
|
return value
|
|
48
48
|
|
|
49
49
|
class Config:
|
|
@@ -35,15 +35,15 @@ class DividendReinvestmentEvent(InstrumentEvent):
|
|
|
35
35
|
record_date: datetime = Field(..., alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
|
36
36
|
security_elections: conlist(SecurityElection) = Field(..., alias="securityElections", description="SecurityElection for this DividendReinvestmentEvent")
|
|
37
37
|
security_settlement_date: Optional[datetime] = Field(None, alias="securitySettlementDate", description="The settlement date of the additional units. Equal to the PaymentDate if not provided.")
|
|
38
|
-
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")
|
|
38
|
+
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")
|
|
39
39
|
additional_properties: Dict[str, Any] = {}
|
|
40
40
|
__properties = ["instrumentEventType", "announcementDate", "cashElections", "exDate", "paymentDate", "recordDate", "securityElections", "securitySettlementDate"]
|
|
41
41
|
|
|
42
42
|
@validator('instrument_event_type')
|
|
43
43
|
def instrument_event_type_validate_enum(cls, value):
|
|
44
44
|
"""Validates the enum"""
|
|
45
|
-
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'):
|
|
46
|
-
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')")
|
|
45
|
+
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'):
|
|
46
|
+
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')")
|
|
47
47
|
return value
|
|
48
48
|
|
|
49
49
|
class Config:
|
lusid/models/exercise_event.py
CHANGED
|
@@ -30,15 +30,15 @@ class ExerciseEvent(InstrumentEvent):
|
|
|
30
30
|
instrument: LusidInstrument = Field(...)
|
|
31
31
|
anchor_date: datetime = Field(..., alias="anchorDate", description="The date the exercise window starts, or point it takes effect on.")
|
|
32
32
|
event_window_end: Optional[datetime] = Field(None, alias="eventWindowEnd", description="The date the exercise window ends, or point it takes effect on.")
|
|
33
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
|
|
33
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
|
35
35
|
__properties = ["instrumentEventType", "instrument", "anchorDate", "eventWindowEnd"]
|
|
36
36
|
|
|
37
37
|
@validator('instrument_event_type')
|
|
38
38
|
def instrument_event_type_validate_enum(cls, value):
|
|
39
39
|
"""Validates the enum"""
|
|
40
|
-
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
|
|
41
|
-
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
|
|
40
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
|
|
41
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
|
|
42
42
|
return value
|
|
43
43
|
|
|
44
44
|
class Config:
|