lusid-sdk 2.1.351__py3-none-any.whl → 2.1.405__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 +52 -0
- lusid/api/__init__.py +2 -0
- lusid/api/funds_api.py +9 -8
- lusid/api/group_reconciliations_api.py +378 -0
- lusid/api/order_management_api.py +174 -0
- lusid/api/persons_api.py +4 -4
- lusid/api/portfolios_api.py +179 -0
- lusid/api/workspace_api.py +40 -40
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +50 -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/batch_upsert_portfolio_access_metadata_request.py +82 -0
- lusid/models/batch_upsert_portfolio_access_metadata_response.py +82 -0
- lusid/models/bond_coupon_event.py +3 -3
- lusid/models/bond_default_event.py +3 -3
- lusid/models/bond_principal_event.py +3 -3
- lusid/models/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/cds_credit_event.py +105 -0
- lusid/models/cdx_credit_event.py +114 -0
- lusid/models/change_interval_with_order_management_detail.py +137 -0
- lusid/models/close_event.py +3 -3
- lusid/models/create_group_reconciliation_comparison_ruleset_request.py +97 -0
- lusid/models/credit_premium_cash_flow_event.py +102 -0
- lusid/models/custom_entity_definition.py +17 -2
- lusid/models/custom_entity_type.py +17 -2
- lusid/models/data_type.py +7 -1
- 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.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_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 +13 -5
- 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/holding_pricing_info.py +110 -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 +10 -5
- lusid/models/instrument_event_instruction.py +19 -4
- lusid/models/instrument_event_type.py +5 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/merger_event.py +3 -3
- lusid/models/metadata_key_value.py +86 -0
- lusid/models/metadata_key_value_response.py +86 -0
- 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 +5 -0
- lusid/models/person.py +17 -2
- lusid/models/placement_update_request.py +6 -1
- lusid/models/previous_nav.py +3 -3
- lusid/models/pricing_context.py +8 -2
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/reset_event.py +3 -3
- lusid/models/resource_list_of_change_interval_with_order_management_detail.py +113 -0
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/share_class_amount.py +7 -9
- lusid/models/share_class_breakdown.py +4 -5
- lusid/models/specific_holding_pricing_info.py +75 -0
- lusid/models/spin_off_event.py +3 -3
- lusid/models/staged_modification.py +8 -1
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- 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/valuation_point_data_response.py +21 -1
- lusid/models/weighted_instrument.py +9 -2
- {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/METADATA +52 -23
- {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/RECORD +94 -68
- {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/WHEEL +0 -0
@@ -0,0 +1,95 @@
|
|
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, StrictBool, conlist
|
23
|
+
from lusid.models.group_reconciliation_comparison_rule_string_value_map import GroupReconciliationComparisonRuleStringValueMap
|
24
|
+
from lusid.models.group_reconciliation_core_comparison_rule_operand import GroupReconciliationCoreComparisonRuleOperand
|
25
|
+
|
26
|
+
class GroupReconciliationCoreAttributeRule(BaseModel):
|
27
|
+
"""
|
28
|
+
GroupReconciliationCoreAttributeRule
|
29
|
+
"""
|
30
|
+
left: GroupReconciliationCoreComparisonRuleOperand = Field(...)
|
31
|
+
right: GroupReconciliationCoreComparisonRuleOperand = Field(...)
|
32
|
+
allowable_string_mappings: Optional[conlist(GroupReconciliationComparisonRuleStringValueMap)] = Field(None, alias="allowableStringMappings", description="The string mappings to use when comparing")
|
33
|
+
is_comparison_case_sensitive: StrictBool = Field(..., alias="isComparisonCaseSensitive", description="Whether the compare keys and strings mappings case sensitive or not")
|
34
|
+
__properties = ["left", "right", "allowableStringMappings", "isComparisonCaseSensitive"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
"""Pydantic configuration"""
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
validate_assignment = True
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.dict(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
return json.dumps(self.to_dict())
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def from_json(cls, json_str: str) -> GroupReconciliationCoreAttributeRule:
|
51
|
+
"""Create an instance of GroupReconciliationCoreAttributeRule from a JSON string"""
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
53
|
+
|
54
|
+
def to_dict(self):
|
55
|
+
"""Returns the dictionary representation of the model using alias"""
|
56
|
+
_dict = self.dict(by_alias=True,
|
57
|
+
exclude={
|
58
|
+
},
|
59
|
+
exclude_none=True)
|
60
|
+
# override the default output from pydantic by calling `to_dict()` of left
|
61
|
+
if self.left:
|
62
|
+
_dict['left'] = self.left.to_dict()
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of right
|
64
|
+
if self.right:
|
65
|
+
_dict['right'] = self.right.to_dict()
|
66
|
+
# override the default output from pydantic by calling `to_dict()` of each item in allowable_string_mappings (list)
|
67
|
+
_items = []
|
68
|
+
if self.allowable_string_mappings:
|
69
|
+
for _item in self.allowable_string_mappings:
|
70
|
+
if _item:
|
71
|
+
_items.append(_item.to_dict())
|
72
|
+
_dict['allowableStringMappings'] = _items
|
73
|
+
# set to None if allowable_string_mappings (nullable) is None
|
74
|
+
# and __fields_set__ contains the field
|
75
|
+
if self.allowable_string_mappings is None and "allowable_string_mappings" in self.__fields_set__:
|
76
|
+
_dict['allowableStringMappings'] = None
|
77
|
+
|
78
|
+
return _dict
|
79
|
+
|
80
|
+
@classmethod
|
81
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationCoreAttributeRule:
|
82
|
+
"""Create an instance of GroupReconciliationCoreAttributeRule from a dict"""
|
83
|
+
if obj is None:
|
84
|
+
return None
|
85
|
+
|
86
|
+
if not isinstance(obj, dict):
|
87
|
+
return GroupReconciliationCoreAttributeRule.parse_obj(obj)
|
88
|
+
|
89
|
+
_obj = GroupReconciliationCoreAttributeRule.parse_obj({
|
90
|
+
"left": GroupReconciliationCoreComparisonRuleOperand.from_dict(obj.get("left")) if obj.get("left") is not None else None,
|
91
|
+
"right": GroupReconciliationCoreComparisonRuleOperand.from_dict(obj.get("right")) if obj.get("right") is not None else None,
|
92
|
+
"allowable_string_mappings": [GroupReconciliationComparisonRuleStringValueMap.from_dict(_item) for _item in obj.get("allowableStringMappings")] if obj.get("allowableStringMappings") is not None else None,
|
93
|
+
"is_comparison_case_sensitive": obj.get("isComparisonCaseSensitive")
|
94
|
+
})
|
95
|
+
return _obj
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict
|
22
|
+
from pydantic.v1 import BaseModel, Field, constr
|
23
|
+
|
24
|
+
class GroupReconciliationCoreComparisonRuleOperand(BaseModel):
|
25
|
+
"""
|
26
|
+
GroupReconciliationCoreComparisonRuleOperand
|
27
|
+
"""
|
28
|
+
key: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The key of the value to compare")
|
29
|
+
operation: constr(strict=True, min_length=1) = Field(..., description="What to do with the value pointed to by the key, e.g. Sum. Only \"Value is allowed for core rules\"")
|
30
|
+
__properties = ["key", "operation"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> GroupReconciliationCoreComparisonRuleOperand:
|
47
|
+
"""Create an instance of GroupReconciliationCoreComparisonRuleOperand from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
return _dict
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_dict(cls, obj: dict) -> GroupReconciliationCoreComparisonRuleOperand:
|
60
|
+
"""Create an instance of GroupReconciliationCoreComparisonRuleOperand from a dict"""
|
61
|
+
if obj is None:
|
62
|
+
return None
|
63
|
+
|
64
|
+
if not isinstance(obj, dict):
|
65
|
+
return GroupReconciliationCoreComparisonRuleOperand.parse_obj(obj)
|
66
|
+
|
67
|
+
_obj = GroupReconciliationCoreComparisonRuleOperand.parse_obj({
|
68
|
+
"key": obj.get("key"),
|
69
|
+
"operation": obj.get("operation")
|
70
|
+
})
|
71
|
+
return _obj
|
@@ -0,0 +1,110 @@
|
|
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.specific_holding_pricing_info import SpecificHoldingPricingInfo
|
24
|
+
|
25
|
+
class HoldingPricingInfo(BaseModel):
|
26
|
+
"""
|
27
|
+
Enables price quotes to be created from Holding fields as either overrides or fallbacks to the Market Data resolution process. For example, we may wish to price an instrument at Cost if Market Data resolution fails. We may also wish to always price Bonds using the LastTradedPrice on the corresponding Holding. # noqa: E501
|
28
|
+
"""
|
29
|
+
fallback_field: Optional[StrictStr] = Field(None, alias="fallbackField", description="The default Holding field to fall back on if the Market Data resolution process fails to find a price quote.")
|
30
|
+
override_field: Optional[StrictStr] = Field(None, alias="overrideField", description="The default Holding field to be used as an override for instrument price quotes. This cannot be specified along with a FallbackField or any SpecificFallbacks, since we'll never attempt Market Data resolution for price quotes if this field is populated.")
|
31
|
+
specific_fallbacks: Optional[conlist(SpecificHoldingPricingInfo)] = Field(None, alias="specificFallbacks", description="Allows a user to specify fallbacks using Holding fields for sources that match a particular DependencySourceFilter.")
|
32
|
+
specific_overrides: Optional[conlist(SpecificHoldingPricingInfo)] = Field(None, alias="specificOverrides", description="Allows a user to specify overrides using Holding fields for sources that match a particular DependencySourceFilter.")
|
33
|
+
__properties = ["fallbackField", "overrideField", "specificFallbacks", "specificOverrides"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
"""Pydantic configuration"""
|
37
|
+
allow_population_by_field_name = True
|
38
|
+
validate_assignment = True
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
return json.dumps(self.to_dict())
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_json(cls, json_str: str) -> HoldingPricingInfo:
|
50
|
+
"""Create an instance of HoldingPricingInfo from a JSON string"""
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
52
|
+
|
53
|
+
def to_dict(self):
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
55
|
+
_dict = self.dict(by_alias=True,
|
56
|
+
exclude={
|
57
|
+
},
|
58
|
+
exclude_none=True)
|
59
|
+
# override the default output from pydantic by calling `to_dict()` of each item in specific_fallbacks (list)
|
60
|
+
_items = []
|
61
|
+
if self.specific_fallbacks:
|
62
|
+
for _item in self.specific_fallbacks:
|
63
|
+
if _item:
|
64
|
+
_items.append(_item.to_dict())
|
65
|
+
_dict['specificFallbacks'] = _items
|
66
|
+
# override the default output from pydantic by calling `to_dict()` of each item in specific_overrides (list)
|
67
|
+
_items = []
|
68
|
+
if self.specific_overrides:
|
69
|
+
for _item in self.specific_overrides:
|
70
|
+
if _item:
|
71
|
+
_items.append(_item.to_dict())
|
72
|
+
_dict['specificOverrides'] = _items
|
73
|
+
# set to None if fallback_field (nullable) is None
|
74
|
+
# and __fields_set__ contains the field
|
75
|
+
if self.fallback_field is None and "fallback_field" in self.__fields_set__:
|
76
|
+
_dict['fallbackField'] = None
|
77
|
+
|
78
|
+
# set to None if override_field (nullable) is None
|
79
|
+
# and __fields_set__ contains the field
|
80
|
+
if self.override_field is None and "override_field" in self.__fields_set__:
|
81
|
+
_dict['overrideField'] = None
|
82
|
+
|
83
|
+
# set to None if specific_fallbacks (nullable) is None
|
84
|
+
# and __fields_set__ contains the field
|
85
|
+
if self.specific_fallbacks is None and "specific_fallbacks" in self.__fields_set__:
|
86
|
+
_dict['specificFallbacks'] = None
|
87
|
+
|
88
|
+
# set to None if specific_overrides (nullable) is None
|
89
|
+
# and __fields_set__ contains the field
|
90
|
+
if self.specific_overrides is None and "specific_overrides" in self.__fields_set__:
|
91
|
+
_dict['specificOverrides'] = None
|
92
|
+
|
93
|
+
return _dict
|
94
|
+
|
95
|
+
@classmethod
|
96
|
+
def from_dict(cls, obj: dict) -> HoldingPricingInfo:
|
97
|
+
"""Create an instance of HoldingPricingInfo from a dict"""
|
98
|
+
if obj is None:
|
99
|
+
return None
|
100
|
+
|
101
|
+
if not isinstance(obj, dict):
|
102
|
+
return HoldingPricingInfo.parse_obj(obj)
|
103
|
+
|
104
|
+
_obj = HoldingPricingInfo.parse_obj({
|
105
|
+
"fallback_field": obj.get("fallbackField"),
|
106
|
+
"override_field": obj.get("overrideField"),
|
107
|
+
"specific_fallbacks": [SpecificHoldingPricingInfo.from_dict(_item) for _item in obj.get("specificFallbacks")] if obj.get("specificFallbacks") is not None else None,
|
108
|
+
"specific_overrides": [SpecificHoldingPricingInfo.from_dict(_item) for _item in obj.get("specificOverrides")] if obj.get("specificOverrides") is not None else None
|
109
|
+
})
|
110
|
+
return _obj
|
lusid/models/index_convention.py
CHANGED
@@ -30,7 +30,7 @@ class IndexConvention(BaseModel):
|
|
30
30
|
payment_tenor: constr(strict=True, max_length=32, min_length=0) = Field(..., alias="paymentTenor", description="The tenor of the payment. For an OIS index this is always 1 day. For other indices, e.g. LIBOR it will have a variable tenor typically between 1 day and 1 year. For more information on tenors, see [knowledge base article KA-02097](https://support.lusid.com/knowledgebase/article/KA-02097)")
|
31
31
|
day_count_convention: constr(strict=True, max_length=32, min_length=0) = Field(..., alias="dayCountConvention", description="when calculating the fraction of a year between two dates, what convention is used to represent the number of days in a year and difference between them. For more information on day counts, see [knowledge base article KA-01798](https://support.lusid.com/knowledgebase/article/KA-01798) Supported string (enumeration) values are: [Actual360, Act360, MoneyMarket, Actual365, Act365, Thirty360, ThirtyU360, Bond, ThirtyE360, EuroBond, ActualActual, ActAct, ActActIsda, ActActIsma, ActActIcma, OneOne, Act364, Act365F, Act365L, Act365_25, Act252, Bus252, NL360, NL365].")
|
32
32
|
currency: StrictStr = Field(..., description="Currency of the index convention.")
|
33
|
-
index_name: Optional[constr(strict=True, max_length=
|
33
|
+
index_name: Optional[constr(strict=True, max_length=64, min_length=0)] = Field(None, alias="indexName", description="The name of the index for which this represents the conventions of. For instance, \"SOFR\", \"LIBOR\", \"EURIBOR\", etc. Defaults to \"INDEX\" if not specified.")
|
34
34
|
scope: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The scope used when updating or inserting the convention.")
|
35
35
|
code: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The code of the convention.")
|
36
36
|
__properties = ["fixingReference", "publicationDayLag", "paymentTenor", "dayCountConvention", "currency", "indexName", "scope", "code"]
|
@@ -29,15 +29,15 @@ class InformationalErrorEvent(InstrumentEvent):
|
|
29
29
|
error_detail: constr(strict=True, min_length=1) = Field(..., alias="errorDetail", description="The details of the error")
|
30
30
|
error_reason: constr(strict=True, min_length=1) = Field(..., alias="errorReason", description="The error reason")
|
31
31
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the evaulation")
|
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, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
33
33
|
additional_properties: Dict[str, Any] = {}
|
34
34
|
__properties = ["instrumentEventType", "errorDetail", "errorReason", "effectiveAt"]
|
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', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
40
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
41
41
|
return value
|
42
42
|
|
43
43
|
class Config:
|
@@ -31,15 +31,15 @@ class InformationalEvent(InstrumentEvent):
|
|
31
31
|
anchor_date: datetime = Field(..., alias="anchorDate", description="In the case of a point event, the single date on which the event occurs. In the case of an event which is spread over a window, e.g. a barrier or American option, the start of that window.")
|
32
32
|
event_window_end: Optional[datetime] = Field(None, alias="eventWindowEnd", description="In the case of a point event this is identical to the anchor date. In the case of an event that is spread over a window, this is the end of that window.")
|
33
33
|
diagnostics: Optional[ResultValueDictionary] = None
|
34
|
-
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
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
36
36
|
__properties = ["instrumentEventType", "eventType", "anchorDate", "eventWindowEnd", "diagnostics"]
|
37
37
|
|
38
38
|
@validator('instrument_event_type')
|
39
39
|
def instrument_event_type_validate_enum(cls, value):
|
40
40
|
"""Validates the enum"""
|
41
|
-
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'):
|
42
|
-
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
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
42
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
43
43
|
return value
|
44
44
|
|
45
45
|
class Config:
|
lusid/models/instrument_event.py
CHANGED
@@ -26,14 +26,14 @@ class InstrumentEvent(BaseModel):
|
|
26
26
|
"""
|
27
27
|
Base class for representing instrument events in LUSID, such as dividends, stock splits, and option exercises. This base class should not be directly instantiated; each supported InstrumentEventType has a corresponding inherited class. # noqa: E501
|
28
28
|
"""
|
29
|
-
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")
|
29
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
30
30
|
__properties = ["instrumentEventType"]
|
31
31
|
|
32
32
|
@validator('instrument_event_type')
|
33
33
|
def instrument_event_type_validate_enum(cls, value):
|
34
34
|
"""Validates the enum"""
|
35
|
-
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'):
|
36
|
-
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')")
|
35
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
36
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
37
37
|
return value
|
38
38
|
|
39
39
|
class Config:
|
@@ -54,7 +54,10 @@ class InstrumentEvent(BaseModel):
|
|
54
54
|
'CapitalDistributionEvent': 'CapitalDistributionEvent',
|
55
55
|
'CashDividendEvent': 'CashDividendEvent',
|
56
56
|
'CashFlowEvent': 'CashFlowEvent',
|
57
|
+
'CdsCreditEvent': 'CdsCreditEvent',
|
58
|
+
'CdxCreditEvent': 'CdxCreditEvent',
|
57
59
|
'CloseEvent': 'CloseEvent',
|
60
|
+
'CreditPremiumCashFlowEvent': 'CreditPremiumCashFlowEvent',
|
58
61
|
'DividendOptionEvent': 'DividendOptionEvent',
|
59
62
|
'DividendReinvestmentEvent': 'DividendReinvestmentEvent',
|
60
63
|
'ExerciseEvent': 'ExerciseEvent',
|
@@ -73,6 +76,8 @@ class InstrumentEvent(BaseModel):
|
|
73
76
|
'SpinOffEvent': 'SpinOffEvent',
|
74
77
|
'StockDividendEvent': 'StockDividendEvent',
|
75
78
|
'StockSplitEvent': 'StockSplitEvent',
|
79
|
+
'SwapCashFlowEvent': 'SwapCashFlowEvent',
|
80
|
+
'SwapPrincipalEvent': 'SwapPrincipalEvent',
|
76
81
|
'TransitionEvent': 'TransitionEvent',
|
77
82
|
'TriggerEvent': 'TriggerEvent'
|
78
83
|
}
|
@@ -95,7 +100,7 @@ class InstrumentEvent(BaseModel):
|
|
95
100
|
return json.dumps(self.to_dict())
|
96
101
|
|
97
102
|
@classmethod
|
98
|
-
def from_json(cls, json_str: str) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
103
|
+
def from_json(cls, json_str: str) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CdsCreditEvent, CdxCreditEvent, CloseEvent, CreditPremiumCashFlowEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, SwapCashFlowEvent, SwapPrincipalEvent, TransitionEvent, TriggerEvent):
|
99
104
|
"""Create an instance of InstrumentEvent from a JSON string"""
|
100
105
|
return cls.from_dict(json.loads(json_str))
|
101
106
|
|
@@ -108,7 +113,7 @@ class InstrumentEvent(BaseModel):
|
|
108
113
|
return _dict
|
109
114
|
|
110
115
|
@classmethod
|
111
|
-
def from_dict(cls, obj: dict) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CloseEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, TransitionEvent, TriggerEvent):
|
116
|
+
def from_dict(cls, obj: dict) -> Union(AccumulationEvent, AmortisationEvent, BondCouponEvent, BondDefaultEvent, BondPrincipalEvent, CapitalDistributionEvent, CashDividendEvent, CashFlowEvent, CdsCreditEvent, CdxCreditEvent, CloseEvent, CreditPremiumCashFlowEvent, DividendOptionEvent, DividendReinvestmentEvent, ExerciseEvent, ExpiryEvent, FutureExpiryEvent, FxForwardSettlementEvent, InformationalErrorEvent, InformationalEvent, MaturityEvent, MergerEvent, OpenEvent, RawVendorEvent, ResetEvent, ReverseStockSplitEvent, ScripDividendEvent, SpinOffEvent, StockDividendEvent, StockSplitEvent, SwapCashFlowEvent, SwapPrincipalEvent, TransitionEvent, TriggerEvent):
|
112
117
|
"""Create an instance of InstrumentEvent from a dict"""
|
113
118
|
# look up the object type based on discriminator mapping
|
114
119
|
object_type = cls.get_discriminator_value(obj)
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist
|
23
|
+
from lusid.models.link import Link
|
23
24
|
from lusid.models.resource_id import ResourceId
|
24
25
|
from lusid.models.version import Version
|
25
26
|
|
@@ -35,7 +36,8 @@ class InstrumentEventInstruction(BaseModel):
|
|
35
36
|
holding_id: Optional[StrictInt] = Field(None, alias="holdingId", description="For holding instructions, the id of the holding for which the instruction will apply")
|
36
37
|
version: Optional[Version] = None
|
37
38
|
href: Optional[StrictStr] = Field(None, description="The uri for this version of this instruction")
|
38
|
-
|
39
|
+
links: Optional[conlist(Link)] = None
|
40
|
+
__properties = ["instrumentEventInstructionId", "portfolioId", "instrumentEventId", "instructionType", "electionKey", "holdingId", "version", "href", "links"]
|
39
41
|
|
40
42
|
class Config:
|
41
43
|
"""Pydantic configuration"""
|
@@ -67,6 +69,13 @@ class InstrumentEventInstruction(BaseModel):
|
|
67
69
|
# override the default output from pydantic by calling `to_dict()` of version
|
68
70
|
if self.version:
|
69
71
|
_dict['version'] = self.version.to_dict()
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
73
|
+
_items = []
|
74
|
+
if self.links:
|
75
|
+
for _item in self.links:
|
76
|
+
if _item:
|
77
|
+
_items.append(_item.to_dict())
|
78
|
+
_dict['links'] = _items
|
70
79
|
# set to None if instrument_event_instruction_id (nullable) is None
|
71
80
|
# and __fields_set__ contains the field
|
72
81
|
if self.instrument_event_instruction_id is None and "instrument_event_instruction_id" in self.__fields_set__:
|
@@ -97,6 +106,11 @@ class InstrumentEventInstruction(BaseModel):
|
|
97
106
|
if self.href is None and "href" in self.__fields_set__:
|
98
107
|
_dict['href'] = None
|
99
108
|
|
109
|
+
# set to None if links (nullable) is None
|
110
|
+
# and __fields_set__ contains the field
|
111
|
+
if self.links is None and "links" in self.__fields_set__:
|
112
|
+
_dict['links'] = None
|
113
|
+
|
100
114
|
return _dict
|
101
115
|
|
102
116
|
@classmethod
|
@@ -116,6 +130,7 @@ class InstrumentEventInstruction(BaseModel):
|
|
116
130
|
"election_key": obj.get("electionKey"),
|
117
131
|
"holding_id": obj.get("holdingId"),
|
118
132
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
119
|
-
"href": obj.get("href")
|
133
|
+
"href": obj.get("href"),
|
134
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
120
135
|
})
|
121
136
|
return _obj
|
@@ -58,6 +58,11 @@ class InstrumentEventType(str, Enum):
|
|
58
58
|
SPINOFFEVENT = 'SpinOffEvent'
|
59
59
|
MERGEREVENT = 'MergerEvent'
|
60
60
|
FUTUREEXPIRYEVENT = 'FutureExpiryEvent'
|
61
|
+
SWAPCASHFLOWEVENT = 'SwapCashFlowEvent'
|
62
|
+
SWAPPRINCIPALEVENT = 'SwapPrincipalEvent'
|
63
|
+
CREDITPREMIUMCASHFLOWEVENT = 'CreditPremiumCashFlowEvent'
|
64
|
+
CDSCREDITEVENT = 'CdsCreditEvent'
|
65
|
+
CDXCREDITEVENT = 'CdxCreditEvent'
|
61
66
|
|
62
67
|
@classmethod
|
63
68
|
def from_json(cls, json_str: str) -> InstrumentEventType:
|
lusid/models/maturity_event.py
CHANGED
@@ -27,15 +27,15 @@ class MaturityEvent(InstrumentEvent):
|
|
27
27
|
Definition of a Maturity Event This is an event that describes the maturity of the instrument. # noqa: E501
|
28
28
|
"""
|
29
29
|
maturity_date: datetime = Field(..., alias="maturityDate", description="Maturity date of the instrument")
|
30
|
-
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")
|
30
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
32
32
|
__properties = ["instrumentEventType", "maturityDate"]
|
33
33
|
|
34
34
|
@validator('instrument_event_type')
|
35
35
|
def instrument_event_type_validate_enum(cls, value):
|
36
36
|
"""Validates the enum"""
|
37
|
-
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'):
|
38
|
-
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')")
|
37
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
38
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
39
39
|
return value
|
40
40
|
|
41
41
|
class Config:
|
lusid/models/merger_event.py
CHANGED
@@ -40,15 +40,15 @@ class MergerEvent(InstrumentEvent):
|
|
40
40
|
payment_date: datetime = Field(..., alias="paymentDate", description="Date on which the merger takes place.")
|
41
41
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Optional. Date you have to be the holder of record of the original shares in order to receive the new shares.")
|
42
42
|
security_elections: Optional[conlist(SecurityOfferElection)] = Field(None, alias="securityElections", description="List of possible SecurityOfferElections for this merger event")
|
43
|
-
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
43
|
+
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
|
44
44
|
additional_properties: Dict[str, Any] = {}
|
45
45
|
__properties = ["instrumentEventType", "announcementDate", "cashAndSecurityOfferElections", "cashElections", "exDate", "fractionalUnitsCashCurrency", "fractionalUnitsCashPrice", "newInstrument", "paymentDate", "recordDate", "securityElections"]
|
46
46
|
|
47
47
|
@validator('instrument_event_type')
|
48
48
|
def instrument_event_type_validate_enum(cls, value):
|
49
49
|
"""Validates the enum"""
|
50
|
-
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'):
|
51
|
-
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')")
|
50
|
+
if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
|
51
|
+
raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
|
52
52
|
return value
|
53
53
|
|
54
54
|
class Config:
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List
|
22
|
+
from pydantic.v1 import BaseModel, Field, conlist
|
23
|
+
from lusid.models.access_metadata_value import AccessMetadataValue
|
24
|
+
|
25
|
+
class MetadataKeyValue(BaseModel):
|
26
|
+
"""
|
27
|
+
MetadataKeyValue
|
28
|
+
"""
|
29
|
+
metadata: Dict[str, conlist(AccessMetadataValue)] = Field(...)
|
30
|
+
__properties = ["metadata"]
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
"""Pydantic configuration"""
|
34
|
+
allow_population_by_field_name = True
|
35
|
+
validate_assignment = True
|
36
|
+
|
37
|
+
def to_str(self) -> str:
|
38
|
+
"""Returns the string representation of the model using alias"""
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
40
|
+
|
41
|
+
def to_json(self) -> str:
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
43
|
+
return json.dumps(self.to_dict())
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_json(cls, json_str: str) -> MetadataKeyValue:
|
47
|
+
"""Create an instance of MetadataKeyValue from a JSON string"""
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
49
|
+
|
50
|
+
def to_dict(self):
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
52
|
+
_dict = self.dict(by_alias=True,
|
53
|
+
exclude={
|
54
|
+
},
|
55
|
+
exclude_none=True)
|
56
|
+
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
57
|
+
_field_dict_of_array = {}
|
58
|
+
if self.metadata:
|
59
|
+
for _key in self.metadata:
|
60
|
+
if self.metadata[_key]:
|
61
|
+
_field_dict_of_array[_key] = [
|
62
|
+
_item.to_dict() for _item in self.metadata[_key]
|
63
|
+
]
|
64
|
+
_dict['metadata'] = _field_dict_of_array
|
65
|
+
return _dict
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_dict(cls, obj: dict) -> MetadataKeyValue:
|
69
|
+
"""Create an instance of MetadataKeyValue from a dict"""
|
70
|
+
if obj is None:
|
71
|
+
return None
|
72
|
+
|
73
|
+
if not isinstance(obj, dict):
|
74
|
+
return MetadataKeyValue.parse_obj(obj)
|
75
|
+
|
76
|
+
_obj = MetadataKeyValue.parse_obj({
|
77
|
+
"metadata": dict(
|
78
|
+
(_k,
|
79
|
+
[AccessMetadataValue.from_dict(_item) for _item in _v]
|
80
|
+
if _v is not None
|
81
|
+
else None
|
82
|
+
)
|
83
|
+
for _k, _v in obj.get("metadata").items()
|
84
|
+
)
|
85
|
+
})
|
86
|
+
return _obj
|