lusid-sdk 2.0.455__py3-none-any.whl → 2.0.485__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 +26 -0
- lusid/api/__init__.py +2 -0
- lusid/api/funds_api.py +1179 -125
- lusid/api/staging_rule_set_api.py +885 -0
- lusid/configuration.py +1 -1
- lusid/extensions/api_client_factory.py +4 -1
- lusid/models/__init__.py +24 -0
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_property_definition_request.py +3 -3
- lusid/models/create_staging_rule_set_request.py +91 -0
- lusid/models/fund_request.py +1 -1
- lusid/models/instrument_event_configuration.py +8 -2
- lusid/models/order_graph_block_order_synopsis.py +9 -2
- lusid/models/order_graph_block_placement_synopsis.py +9 -2
- lusid/models/paged_resource_list_of_staging_rule_set.py +113 -0
- lusid/models/property_definition.py +3 -3
- lusid/models/property_definition_search_result.py +3 -3
- lusid/models/property_domain.py +1 -0
- lusid/models/set_share_class_instruments_request.py +79 -0
- lusid/models/staging_rule.py +90 -0
- lusid/models/staging_rule_approval_criteria.py +81 -0
- lusid/models/staging_rule_match_criteria.py +95 -0
- lusid/models/staging_rule_set.py +103 -0
- lusid/models/transaction_property_map.py +9 -8
- lusid/models/update_staging_rule_set_request.py +91 -0
- lusid/models/upsert_valuation_point_request.py +135 -0
- lusid/models/valuation_point_data_query_parameters.py +73 -0
- lusid/models/valuation_point_data_request.py +76 -0
- lusid/models/valuation_point_data_response.py +107 -0
- {lusid_sdk-2.0.455.dist-info → lusid_sdk-2.0.485.dist-info}/METADATA +28 -6
- {lusid_sdk-2.0.455.dist-info → lusid_sdk-2.0.485.dist-info}/RECORD +32 -19
- {lusid_sdk-2.0.455.dist-info → lusid_sdk-2.0.485.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
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 import BaseModel, Field, StrictStr, conlist
|
|
23
|
+
from lusid.models.instrument_resolution_detail import InstrumentResolutionDetail
|
|
24
|
+
|
|
25
|
+
class SetShareClassInstrumentsRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The request used to create a Fund. # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
share_class_instrument_scopes: conlist(StrictStr, max_items=1) = Field(..., alias="shareClassInstrumentScopes", description="The scopes in which the instruments lie, currently limited to one.")
|
|
30
|
+
share_class_instruments: conlist(InstrumentResolutionDetail) = Field(..., alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
|
|
31
|
+
__properties = ["shareClassInstrumentScopes", "shareClassInstruments"]
|
|
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) -> SetShareClassInstrumentsRequest:
|
|
48
|
+
"""Create an instance of SetShareClassInstrumentsRequest 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in share_class_instruments (list)
|
|
58
|
+
_items = []
|
|
59
|
+
if self.share_class_instruments:
|
|
60
|
+
for _item in self.share_class_instruments:
|
|
61
|
+
if _item:
|
|
62
|
+
_items.append(_item.to_dict())
|
|
63
|
+
_dict['shareClassInstruments'] = _items
|
|
64
|
+
return _dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls, obj: dict) -> SetShareClassInstrumentsRequest:
|
|
68
|
+
"""Create an instance of SetShareClassInstrumentsRequest from a dict"""
|
|
69
|
+
if obj is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
if not isinstance(obj, dict):
|
|
73
|
+
return SetShareClassInstrumentsRequest.parse_obj(obj)
|
|
74
|
+
|
|
75
|
+
_obj = SetShareClassInstrumentsRequest.parse_obj({
|
|
76
|
+
"share_class_instrument_scopes": obj.get("shareClassInstrumentScopes"),
|
|
77
|
+
"share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None
|
|
78
|
+
})
|
|
79
|
+
return _obj
|
|
@@ -0,0 +1,90 @@
|
|
|
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 import BaseModel, Field, constr
|
|
23
|
+
from lusid.models.staging_rule_approval_criteria import StagingRuleApprovalCriteria
|
|
24
|
+
from lusid.models.staging_rule_match_criteria import StagingRuleMatchCriteria
|
|
25
|
+
|
|
26
|
+
class StagingRule(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
StagingRule
|
|
29
|
+
"""
|
|
30
|
+
rule_id: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="ruleId", description="The ID of the staging rule.")
|
|
31
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the staging rule.")
|
|
32
|
+
status: constr(strict=True, min_length=1) = Field(..., description="Whether the rule is 'Active' or 'Inactive'.")
|
|
33
|
+
match_criteria: StagingRuleMatchCriteria = Field(..., alias="matchCriteria")
|
|
34
|
+
approval_criteria: StagingRuleApprovalCriteria = Field(..., alias="approvalCriteria")
|
|
35
|
+
__properties = ["ruleId", "description", "status", "matchCriteria", "approvalCriteria"]
|
|
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) -> StagingRule:
|
|
52
|
+
"""Create an instance of StagingRule 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 match_criteria
|
|
62
|
+
if self.match_criteria:
|
|
63
|
+
_dict['matchCriteria'] = self.match_criteria.to_dict()
|
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of approval_criteria
|
|
65
|
+
if self.approval_criteria:
|
|
66
|
+
_dict['approvalCriteria'] = self.approval_criteria.to_dict()
|
|
67
|
+
# set to None if description (nullable) is None
|
|
68
|
+
# and __fields_set__ contains the field
|
|
69
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
70
|
+
_dict['description'] = None
|
|
71
|
+
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: dict) -> StagingRule:
|
|
76
|
+
"""Create an instance of StagingRule from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return StagingRule.parse_obj(obj)
|
|
82
|
+
|
|
83
|
+
_obj = StagingRule.parse_obj({
|
|
84
|
+
"rule_id": obj.get("ruleId"),
|
|
85
|
+
"description": obj.get("description"),
|
|
86
|
+
"status": obj.get("status"),
|
|
87
|
+
"match_criteria": StagingRuleMatchCriteria.from_dict(obj.get("matchCriteria")) if obj.get("matchCriteria") is not None else None,
|
|
88
|
+
"approval_criteria": StagingRuleApprovalCriteria.from_dict(obj.get("approvalCriteria")) if obj.get("approvalCriteria") is not None else None
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
@@ -0,0 +1,81 @@
|
|
|
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 import BaseModel, Field, StrictInt, constr
|
|
23
|
+
|
|
24
|
+
class StagingRuleApprovalCriteria(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagingRuleApprovalCriteria
|
|
27
|
+
"""
|
|
28
|
+
required_approvals: Optional[StrictInt] = Field(None, alias="requiredApprovals")
|
|
29
|
+
deciding_user: Optional[constr(strict=True, max_length=16384, min_length=0)] = Field(None, alias="decidingUser")
|
|
30
|
+
__properties = ["requiredApprovals", "decidingUser"]
|
|
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) -> StagingRuleApprovalCriteria:
|
|
47
|
+
"""Create an instance of StagingRuleApprovalCriteria 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 required_approvals (nullable) is None
|
|
57
|
+
# and __fields_set__ contains the field
|
|
58
|
+
if self.required_approvals is None and "required_approvals" in self.__fields_set__:
|
|
59
|
+
_dict['requiredApprovals'] = None
|
|
60
|
+
|
|
61
|
+
# set to None if deciding_user (nullable) is None
|
|
62
|
+
# and __fields_set__ contains the field
|
|
63
|
+
if self.deciding_user is None and "deciding_user" in self.__fields_set__:
|
|
64
|
+
_dict['decidingUser'] = None
|
|
65
|
+
|
|
66
|
+
return _dict
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls, obj: dict) -> StagingRuleApprovalCriteria:
|
|
70
|
+
"""Create an instance of StagingRuleApprovalCriteria from a dict"""
|
|
71
|
+
if obj is None:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
if not isinstance(obj, dict):
|
|
75
|
+
return StagingRuleApprovalCriteria.parse_obj(obj)
|
|
76
|
+
|
|
77
|
+
_obj = StagingRuleApprovalCriteria.parse_obj({
|
|
78
|
+
"required_approvals": obj.get("requiredApprovals"),
|
|
79
|
+
"deciding_user": obj.get("decidingUser")
|
|
80
|
+
})
|
|
81
|
+
return _obj
|
|
@@ -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 import BaseModel, Field, StrictStr, conlist, constr
|
|
23
|
+
|
|
24
|
+
class StagingRuleMatchCriteria(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagingRuleMatchCriteria
|
|
27
|
+
"""
|
|
28
|
+
action_in: Optional[conlist(StrictStr)] = Field(None, alias="actionIn")
|
|
29
|
+
requesting_user: Optional[constr(strict=True, max_length=16384, min_length=0)] = Field(None, alias="requestingUser")
|
|
30
|
+
entity_attributes: Optional[constr(strict=True, max_length=16384, min_length=0)] = Field(None, alias="entityAttributes")
|
|
31
|
+
changed_attribute_name_in: Optional[conlist(StrictStr)] = Field(None, alias="changedAttributeNameIn")
|
|
32
|
+
__properties = ["actionIn", "requestingUser", "entityAttributes", "changedAttributeNameIn"]
|
|
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) -> StagingRuleMatchCriteria:
|
|
49
|
+
"""Create an instance of StagingRuleMatchCriteria 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 action_in (nullable) is None
|
|
59
|
+
# and __fields_set__ contains the field
|
|
60
|
+
if self.action_in is None and "action_in" in self.__fields_set__:
|
|
61
|
+
_dict['actionIn'] = None
|
|
62
|
+
|
|
63
|
+
# set to None if requesting_user (nullable) is None
|
|
64
|
+
# and __fields_set__ contains the field
|
|
65
|
+
if self.requesting_user is None and "requesting_user" in self.__fields_set__:
|
|
66
|
+
_dict['requestingUser'] = None
|
|
67
|
+
|
|
68
|
+
# set to None if entity_attributes (nullable) is None
|
|
69
|
+
# and __fields_set__ contains the field
|
|
70
|
+
if self.entity_attributes is None and "entity_attributes" in self.__fields_set__:
|
|
71
|
+
_dict['entityAttributes'] = None
|
|
72
|
+
|
|
73
|
+
# set to None if changed_attribute_name_in (nullable) is None
|
|
74
|
+
# and __fields_set__ contains the field
|
|
75
|
+
if self.changed_attribute_name_in is None and "changed_attribute_name_in" in self.__fields_set__:
|
|
76
|
+
_dict['changedAttributeNameIn'] = None
|
|
77
|
+
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: dict) -> StagingRuleMatchCriteria:
|
|
82
|
+
"""Create an instance of StagingRuleMatchCriteria from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return StagingRuleMatchCriteria.parse_obj(obj)
|
|
88
|
+
|
|
89
|
+
_obj = StagingRuleMatchCriteria.parse_obj({
|
|
90
|
+
"action_in": obj.get("actionIn"),
|
|
91
|
+
"requesting_user": obj.get("requestingUser"),
|
|
92
|
+
"entity_attributes": obj.get("entityAttributes"),
|
|
93
|
+
"changed_attribute_name_in": obj.get("changedAttributeNameIn")
|
|
94
|
+
})
|
|
95
|
+
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 import BaseModel, Field, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.staging_rule import StagingRule
|
|
24
|
+
from lusid.models.version import Version
|
|
25
|
+
|
|
26
|
+
class StagingRuleSet(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
StagingRuleSet
|
|
29
|
+
"""
|
|
30
|
+
entity_type: constr(strict=True, min_length=1) = Field(..., alias="entityType", description="The entity type the staging rule set applies to.")
|
|
31
|
+
staging_rule_set_id: constr(strict=True, min_length=1) = Field(..., alias="stagingRuleSetId", description="System generated unique id for the staging rule set.")
|
|
32
|
+
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The name of the staging rule set.")
|
|
33
|
+
description: Optional[StrictStr] = Field(None, description="A description for the staging rule set.")
|
|
34
|
+
rules: conlist(StagingRule) = Field(..., description="The list of staging rules that apply to a specific entity type.")
|
|
35
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
36
|
+
version: Optional[Version] = None
|
|
37
|
+
__properties = ["entityType", "stagingRuleSetId", "displayName", "description", "rules", "href", "version"]
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
"""Pydantic configuration"""
|
|
41
|
+
allow_population_by_field_name = True
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> StagingRuleSet:
|
|
54
|
+
"""Create an instance of StagingRuleSet from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self):
|
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
59
|
+
_dict = self.dict(by_alias=True,
|
|
60
|
+
exclude={
|
|
61
|
+
},
|
|
62
|
+
exclude_none=True)
|
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rules (list)
|
|
64
|
+
_items = []
|
|
65
|
+
if self.rules:
|
|
66
|
+
for _item in self.rules:
|
|
67
|
+
if _item:
|
|
68
|
+
_items.append(_item.to_dict())
|
|
69
|
+
_dict['rules'] = _items
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
|
71
|
+
if self.version:
|
|
72
|
+
_dict['version'] = self.version.to_dict()
|
|
73
|
+
# set to None if description (nullable) is None
|
|
74
|
+
# and __fields_set__ contains the field
|
|
75
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
76
|
+
_dict['description'] = None
|
|
77
|
+
|
|
78
|
+
# set to None if href (nullable) is None
|
|
79
|
+
# and __fields_set__ contains the field
|
|
80
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
81
|
+
_dict['href'] = None
|
|
82
|
+
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: dict) -> StagingRuleSet:
|
|
87
|
+
"""Create an instance of StagingRuleSet from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return StagingRuleSet.parse_obj(obj)
|
|
93
|
+
|
|
94
|
+
_obj = StagingRuleSet.parse_obj({
|
|
95
|
+
"entity_type": obj.get("entityType"),
|
|
96
|
+
"staging_rule_set_id": obj.get("stagingRuleSetId"),
|
|
97
|
+
"display_name": obj.get("displayName"),
|
|
98
|
+
"description": obj.get("description"),
|
|
99
|
+
"rules": [StagingRule.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None,
|
|
100
|
+
"href": obj.get("href"),
|
|
101
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
@@ -19,16 +19,15 @@ import json
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
from typing import Any, Dict, Optional
|
|
22
|
-
from pydantic import BaseModel, Field, StrictStr
|
|
23
|
-
from lusid.models.property_value import PropertyValue
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, constr
|
|
24
23
|
|
|
25
24
|
class TransactionPropertyMap(BaseModel):
|
|
26
25
|
"""
|
|
27
26
|
TransactionPropertyMap
|
|
28
27
|
"""
|
|
29
28
|
property_key: Optional[StrictStr] = Field(None, alias="propertyKey", description="The key that uniquely identifies the property. It has the format {domain}/{scope}/{code}.")
|
|
30
|
-
|
|
31
|
-
__properties = ["propertyKey", "
|
|
29
|
+
value: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
|
|
30
|
+
__properties = ["propertyKey", "value"]
|
|
32
31
|
|
|
33
32
|
class Config:
|
|
34
33
|
"""Pydantic configuration"""
|
|
@@ -54,14 +53,16 @@ class TransactionPropertyMap(BaseModel):
|
|
|
54
53
|
exclude={
|
|
55
54
|
},
|
|
56
55
|
exclude_none=True)
|
|
57
|
-
# override the default output from pydantic by calling `to_dict()` of property_value
|
|
58
|
-
if self.property_value:
|
|
59
|
-
_dict['propertyValue'] = self.property_value.to_dict()
|
|
60
56
|
# set to None if property_key (nullable) is None
|
|
61
57
|
# and __fields_set__ contains the field
|
|
62
58
|
if self.property_key is None and "property_key" in self.__fields_set__:
|
|
63
59
|
_dict['propertyKey'] = None
|
|
64
60
|
|
|
61
|
+
# set to None if value (nullable) is None
|
|
62
|
+
# and __fields_set__ contains the field
|
|
63
|
+
if self.value is None and "value" in self.__fields_set__:
|
|
64
|
+
_dict['value'] = None
|
|
65
|
+
|
|
65
66
|
return _dict
|
|
66
67
|
|
|
67
68
|
@classmethod
|
|
@@ -75,6 +76,6 @@ class TransactionPropertyMap(BaseModel):
|
|
|
75
76
|
|
|
76
77
|
_obj = TransactionPropertyMap.parse_obj({
|
|
77
78
|
"property_key": obj.get("propertyKey"),
|
|
78
|
-
"
|
|
79
|
+
"value": obj.get("value")
|
|
79
80
|
})
|
|
80
81
|
return _obj
|
|
@@ -0,0 +1,91 @@
|
|
|
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 import BaseModel, Field, conlist, constr
|
|
23
|
+
from lusid.models.staging_rule import StagingRule
|
|
24
|
+
|
|
25
|
+
class UpdateStagingRuleSetRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
UpdateStagingRuleSetRequest
|
|
28
|
+
"""
|
|
29
|
+
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the staging rule set.")
|
|
30
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the staging rule set.")
|
|
31
|
+
rules: conlist(StagingRule) = Field(..., description="The list of staging rules that apply to a specific entity type.")
|
|
32
|
+
__properties = ["displayName", "description", "rules"]
|
|
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) -> UpdateStagingRuleSetRequest:
|
|
49
|
+
"""Create an instance of UpdateStagingRuleSetRequest from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True,
|
|
55
|
+
exclude={
|
|
56
|
+
},
|
|
57
|
+
exclude_none=True)
|
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rules (list)
|
|
59
|
+
_items = []
|
|
60
|
+
if self.rules:
|
|
61
|
+
for _item in self.rules:
|
|
62
|
+
if _item:
|
|
63
|
+
_items.append(_item.to_dict())
|
|
64
|
+
_dict['rules'] = _items
|
|
65
|
+
# set to None if display_name (nullable) is None
|
|
66
|
+
# and __fields_set__ contains the field
|
|
67
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
|
68
|
+
_dict['displayName'] = None
|
|
69
|
+
|
|
70
|
+
# set to None if description (nullable) is None
|
|
71
|
+
# and __fields_set__ contains the field
|
|
72
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
73
|
+
_dict['description'] = None
|
|
74
|
+
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: dict) -> UpdateStagingRuleSetRequest:
|
|
79
|
+
"""Create an instance of UpdateStagingRuleSetRequest from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return UpdateStagingRuleSetRequest.parse_obj(obj)
|
|
85
|
+
|
|
86
|
+
_obj = UpdateStagingRuleSetRequest.parse_obj({
|
|
87
|
+
"display_name": obj.get("displayName"),
|
|
88
|
+
"description": obj.get("description"),
|
|
89
|
+
"rules": [StagingRule.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None
|
|
90
|
+
})
|
|
91
|
+
return _obj
|