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,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr
|
|
23
|
+
|
|
24
|
+
class StagedModificationDecision(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagedModificationDecision
|
|
27
|
+
"""
|
|
28
|
+
as_at: Optional[datetime] = Field(None, alias="asAt", description="Time the decision request is made.")
|
|
29
|
+
user_id: Optional[StrictStr] = Field(None, alias="userId", description="ID of user that approved the request.")
|
|
30
|
+
request_id: Optional[StrictStr] = Field(None, alias="requestId", description="ID of user that made the request.")
|
|
31
|
+
decision: Optional[StrictStr] = Field(None, description="The decision on the requested staged modification, can be 'Approve' or 'Reject'.")
|
|
32
|
+
comment: Optional[StrictStr] = Field(None, description="Comment on decision.")
|
|
33
|
+
__properties = ["asAt", "userId", "requestId", "decision", "comment"]
|
|
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) -> StagedModificationDecision:
|
|
50
|
+
"""Create an instance of StagedModificationDecision 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
|
+
# set to None if user_id (nullable) is None
|
|
60
|
+
# and __fields_set__ contains the field
|
|
61
|
+
if self.user_id is None and "user_id" in self.__fields_set__:
|
|
62
|
+
_dict['userId'] = None
|
|
63
|
+
|
|
64
|
+
# set to None if request_id (nullable) is None
|
|
65
|
+
# and __fields_set__ contains the field
|
|
66
|
+
if self.request_id is None and "request_id" in self.__fields_set__:
|
|
67
|
+
_dict['requestId'] = None
|
|
68
|
+
|
|
69
|
+
# set to None if decision (nullable) is None
|
|
70
|
+
# and __fields_set__ contains the field
|
|
71
|
+
if self.decision is None and "decision" in self.__fields_set__:
|
|
72
|
+
_dict['decision'] = None
|
|
73
|
+
|
|
74
|
+
# set to None if comment (nullable) is None
|
|
75
|
+
# and __fields_set__ contains the field
|
|
76
|
+
if self.comment is None and "comment" in self.__fields_set__:
|
|
77
|
+
_dict['comment'] = None
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: dict) -> StagedModificationDecision:
|
|
83
|
+
"""Create an instance of StagedModificationDecision from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return StagedModificationDecision.parse_obj(obj)
|
|
89
|
+
|
|
90
|
+
_obj = StagedModificationDecision.parse_obj({
|
|
91
|
+
"as_at": obj.get("asAt"),
|
|
92
|
+
"user_id": obj.get("userId"),
|
|
93
|
+
"request_id": obj.get("requestId"),
|
|
94
|
+
"decision": obj.get("decision"),
|
|
95
|
+
"comment": obj.get("comment")
|
|
96
|
+
})
|
|
97
|
+
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 StagedModificationDecisionRequest(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagedModificationDecisionRequest
|
|
27
|
+
"""
|
|
28
|
+
decision: constr(strict=True, min_length=1) = Field(..., description="The decision on the requested staged modification, can be 'Approve' or 'Reject'.")
|
|
29
|
+
comment: constr(strict=True, max_length=256, min_length=1) = Field(..., description="Comment on decision.")
|
|
30
|
+
__properties = ["decision", "comment"]
|
|
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) -> StagedModificationDecisionRequest:
|
|
47
|
+
"""Create an instance of StagedModificationDecisionRequest 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) -> StagedModificationDecisionRequest:
|
|
60
|
+
"""Create an instance of StagedModificationDecisionRequest from a dict"""
|
|
61
|
+
if obj is None:
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
if not isinstance(obj, dict):
|
|
65
|
+
return StagedModificationDecisionRequest.parse_obj(obj)
|
|
66
|
+
|
|
67
|
+
_obj = StagedModificationDecisionRequest.parse_obj({
|
|
68
|
+
"decision": obj.get("decision"),
|
|
69
|
+
"comment": obj.get("comment")
|
|
70
|
+
})
|
|
71
|
+
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
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field
|
|
23
|
+
|
|
24
|
+
class StagedModificationEffectiveRange(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagedModificationEffectiveRange
|
|
27
|
+
"""
|
|
28
|
+
from_date: Optional[datetime] = Field(None, alias="fromDate", description="Time the decision request is made.")
|
|
29
|
+
until_date: Optional[datetime] = Field(None, alias="untilDate", description="ID of user that approved the request.")
|
|
30
|
+
__properties = ["fromDate", "untilDate"]
|
|
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) -> StagedModificationEffectiveRange:
|
|
47
|
+
"""Create an instance of StagedModificationEffectiveRange 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) -> StagedModificationEffectiveRange:
|
|
60
|
+
"""Create an instance of StagedModificationEffectiveRange from a dict"""
|
|
61
|
+
if obj is None:
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
if not isinstance(obj, dict):
|
|
65
|
+
return StagedModificationEffectiveRange.parse_obj(obj)
|
|
66
|
+
|
|
67
|
+
_obj = StagedModificationEffectiveRange.parse_obj({
|
|
68
|
+
"from_date": obj.get("fromDate"),
|
|
69
|
+
"until_date": obj.get("untilDate")
|
|
70
|
+
})
|
|
71
|
+
return _obj
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr
|
|
23
|
+
|
|
24
|
+
class StagedModificationStagingRule(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagedModificationStagingRule
|
|
27
|
+
"""
|
|
28
|
+
staging_rule_set_id: Optional[StrictStr] = Field(None, alias="stagingRuleSetId", description="System generated unique id for the staging rule set.")
|
|
29
|
+
rule_id: Optional[StrictStr] = Field(None, alias="ruleId", description="The ID of the staging rule.")
|
|
30
|
+
required_approvals: Optional[StrictInt] = Field(None, alias="requiredApprovals", description="The number of approvals required. If left blank, one approval is needed.")
|
|
31
|
+
current_user_can_decide: Optional[StrictBool] = Field(None, alias="currentUserCanDecide", description="True or False indicating whether the current user can make a decision on the staged modification.")
|
|
32
|
+
__properties = ["stagingRuleSetId", "ruleId", "requiredApprovals", "currentUserCanDecide"]
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
"""Pydantic configuration"""
|
|
36
|
+
allow_population_by_field_name = True
|
|
37
|
+
validate_assignment = True
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> StagedModificationStagingRule:
|
|
49
|
+
"""Create an instance of StagedModificationStagingRule from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True,
|
|
55
|
+
exclude={
|
|
56
|
+
},
|
|
57
|
+
exclude_none=True)
|
|
58
|
+
# set to None if staging_rule_set_id (nullable) is None
|
|
59
|
+
# and __fields_set__ contains the field
|
|
60
|
+
if self.staging_rule_set_id is None and "staging_rule_set_id" in self.__fields_set__:
|
|
61
|
+
_dict['stagingRuleSetId'] = None
|
|
62
|
+
|
|
63
|
+
# set to None if rule_id (nullable) is None
|
|
64
|
+
# and __fields_set__ contains the field
|
|
65
|
+
if self.rule_id is None and "rule_id" in self.__fields_set__:
|
|
66
|
+
_dict['ruleId'] = None
|
|
67
|
+
|
|
68
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: dict) -> StagedModificationStagingRule:
|
|
72
|
+
"""Create an instance of StagedModificationStagingRule from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return StagedModificationStagingRule.parse_obj(obj)
|
|
78
|
+
|
|
79
|
+
_obj = StagedModificationStagingRule.parse_obj({
|
|
80
|
+
"staging_rule_set_id": obj.get("stagingRuleSetId"),
|
|
81
|
+
"rule_id": obj.get("ruleId"),
|
|
82
|
+
"required_approvals": obj.get("requiredApprovals"),
|
|
83
|
+
"current_user_can_decide": obj.get("currentUserCanDecide")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
|
|
25
|
+
class StagedModificationsEntityHrefs(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
StagedModificationsEntityHrefs
|
|
28
|
+
"""
|
|
29
|
+
when_staged: Optional[StrictStr] = Field(None, alias="whenStaged", description="The specific Uniform Resource Identifier (URI) for the staged modification change at the time when the change was requested.")
|
|
30
|
+
preview: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for the preview of staged modification change once applied.")
|
|
31
|
+
latest: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for the staged modification at latest time.")
|
|
32
|
+
links: Optional[conlist(Link)] = None
|
|
33
|
+
__properties = ["whenStaged", "preview", "latest", "links"]
|
|
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) -> StagedModificationsEntityHrefs:
|
|
50
|
+
"""Create an instance of StagedModificationsEntityHrefs 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 links (list)
|
|
60
|
+
_items = []
|
|
61
|
+
if self.links:
|
|
62
|
+
for _item in self.links:
|
|
63
|
+
if _item:
|
|
64
|
+
_items.append(_item.to_dict())
|
|
65
|
+
_dict['links'] = _items
|
|
66
|
+
# set to None if when_staged (nullable) is None
|
|
67
|
+
# and __fields_set__ contains the field
|
|
68
|
+
if self.when_staged is None and "when_staged" in self.__fields_set__:
|
|
69
|
+
_dict['whenStaged'] = None
|
|
70
|
+
|
|
71
|
+
# set to None if preview (nullable) is None
|
|
72
|
+
# and __fields_set__ contains the field
|
|
73
|
+
if self.preview is None and "preview" in self.__fields_set__:
|
|
74
|
+
_dict['preview'] = None
|
|
75
|
+
|
|
76
|
+
# set to None if latest (nullable) is None
|
|
77
|
+
# and __fields_set__ contains the field
|
|
78
|
+
if self.latest is None and "latest" in self.__fields_set__:
|
|
79
|
+
_dict['latest'] = None
|
|
80
|
+
|
|
81
|
+
# set to None if links (nullable) is None
|
|
82
|
+
# and __fields_set__ contains the field
|
|
83
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
84
|
+
_dict['links'] = None
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: dict) -> StagedModificationsEntityHrefs:
|
|
90
|
+
"""Create an instance of StagedModificationsEntityHrefs from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return StagedModificationsEntityHrefs.parse_obj(obj)
|
|
96
|
+
|
|
97
|
+
_obj = StagedModificationsEntityHrefs.parse_obj({
|
|
98
|
+
"when_staged": obj.get("whenStaged"),
|
|
99
|
+
"preview": obj.get("preview"),
|
|
100
|
+
"latest": obj.get("latest"),
|
|
101
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
@@ -0,0 +1,78 @@
|
|
|
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 StagedModificationsInfo(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
The staged modifications metadata. # noqa: E501
|
|
27
|
+
"""
|
|
28
|
+
count_pending: StrictInt = Field(..., alias="countPending", description="The number of staged modifications for the entity with a status of Pending for the requested asAt.")
|
|
29
|
+
href_pending: StrictStr = Field(..., alias="hrefPending", description="Link to the list staged modifications endpoint, filtered by entityType, entityUniqueId and status (= Pending).")
|
|
30
|
+
ids_previewed: Optional[conlist(StrictStr)] = Field(None, alias="idsPreviewed", description="An array of the ids of any StagedModifications being previewed.")
|
|
31
|
+
__properties = ["countPending", "hrefPending", "idsPreviewed"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> StagedModificationsInfo:
|
|
48
|
+
"""Create an instance of StagedModificationsInfo from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
# set to None if ids_previewed (nullable) is None
|
|
58
|
+
# and __fields_set__ contains the field
|
|
59
|
+
if self.ids_previewed is None and "ids_previewed" in self.__fields_set__:
|
|
60
|
+
_dict['idsPreviewed'] = None
|
|
61
|
+
|
|
62
|
+
return _dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls, obj: dict) -> StagedModificationsInfo:
|
|
66
|
+
"""Create an instance of StagedModificationsInfo from a dict"""
|
|
67
|
+
if obj is None:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
if not isinstance(obj, dict):
|
|
71
|
+
return StagedModificationsInfo.parse_obj(obj)
|
|
72
|
+
|
|
73
|
+
_obj = StagedModificationsInfo.parse_obj({
|
|
74
|
+
"count_pending": obj.get("countPending"),
|
|
75
|
+
"href_pending": obj.get("hrefPending"),
|
|
76
|
+
"ids_previewed": obj.get("idsPreviewed")
|
|
77
|
+
})
|
|
78
|
+
return _obj
|
|
@@ -0,0 +1,116 @@
|
|
|
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_modification_effective_range import StagedModificationEffectiveRange
|
|
25
|
+
|
|
26
|
+
class StagedModificationsRequestedChangeInterval(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
StagedModificationsRequestedChangeInterval
|
|
29
|
+
"""
|
|
30
|
+
attribute_name: Optional[StrictStr] = Field(None, alias="attributeName", description="Name of the property the change applies to.")
|
|
31
|
+
effective_range: Optional[StagedModificationEffectiveRange] = Field(None, alias="effectiveRange")
|
|
32
|
+
previous_value: Optional[Any] = Field(None, alias="previousValue", description="The previous value of the attribute before the requested change is applied.")
|
|
33
|
+
new_value: Optional[Any] = Field(None, alias="newValue", description="The value of the attribute once the requested change is applied.")
|
|
34
|
+
as_at_basis: Optional[StrictStr] = Field(None, alias="asAtBasis", description="Whether the change represents the modification when the request was made or the modification as it would be at the latest time.")
|
|
35
|
+
links: Optional[conlist(Link)] = None
|
|
36
|
+
__properties = ["attributeName", "effectiveRange", "previousValue", "newValue", "asAtBasis", "links"]
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
"""Pydantic configuration"""
|
|
40
|
+
allow_population_by_field_name = True
|
|
41
|
+
validate_assignment = True
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> StagedModificationsRequestedChangeInterval:
|
|
53
|
+
"""Create an instance of StagedModificationsRequestedChangeInterval from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self):
|
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
58
|
+
_dict = self.dict(by_alias=True,
|
|
59
|
+
exclude={
|
|
60
|
+
},
|
|
61
|
+
exclude_none=True)
|
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of effective_range
|
|
63
|
+
if self.effective_range:
|
|
64
|
+
_dict['effectiveRange'] = self.effective_range.to_dict()
|
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
66
|
+
_items = []
|
|
67
|
+
if self.links:
|
|
68
|
+
for _item in self.links:
|
|
69
|
+
if _item:
|
|
70
|
+
_items.append(_item.to_dict())
|
|
71
|
+
_dict['links'] = _items
|
|
72
|
+
# set to None if attribute_name (nullable) is None
|
|
73
|
+
# and __fields_set__ contains the field
|
|
74
|
+
if self.attribute_name is None and "attribute_name" in self.__fields_set__:
|
|
75
|
+
_dict['attributeName'] = None
|
|
76
|
+
|
|
77
|
+
# set to None if previous_value (nullable) is None
|
|
78
|
+
# and __fields_set__ contains the field
|
|
79
|
+
if self.previous_value is None and "previous_value" in self.__fields_set__:
|
|
80
|
+
_dict['previousValue'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if new_value (nullable) is None
|
|
83
|
+
# and __fields_set__ contains the field
|
|
84
|
+
if self.new_value is None and "new_value" in self.__fields_set__:
|
|
85
|
+
_dict['newValue'] = None
|
|
86
|
+
|
|
87
|
+
# set to None if as_at_basis (nullable) is None
|
|
88
|
+
# and __fields_set__ contains the field
|
|
89
|
+
if self.as_at_basis is None and "as_at_basis" in self.__fields_set__:
|
|
90
|
+
_dict['asAtBasis'] = None
|
|
91
|
+
|
|
92
|
+
# set to None if links (nullable) is None
|
|
93
|
+
# and __fields_set__ contains the field
|
|
94
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
95
|
+
_dict['links'] = None
|
|
96
|
+
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: dict) -> StagedModificationsRequestedChangeInterval:
|
|
101
|
+
"""Create an instance of StagedModificationsRequestedChangeInterval from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return StagedModificationsRequestedChangeInterval.parse_obj(obj)
|
|
107
|
+
|
|
108
|
+
_obj = StagedModificationsRequestedChangeInterval.parse_obj({
|
|
109
|
+
"attribute_name": obj.get("attributeName"),
|
|
110
|
+
"effective_range": StagedModificationEffectiveRange.from_dict(obj.get("effectiveRange")) if obj.get("effectiveRange") is not None else None,
|
|
111
|
+
"previous_value": obj.get("previousValue"),
|
|
112
|
+
"new_value": obj.get("newValue"),
|
|
113
|
+
"as_at_basis": obj.get("asAtBasis"),
|
|
114
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
115
|
+
})
|
|
116
|
+
return _obj
|
lusid/models/staging_rule_set.py
CHANGED
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.link import Link
|
|
23
24
|
from lusid.models.staging_rule import StagingRule
|
|
24
25
|
from lusid.models.version import Version
|
|
25
26
|
|
|
@@ -34,7 +35,8 @@ class StagingRuleSet(BaseModel):
|
|
|
34
35
|
rules: conlist(StagingRule) = Field(..., description="The list of staging rules that apply to a specific entity type.")
|
|
35
36
|
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
36
37
|
version: Optional[Version] = None
|
|
37
|
-
|
|
38
|
+
links: Optional[conlist(Link)] = None
|
|
39
|
+
__properties = ["entityType", "stagingRuleSetId", "displayName", "description", "rules", "href", "version", "links"]
|
|
38
40
|
|
|
39
41
|
class Config:
|
|
40
42
|
"""Pydantic configuration"""
|
|
@@ -70,6 +72,13 @@ class StagingRuleSet(BaseModel):
|
|
|
70
72
|
# override the default output from pydantic by calling `to_dict()` of version
|
|
71
73
|
if self.version:
|
|
72
74
|
_dict['version'] = self.version.to_dict()
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.links:
|
|
78
|
+
for _item in self.links:
|
|
79
|
+
if _item:
|
|
80
|
+
_items.append(_item.to_dict())
|
|
81
|
+
_dict['links'] = _items
|
|
73
82
|
# set to None if description (nullable) is None
|
|
74
83
|
# and __fields_set__ contains the field
|
|
75
84
|
if self.description is None and "description" in self.__fields_set__:
|
|
@@ -80,6 +89,11 @@ class StagingRuleSet(BaseModel):
|
|
|
80
89
|
if self.href is None and "href" in self.__fields_set__:
|
|
81
90
|
_dict['href'] = None
|
|
82
91
|
|
|
92
|
+
# set to None if links (nullable) is None
|
|
93
|
+
# and __fields_set__ contains the field
|
|
94
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
95
|
+
_dict['links'] = None
|
|
96
|
+
|
|
83
97
|
return _dict
|
|
84
98
|
|
|
85
99
|
@classmethod
|
|
@@ -98,6 +112,7 @@ class StagingRuleSet(BaseModel):
|
|
|
98
112
|
"description": obj.get("description"),
|
|
99
113
|
"rules": [StagingRule.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None,
|
|
100
114
|
"href": obj.get("href"),
|
|
101
|
-
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
|
115
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
116
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
102
117
|
})
|
|
103
118
|
return _obj
|