lusid-sdk 2.1.81__py3-none-any.whl → 2.1.110__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 +32 -0
- lusid/api/__init__.py +2 -0
- lusid/api/entities_api.py +4 -4
- lusid/api/portfolios_api.py +554 -0
- lusid/api/staged_modifications_api.py +762 -0
- lusid/api_response.py +1 -1
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +30 -0
- lusid/models/account.py +1 -1
- 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/capital_distribution_event.py +117 -0
- 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/custodian_account.py +1 -1
- lusid/models/custodian_account_request.py +1 -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/fx_forward.py +1 -1
- 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_event.py +6 -5
- lusid/models/instrument_event_instruction.py +121 -0
- lusid/models/instrument_event_instruction_request.py +87 -0
- lusid/models/instrument_event_instructions_response.py +107 -0
- lusid/models/instrument_event_type.py +1 -0
- lusid/models/maturity_event.py +3 -3
- lusid/models/open_event.py +3 -3
- lusid/models/paged_resource_list_of_staged_modification.py +113 -0
- lusid/models/paged_resource_list_of_staged_modifications_requested_change_interval.py +113 -0
- lusid/models/portfolio.py +7 -1
- lusid/models/portfolio_entity.py +33 -5
- lusid/models/portfolio_without_href.py +7 -1
- lusid/models/raw_vendor_event.py +3 -3
- lusid/models/requested_changes.py +76 -0
- lusid/models/reset_event.py +3 -3
- lusid/models/reverse_stock_split_event.py +3 -3
- lusid/models/scrip_dividend_event.py +3 -3
- lusid/models/staged_modification.py +175 -0
- lusid/models/staged_modification_decision.py +97 -0
- lusid/models/staged_modification_decision_request.py +71 -0
- lusid/models/staged_modification_effective_range.py +71 -0
- lusid/models/staged_modification_staging_rule.py +85 -0
- lusid/models/staged_modifications_entity_hrefs.py +103 -0
- lusid/models/staged_modifications_info.py +78 -0
- lusid/models/staged_modifications_requested_change_interval.py +116 -0
- lusid/models/staging_rule_set.py +17 -2
- lusid/models/stock_dividend_event.py +3 -3
- lusid/models/stock_split_event.py +3 -3
- lusid/models/transition_event.py +3 -3
- lusid/models/trigger_event.py +3 -3
- lusid/models/version.py +9 -2
- {lusid_sdk-2.1.81.dist-info → lusid_sdk-2.1.110.dist-info}/METADATA +25 -3
- {lusid_sdk-2.1.81.dist-info → lusid_sdk-2.1.110.dist-info}/RECORD +62 -46
- {lusid_sdk-2.1.81.dist-info → lusid_sdk-2.1.110.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
|
23
|
+
from lusid.models.link import Link
|
|
24
|
+
from lusid.models.staged_modifications_requested_change_interval import StagedModificationsRequestedChangeInterval
|
|
25
|
+
|
|
26
|
+
class PagedResourceListOfStagedModificationsRequestedChangeInterval(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PagedResourceListOfStagedModificationsRequestedChangeInterval
|
|
29
|
+
"""
|
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
|
32
|
+
values: conlist(StagedModificationsRequestedChangeInterval) = Field(...)
|
|
33
|
+
href: Optional[StrictStr] = None
|
|
34
|
+
links: Optional[conlist(Link)] = None
|
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
|
36
|
+
|
|
37
|
+
class Config:
|
|
38
|
+
"""Pydantic configuration"""
|
|
39
|
+
allow_population_by_field_name = True
|
|
40
|
+
validate_assignment = True
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfStagedModificationsRequestedChangeInterval:
|
|
52
|
+
"""Create an instance of PagedResourceListOfStagedModificationsRequestedChangeInterval from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self):
|
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
57
|
+
_dict = self.dict(by_alias=True,
|
|
58
|
+
exclude={
|
|
59
|
+
},
|
|
60
|
+
exclude_none=True)
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
|
62
|
+
_items = []
|
|
63
|
+
if self.values:
|
|
64
|
+
for _item in self.values:
|
|
65
|
+
if _item:
|
|
66
|
+
_items.append(_item.to_dict())
|
|
67
|
+
_dict['values'] = _items
|
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
69
|
+
_items = []
|
|
70
|
+
if self.links:
|
|
71
|
+
for _item in self.links:
|
|
72
|
+
if _item:
|
|
73
|
+
_items.append(_item.to_dict())
|
|
74
|
+
_dict['links'] = _items
|
|
75
|
+
# set to None if next_page (nullable) is None
|
|
76
|
+
# and __fields_set__ contains the field
|
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
|
78
|
+
_dict['nextPage'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if previous_page (nullable) is None
|
|
81
|
+
# and __fields_set__ contains the field
|
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
|
83
|
+
_dict['previousPage'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if href (nullable) is None
|
|
86
|
+
# and __fields_set__ contains the field
|
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
88
|
+
_dict['href'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if links (nullable) is None
|
|
91
|
+
# and __fields_set__ contains the field
|
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
93
|
+
_dict['links'] = None
|
|
94
|
+
|
|
95
|
+
return _dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfStagedModificationsRequestedChangeInterval:
|
|
99
|
+
"""Create an instance of PagedResourceListOfStagedModificationsRequestedChangeInterval from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return PagedResourceListOfStagedModificationsRequestedChangeInterval.parse_obj(obj)
|
|
105
|
+
|
|
106
|
+
_obj = PagedResourceListOfStagedModificationsRequestedChangeInterval.parse_obj({
|
|
107
|
+
"next_page": obj.get("nextPage"),
|
|
108
|
+
"previous_page": obj.get("previousPage"),
|
|
109
|
+
"values": [StagedModificationsRequestedChangeInterval.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
|
110
|
+
"href": obj.get("href"),
|
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
lusid/models/portfolio.py
CHANGED
|
@@ -25,6 +25,7 @@ from lusid.models.link import Link
|
|
|
25
25
|
from lusid.models.model_property import ModelProperty
|
|
26
26
|
from lusid.models.relationship import Relationship
|
|
27
27
|
from lusid.models.resource_id import ResourceId
|
|
28
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
|
28
29
|
from lusid.models.version import Version
|
|
29
30
|
|
|
30
31
|
class Portfolio(BaseModel):
|
|
@@ -39,6 +40,7 @@ class Portfolio(BaseModel):
|
|
|
39
40
|
created: datetime = Field(..., description="The effective datetime at which the portfolio was created. No transactions or constituents can be added to the portfolio before this date.")
|
|
40
41
|
parent_portfolio_id: Optional[ResourceId] = Field(None, alias="parentPortfolioId")
|
|
41
42
|
version: Optional[Version] = None
|
|
43
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
|
42
44
|
is_derived: Optional[StrictBool] = Field(None, alias="isDerived", description="Whether or not this is a derived portfolio.")
|
|
43
45
|
base_currency: Optional[StrictStr] = Field(None, alias="baseCurrency", description="The base currency of the portfolio.")
|
|
44
46
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The requested portfolio properties. These will be from the 'Portfolio' domain.")
|
|
@@ -51,7 +53,7 @@ class Portfolio(BaseModel):
|
|
|
51
53
|
instrument_event_configuration: Optional[InstrumentEventConfiguration] = Field(None, alias="instrumentEventConfiguration")
|
|
52
54
|
amortisation_rule_set_id: Optional[ResourceId] = Field(None, alias="amortisationRuleSetId")
|
|
53
55
|
links: Optional[conlist(Link)] = None
|
|
54
|
-
__properties = ["href", "id", "type", "displayName", "description", "created", "parentPortfolioId", "version", "isDerived", "baseCurrency", "properties", "relationships", "instrumentScopes", "accountingMethod", "amortisationMethod", "transactionTypeScope", "cashGainLossCalculationDate", "instrumentEventConfiguration", "amortisationRuleSetId", "links"]
|
|
56
|
+
__properties = ["href", "id", "type", "displayName", "description", "created", "parentPortfolioId", "version", "stagedModifications", "isDerived", "baseCurrency", "properties", "relationships", "instrumentScopes", "accountingMethod", "amortisationMethod", "transactionTypeScope", "cashGainLossCalculationDate", "instrumentEventConfiguration", "amortisationRuleSetId", "links"]
|
|
55
57
|
|
|
56
58
|
@validator('type')
|
|
57
59
|
def type_validate_enum(cls, value):
|
|
@@ -103,6 +105,9 @@ class Portfolio(BaseModel):
|
|
|
103
105
|
# override the default output from pydantic by calling `to_dict()` of version
|
|
104
106
|
if self.version:
|
|
105
107
|
_dict['version'] = self.version.to_dict()
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
|
109
|
+
if self.staged_modifications:
|
|
110
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
|
106
111
|
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
107
112
|
_field_dict = {}
|
|
108
113
|
if self.properties:
|
|
@@ -200,6 +205,7 @@ class Portfolio(BaseModel):
|
|
|
200
205
|
"created": obj.get("created"),
|
|
201
206
|
"parent_portfolio_id": ResourceId.from_dict(obj.get("parentPortfolioId")) if obj.get("parentPortfolioId") is not None else None,
|
|
202
207
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
208
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
|
203
209
|
"is_derived": obj.get("isDerived"),
|
|
204
210
|
"base_currency": obj.get("baseCurrency"),
|
|
205
211
|
"properties": dict(
|
lusid/models/portfolio_entity.py
CHANGED
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist, constr
|
|
23
23
|
from lusid.models.link import Link
|
|
24
24
|
from lusid.models.portfolio_without_href import PortfolioWithoutHref
|
|
25
25
|
|
|
@@ -28,13 +28,17 @@ class PortfolioEntity(BaseModel):
|
|
|
28
28
|
A list of portfolios. # noqa: E501
|
|
29
29
|
"""
|
|
30
30
|
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
31
|
-
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity")
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
|
32
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
|
33
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
|
34
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
|
35
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
|
36
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
|
37
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
|
34
38
|
prevailing_portfolio: Optional[PortfolioWithoutHref] = Field(None, alias="prevailingPortfolio")
|
|
35
39
|
deleted_portfolio: Optional[PortfolioWithoutHref] = Field(None, alias="deletedPortfolio")
|
|
36
40
|
links: Optional[conlist(Link)] = None
|
|
37
|
-
__properties = ["href", "entityUniqueId", "status", "effectiveAtCreated", "prevailingPortfolio", "deletedPortfolio", "links"]
|
|
41
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingPortfolio", "deletedPortfolio", "links"]
|
|
38
42
|
|
|
39
43
|
class Config:
|
|
40
44
|
"""Pydantic configuration"""
|
|
@@ -73,6 +77,26 @@ class PortfolioEntity(BaseModel):
|
|
|
73
77
|
if _item:
|
|
74
78
|
_items.append(_item.to_dict())
|
|
75
79
|
_dict['links'] = _items
|
|
80
|
+
# set to None if as_at_version_number (nullable) is None
|
|
81
|
+
# and __fields_set__ contains the field
|
|
82
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
|
83
|
+
_dict['asAtVersionNumber'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if as_at_deleted (nullable) is None
|
|
86
|
+
# and __fields_set__ contains the field
|
|
87
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
|
88
|
+
_dict['asAtDeleted'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if user_id_deleted (nullable) is None
|
|
91
|
+
# and __fields_set__ contains the field
|
|
92
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
|
93
|
+
_dict['userIdDeleted'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if request_id_deleted (nullable) is None
|
|
96
|
+
# and __fields_set__ contains the field
|
|
97
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
|
98
|
+
_dict['requestIdDeleted'] = None
|
|
99
|
+
|
|
76
100
|
# set to None if effective_at_created (nullable) is None
|
|
77
101
|
# and __fields_set__ contains the field
|
|
78
102
|
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
|
@@ -97,7 +121,11 @@ class PortfolioEntity(BaseModel):
|
|
|
97
121
|
_obj = PortfolioEntity.parse_obj({
|
|
98
122
|
"href": obj.get("href"),
|
|
99
123
|
"entity_unique_id": obj.get("entityUniqueId"),
|
|
124
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
|
100
125
|
"status": obj.get("status"),
|
|
126
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
|
127
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
|
128
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
|
101
129
|
"effective_at_created": obj.get("effectiveAtCreated"),
|
|
102
130
|
"prevailing_portfolio": PortfolioWithoutHref.from_dict(obj.get("prevailingPortfolio")) if obj.get("prevailingPortfolio") is not None else None,
|
|
103
131
|
"deleted_portfolio": PortfolioWithoutHref.from_dict(obj.get("deletedPortfolio")) if obj.get("deletedPortfolio") is not None else None,
|
|
@@ -25,6 +25,7 @@ from lusid.models.link import Link
|
|
|
25
25
|
from lusid.models.model_property import ModelProperty
|
|
26
26
|
from lusid.models.relationship import Relationship
|
|
27
27
|
from lusid.models.resource_id import ResourceId
|
|
28
|
+
from lusid.models.staged_modifications_info import StagedModificationsInfo
|
|
28
29
|
from lusid.models.version import Version
|
|
29
30
|
|
|
30
31
|
class PortfolioWithoutHref(BaseModel):
|
|
@@ -38,6 +39,7 @@ class PortfolioWithoutHref(BaseModel):
|
|
|
38
39
|
created: datetime = Field(..., description="The effective datetime at which the portfolio was created. No transactions or constituents can be added to the portfolio before this date.")
|
|
39
40
|
parent_portfolio_id: Optional[ResourceId] = Field(None, alias="parentPortfolioId")
|
|
40
41
|
version: Optional[Version] = None
|
|
42
|
+
staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
|
|
41
43
|
is_derived: Optional[StrictBool] = Field(None, alias="isDerived", description="Whether or not this is a derived portfolio.")
|
|
42
44
|
base_currency: Optional[StrictStr] = Field(None, alias="baseCurrency", description="The base currency of the portfolio.")
|
|
43
45
|
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The requested portfolio properties. These will be from the 'Portfolio' domain.")
|
|
@@ -50,7 +52,7 @@ class PortfolioWithoutHref(BaseModel):
|
|
|
50
52
|
instrument_event_configuration: Optional[InstrumentEventConfiguration] = Field(None, alias="instrumentEventConfiguration")
|
|
51
53
|
amortisation_rule_set_id: Optional[ResourceId] = Field(None, alias="amortisationRuleSetId")
|
|
52
54
|
links: Optional[conlist(Link)] = None
|
|
53
|
-
__properties = ["id", "type", "displayName", "description", "created", "parentPortfolioId", "version", "isDerived", "baseCurrency", "properties", "relationships", "instrumentScopes", "accountingMethod", "amortisationMethod", "transactionTypeScope", "cashGainLossCalculationDate", "instrumentEventConfiguration", "amortisationRuleSetId", "links"]
|
|
55
|
+
__properties = ["id", "type", "displayName", "description", "created", "parentPortfolioId", "version", "stagedModifications", "isDerived", "baseCurrency", "properties", "relationships", "instrumentScopes", "accountingMethod", "amortisationMethod", "transactionTypeScope", "cashGainLossCalculationDate", "instrumentEventConfiguration", "amortisationRuleSetId", "links"]
|
|
54
56
|
|
|
55
57
|
@validator('type')
|
|
56
58
|
def type_validate_enum(cls, value):
|
|
@@ -102,6 +104,9 @@ class PortfolioWithoutHref(BaseModel):
|
|
|
102
104
|
# override the default output from pydantic by calling `to_dict()` of version
|
|
103
105
|
if self.version:
|
|
104
106
|
_dict['version'] = self.version.to_dict()
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of staged_modifications
|
|
108
|
+
if self.staged_modifications:
|
|
109
|
+
_dict['stagedModifications'] = self.staged_modifications.to_dict()
|
|
105
110
|
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
106
111
|
_field_dict = {}
|
|
107
112
|
if self.properties:
|
|
@@ -193,6 +198,7 @@ class PortfolioWithoutHref(BaseModel):
|
|
|
193
198
|
"created": obj.get("created"),
|
|
194
199
|
"parent_portfolio_id": ResourceId.from_dict(obj.get("parentPortfolioId")) if obj.get("parentPortfolioId") is not None else None,
|
|
195
200
|
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
201
|
+
"staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None,
|
|
196
202
|
"is_derived": obj.get("isDerived"),
|
|
197
203
|
"base_currency": obj.get("baseCurrency"),
|
|
198
204
|
"properties": dict(
|
lusid/models/raw_vendor_event.py
CHANGED
|
@@ -30,15 +30,15 @@ class RawVendorEvent(InstrumentEvent):
|
|
|
30
30
|
effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the event")
|
|
31
31
|
event_value: LifeCycleEventValue = Field(..., alias="eventValue")
|
|
32
32
|
event_type: constr(strict=True, min_length=1) = Field(..., alias="eventType", description="What type of internal event does this represent; reset, exercise, amortisation etc.")
|
|
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")
|
|
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")
|
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
|
35
35
|
__properties = ["instrumentEventType", "effectiveAt", "eventValue", "eventType"]
|
|
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'):
|
|
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')")
|
|
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'):
|
|
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')")
|
|
42
42
|
return value
|
|
43
43
|
|
|
44
44
|
class Config:
|
|
@@ -0,0 +1,76 @@
|
|
|
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, StrictInt, StrictStr, conlist
|
|
23
|
+
|
|
24
|
+
class RequestedChanges(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
RequestedChanges
|
|
27
|
+
"""
|
|
28
|
+
attribute_count: Optional[StrictInt] = Field(None, alias="attributeCount", description="Number of attributes staged change applies to")
|
|
29
|
+
attribute_names: Optional[conlist(StrictStr)] = Field(None, alias="attributeNames", description="Names of the attributes the staged change applies to.")
|
|
30
|
+
__properties = ["attributeCount", "attributeNames"]
|
|
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) -> RequestedChanges:
|
|
47
|
+
"""Create an instance of RequestedChanges 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
|
+
# set to None if attribute_names (nullable) is None
|
|
57
|
+
# and __fields_set__ contains the field
|
|
58
|
+
if self.attribute_names is None and "attribute_names" in self.__fields_set__:
|
|
59
|
+
_dict['attributeNames'] = None
|
|
60
|
+
|
|
61
|
+
return _dict
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls, obj: dict) -> RequestedChanges:
|
|
65
|
+
"""Create an instance of RequestedChanges from a dict"""
|
|
66
|
+
if obj is None:
|
|
67
|
+
return None
|
|
68
|
+
|
|
69
|
+
if not isinstance(obj, dict):
|
|
70
|
+
return RequestedChanges.parse_obj(obj)
|
|
71
|
+
|
|
72
|
+
_obj = RequestedChanges.parse_obj({
|
|
73
|
+
"attribute_count": obj.get("attributeCount"),
|
|
74
|
+
"attribute_names": obj.get("attributeNames")
|
|
75
|
+
})
|
|
76
|
+
return _obj
|
lusid/models/reset_event.py
CHANGED
|
@@ -30,15 +30,15 @@ class ResetEvent(InstrumentEvent):
|
|
|
30
30
|
reset_type: constr(strict=True, min_length=1) = Field(..., alias="resetType", description="The type of the reset; e.g. RIC, Currency-pair")
|
|
31
31
|
fixing_source: Optional[StrictStr] = Field(None, alias="fixingSource", description="Fixing identification source, if available.")
|
|
32
32
|
fixing_date: datetime = Field(..., alias="fixingDate", description="The date the reset fixes, or is observed upon.")
|
|
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")
|
|
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")
|
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
|
35
35
|
__properties = ["instrumentEventType", "value", "resetType", "fixingSource", "fixingDate"]
|
|
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'):
|
|
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')")
|
|
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'):
|
|
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')")
|
|
42
42
|
return value
|
|
43
43
|
|
|
44
44
|
class Config:
|
|
@@ -32,15 +32,15 @@ class ReverseStockSplitEvent(InstrumentEvent):
|
|
|
32
32
|
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
|
33
33
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to have their shares merged.")
|
|
34
34
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the reverse stock split was announced.")
|
|
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")
|
|
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")
|
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
|
37
37
|
__properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate"]
|
|
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'):
|
|
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')")
|
|
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'):
|
|
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')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
class Config:
|
|
@@ -32,15 +32,15 @@ class ScripDividendEvent(InstrumentEvent):
|
|
|
32
32
|
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.")
|
|
33
33
|
payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
|
|
34
34
|
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
|
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")
|
|
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")
|
|
36
36
|
additional_properties: Dict[str, Any] = {}
|
|
37
37
|
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "unitsRatio"]
|
|
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'):
|
|
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')")
|
|
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'):
|
|
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')")
|
|
44
44
|
return value
|
|
45
45
|
|
|
46
46
|
class Config:
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist
|
|
23
|
+
from lusid.models.link import Link
|
|
24
|
+
from lusid.models.requested_changes import RequestedChanges
|
|
25
|
+
from lusid.models.staged_modification_decision import StagedModificationDecision
|
|
26
|
+
from lusid.models.staged_modification_staging_rule import StagedModificationStagingRule
|
|
27
|
+
from lusid.models.staged_modifications_entity_hrefs import StagedModificationsEntityHrefs
|
|
28
|
+
|
|
29
|
+
class StagedModification(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
StagedModification
|
|
32
|
+
"""
|
|
33
|
+
id: Optional[StrictStr] = Field(None, description="The unique Id for the staged modification")
|
|
34
|
+
as_at_staged: Optional[datetime] = Field(None, alias="asAtStaged", description="Time at which the modification was staged.")
|
|
35
|
+
user_id_staged: Optional[StrictStr] = Field(None, alias="userIdStaged", description="Id of the user who created the stage modification request.")
|
|
36
|
+
requested_id_staged: Optional[StrictStr] = Field(None, alias="requestedIdStaged", description="The Request Id that initiated this staged modification.")
|
|
37
|
+
action: Optional[StrictStr] = Field(None, description="Type of action of the staged modification, either create, update or delete.")
|
|
38
|
+
staging_rule: Optional[StagedModificationStagingRule] = Field(None, alias="stagingRule")
|
|
39
|
+
decisions: Optional[conlist(StagedModificationDecision)] = Field(None, description="Object containing information relating to the decision on the staged modification.")
|
|
40
|
+
decisions_count: Optional[StrictInt] = Field(None, alias="decisionsCount", description="Number of decisions made.")
|
|
41
|
+
status: Optional[StrictStr] = Field(None, description="The status of the staged modification.")
|
|
42
|
+
entity_type: Optional[StrictStr] = Field(None, alias="entityType", description="The type of the entity that the staged modification applies to.")
|
|
43
|
+
scope: Optional[StrictStr] = Field(None, description="The scope of the entity that this staged modification applies to.")
|
|
44
|
+
entity_unique_id: Optional[StrictStr] = Field(None, alias="entityUniqueId", description="The unique Id of the entity the staged modification applies to.")
|
|
45
|
+
requested_changes: Optional[RequestedChanges] = Field(None, alias="requestedChanges")
|
|
46
|
+
entity_hrefs: Optional[StagedModificationsEntityHrefs] = Field(None, alias="entityHrefs")
|
|
47
|
+
links: Optional[conlist(Link)] = None
|
|
48
|
+
__properties = ["id", "asAtStaged", "userIdStaged", "requestedIdStaged", "action", "stagingRule", "decisions", "decisionsCount", "status", "entityType", "scope", "entityUniqueId", "requestedChanges", "entityHrefs", "links"]
|
|
49
|
+
|
|
50
|
+
class Config:
|
|
51
|
+
"""Pydantic configuration"""
|
|
52
|
+
allow_population_by_field_name = True
|
|
53
|
+
validate_assignment = True
|
|
54
|
+
|
|
55
|
+
def to_str(self) -> str:
|
|
56
|
+
"""Returns the string representation of the model using alias"""
|
|
57
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
58
|
+
|
|
59
|
+
def to_json(self) -> str:
|
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
|
61
|
+
return json.dumps(self.to_dict())
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> StagedModification:
|
|
65
|
+
"""Create an instance of StagedModification from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self):
|
|
69
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
70
|
+
_dict = self.dict(by_alias=True,
|
|
71
|
+
exclude={
|
|
72
|
+
},
|
|
73
|
+
exclude_none=True)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of staging_rule
|
|
75
|
+
if self.staging_rule:
|
|
76
|
+
_dict['stagingRule'] = self.staging_rule.to_dict()
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each item in decisions (list)
|
|
78
|
+
_items = []
|
|
79
|
+
if self.decisions:
|
|
80
|
+
for _item in self.decisions:
|
|
81
|
+
if _item:
|
|
82
|
+
_items.append(_item.to_dict())
|
|
83
|
+
_dict['decisions'] = _items
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of requested_changes
|
|
85
|
+
if self.requested_changes:
|
|
86
|
+
_dict['requestedChanges'] = self.requested_changes.to_dict()
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of entity_hrefs
|
|
88
|
+
if self.entity_hrefs:
|
|
89
|
+
_dict['entityHrefs'] = self.entity_hrefs.to_dict()
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
91
|
+
_items = []
|
|
92
|
+
if self.links:
|
|
93
|
+
for _item in self.links:
|
|
94
|
+
if _item:
|
|
95
|
+
_items.append(_item.to_dict())
|
|
96
|
+
_dict['links'] = _items
|
|
97
|
+
# set to None if id (nullable) is None
|
|
98
|
+
# and __fields_set__ contains the field
|
|
99
|
+
if self.id is None and "id" in self.__fields_set__:
|
|
100
|
+
_dict['id'] = None
|
|
101
|
+
|
|
102
|
+
# set to None if user_id_staged (nullable) is None
|
|
103
|
+
# and __fields_set__ contains the field
|
|
104
|
+
if self.user_id_staged is None and "user_id_staged" in self.__fields_set__:
|
|
105
|
+
_dict['userIdStaged'] = None
|
|
106
|
+
|
|
107
|
+
# set to None if requested_id_staged (nullable) is None
|
|
108
|
+
# and __fields_set__ contains the field
|
|
109
|
+
if self.requested_id_staged is None and "requested_id_staged" in self.__fields_set__:
|
|
110
|
+
_dict['requestedIdStaged'] = None
|
|
111
|
+
|
|
112
|
+
# set to None if action (nullable) is None
|
|
113
|
+
# and __fields_set__ contains the field
|
|
114
|
+
if self.action is None and "action" in self.__fields_set__:
|
|
115
|
+
_dict['action'] = None
|
|
116
|
+
|
|
117
|
+
# set to None if decisions (nullable) is None
|
|
118
|
+
# and __fields_set__ contains the field
|
|
119
|
+
if self.decisions is None and "decisions" in self.__fields_set__:
|
|
120
|
+
_dict['decisions'] = None
|
|
121
|
+
|
|
122
|
+
# set to None if status (nullable) is None
|
|
123
|
+
# and __fields_set__ contains the field
|
|
124
|
+
if self.status is None and "status" in self.__fields_set__:
|
|
125
|
+
_dict['status'] = None
|
|
126
|
+
|
|
127
|
+
# set to None if entity_type (nullable) is None
|
|
128
|
+
# and __fields_set__ contains the field
|
|
129
|
+
if self.entity_type is None and "entity_type" in self.__fields_set__:
|
|
130
|
+
_dict['entityType'] = None
|
|
131
|
+
|
|
132
|
+
# set to None if scope (nullable) is None
|
|
133
|
+
# and __fields_set__ contains the field
|
|
134
|
+
if self.scope is None and "scope" in self.__fields_set__:
|
|
135
|
+
_dict['scope'] = None
|
|
136
|
+
|
|
137
|
+
# set to None if entity_unique_id (nullable) is None
|
|
138
|
+
# and __fields_set__ contains the field
|
|
139
|
+
if self.entity_unique_id is None and "entity_unique_id" in self.__fields_set__:
|
|
140
|
+
_dict['entityUniqueId'] = None
|
|
141
|
+
|
|
142
|
+
# set to None if links (nullable) is None
|
|
143
|
+
# and __fields_set__ contains the field
|
|
144
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
145
|
+
_dict['links'] = None
|
|
146
|
+
|
|
147
|
+
return _dict
|
|
148
|
+
|
|
149
|
+
@classmethod
|
|
150
|
+
def from_dict(cls, obj: dict) -> StagedModification:
|
|
151
|
+
"""Create an instance of StagedModification from a dict"""
|
|
152
|
+
if obj is None:
|
|
153
|
+
return None
|
|
154
|
+
|
|
155
|
+
if not isinstance(obj, dict):
|
|
156
|
+
return StagedModification.parse_obj(obj)
|
|
157
|
+
|
|
158
|
+
_obj = StagedModification.parse_obj({
|
|
159
|
+
"id": obj.get("id"),
|
|
160
|
+
"as_at_staged": obj.get("asAtStaged"),
|
|
161
|
+
"user_id_staged": obj.get("userIdStaged"),
|
|
162
|
+
"requested_id_staged": obj.get("requestedIdStaged"),
|
|
163
|
+
"action": obj.get("action"),
|
|
164
|
+
"staging_rule": StagedModificationStagingRule.from_dict(obj.get("stagingRule")) if obj.get("stagingRule") is not None else None,
|
|
165
|
+
"decisions": [StagedModificationDecision.from_dict(_item) for _item in obj.get("decisions")] if obj.get("decisions") is not None else None,
|
|
166
|
+
"decisions_count": obj.get("decisionsCount"),
|
|
167
|
+
"status": obj.get("status"),
|
|
168
|
+
"entity_type": obj.get("entityType"),
|
|
169
|
+
"scope": obj.get("scope"),
|
|
170
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
|
171
|
+
"requested_changes": RequestedChanges.from_dict(obj.get("requestedChanges")) if obj.get("requestedChanges") is not None else None,
|
|
172
|
+
"entity_hrefs": StagedModificationsEntityHrefs.from_dict(obj.get("entityHrefs")) if obj.get("entityHrefs") is not None else None,
|
|
173
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
174
|
+
})
|
|
175
|
+
return _obj
|