lusid-sdk 2.1.131__py3-none-any.whl → 2.1.142__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 +21 -0
- lusid/api/aggregation_api.py +2 -2
- lusid/api/allocations_api.py +2 -2
- lusid/api/calendars_api.py +6 -6
- lusid/api/complex_market_data_api.py +2 -2
- lusid/api/custom_entities_api.py +6 -6
- lusid/api/entities_api.py +2 -2
- lusid/api/executions_api.py +4 -4
- lusid/api/funds_api.py +1148 -198
- lusid/api/instrument_events_api.py +2 -2
- lusid/api/instruments_api.py +4 -4
- lusid/api/legal_entities_api.py +20 -20
- lusid/api/orders_api.py +4 -4
- lusid/api/portfolio_groups_api.py +4 -4
- lusid/api/portfolios_api.py +16 -16
- lusid/api/property_definitions_api.py +2 -2
- lusid/api/quotes_api.py +2 -2
- lusid/api/relationships_api.py +2 -2
- lusid/api/structured_result_data_api.py +6 -6
- lusid/api/transaction_portfolios_api.py +6 -6
- lusid/configuration.py +1 -1
- lusid/extensions/__init__.py +2 -0
- lusid/extensions/configuration_loaders.py +68 -5
- lusid/extensions/file_access_token.py +42 -0
- lusid/models/__init__.py +18 -0
- lusid/models/access_metadata_operation.py +3 -3
- lusid/models/applicable_instrument_event.py +3 -1
- lusid/models/branch_step_request.py +91 -0
- lusid/models/check_step_request.py +91 -0
- lusid/models/compliance_step_request.py +41 -19
- lusid/models/compliance_step_type_request.py +0 -1
- lusid/models/deleted_entity_response.py +15 -1
- lusid/models/fee.py +217 -0
- lusid/models/fee_request.py +163 -0
- lusid/models/filter_step_request.py +91 -0
- lusid/models/group_by_step_request.py +91 -0
- lusid/models/group_filter_step_request.py +91 -0
- lusid/models/instrument_event_configuration.py +1 -1
- lusid/models/intermediate_compliance_step_request.py +91 -0
- lusid/models/operation_type.py +1 -0
- lusid/models/paged_resource_list_of_fee.py +113 -0
- lusid/models/staged_modifications_requested_change_interval.py +11 -14
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.142.dist-info}/METADATA +63 -49
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.142.dist-info}/RECORD +45 -35
- {lusid_sdk-2.1.131.dist-info → lusid_sdk-2.1.142.dist-info}/WHEEL +0 -0
|
@@ -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
|
|
22
|
+
from pydantic.v1 import Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class FilterStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
FilterStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
allow_population_by_field_name = True
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> FilterStepRequest:
|
|
56
|
+
"""Create an instance of FilterStepRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self):
|
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
61
|
+
_dict = self.dict(by_alias=True,
|
|
62
|
+
exclude={
|
|
63
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> FilterStepRequest:
|
|
75
|
+
"""Create an instance of FilterStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return FilterStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = FilterStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
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
|
|
22
|
+
from pydantic.v1 import Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class GroupByStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
GroupByStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
allow_population_by_field_name = True
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> GroupByStepRequest:
|
|
56
|
+
"""Create an instance of GroupByStepRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self):
|
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
61
|
+
_dict = self.dict(by_alias=True,
|
|
62
|
+
exclude={
|
|
63
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> GroupByStepRequest:
|
|
75
|
+
"""Create an instance of GroupByStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return GroupByStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = GroupByStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
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
|
|
22
|
+
from pydantic.v1 import Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class GroupFilterStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
GroupFilterStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
allow_population_by_field_name = True
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> GroupFilterStepRequest:
|
|
56
|
+
"""Create an instance of GroupFilterStepRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self):
|
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
61
|
+
_dict = self.dict(by_alias=True,
|
|
62
|
+
exclude={
|
|
63
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> GroupFilterStepRequest:
|
|
75
|
+
"""Create an instance of GroupFilterStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return GroupFilterStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = GroupFilterStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
return _obj
|
|
@@ -26,7 +26,7 @@ class InstrumentEventConfiguration(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
InstrumentEventConfiguration
|
|
28
28
|
"""
|
|
29
|
-
transaction_template_scopes: Optional[conlist(StrictStr)] = Field(None, alias="transactionTemplateScopes")
|
|
29
|
+
transaction_template_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="transactionTemplateScopes")
|
|
30
30
|
recipe_id: Optional[ResourceId] = Field(None, alias="recipeId")
|
|
31
31
|
__properties = ["transactionTemplateScopes", "recipeId"]
|
|
32
32
|
|
|
@@ -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
|
|
22
|
+
from pydantic.v1 import Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class IntermediateComplianceStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
IntermediateComplianceStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('compliance_step_type_request')
|
|
35
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
allow_population_by_field_name = True
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> IntermediateComplianceStepRequest:
|
|
56
|
+
"""Create an instance of IntermediateComplianceStepRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self):
|
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
61
|
+
_dict = self.dict(by_alias=True,
|
|
62
|
+
exclude={
|
|
63
|
+
"additional_properties"
|
|
64
|
+
},
|
|
65
|
+
exclude_none=True)
|
|
66
|
+
# puts key-value pairs in additional_properties in the top level
|
|
67
|
+
if self.additional_properties is not None:
|
|
68
|
+
for _key, _value in self.additional_properties.items():
|
|
69
|
+
_dict[_key] = _value
|
|
70
|
+
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> IntermediateComplianceStepRequest:
|
|
75
|
+
"""Create an instance of IntermediateComplianceStepRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return IntermediateComplianceStepRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
_obj = IntermediateComplianceStepRequest.parse_obj({
|
|
83
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
84
|
+
"label": obj.get("label")
|
|
85
|
+
})
|
|
86
|
+
# store additional fields in additional_properties
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
90
|
+
|
|
91
|
+
return _obj
|
lusid/models/operation_type.py
CHANGED
|
@@ -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.fee import Fee
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
|
|
26
|
+
class PagedResourceListOfFee(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PagedResourceListOfFee
|
|
29
|
+
"""
|
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
|
32
|
+
values: conlist(Fee) = 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) -> PagedResourceListOfFee:
|
|
52
|
+
"""Create an instance of PagedResourceListOfFee 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) -> PagedResourceListOfFee:
|
|
99
|
+
"""Create an instance of PagedResourceListOfFee from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return PagedResourceListOfFee.parse_obj(obj)
|
|
105
|
+
|
|
106
|
+
_obj = PagedResourceListOfFee.parse_obj({
|
|
107
|
+
"next_page": obj.get("nextPage"),
|
|
108
|
+
"previous_page": obj.get("previousPage"),
|
|
109
|
+
"values": [Fee.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
|
|
@@ -21,6 +21,7 @@ import json
|
|
|
21
21
|
from typing import Any, Dict, List, Optional
|
|
22
22
|
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
|
23
23
|
from lusid.models.link import Link
|
|
24
|
+
from lusid.models.property_value import PropertyValue
|
|
24
25
|
from lusid.models.staged_modification_effective_range import StagedModificationEffectiveRange
|
|
25
26
|
|
|
26
27
|
class StagedModificationsRequestedChangeInterval(BaseModel):
|
|
@@ -29,8 +30,8 @@ class StagedModificationsRequestedChangeInterval(BaseModel):
|
|
|
29
30
|
"""
|
|
30
31
|
attribute_name: Optional[StrictStr] = Field(None, alias="attributeName", description="Name of the property the change applies to.")
|
|
31
32
|
effective_range: Optional[StagedModificationEffectiveRange] = Field(None, alias="effectiveRange")
|
|
32
|
-
previous_value: Optional[
|
|
33
|
-
new_value: Optional[
|
|
33
|
+
previous_value: Optional[PropertyValue] = Field(None, alias="previousValue")
|
|
34
|
+
new_value: Optional[PropertyValue] = Field(None, alias="newValue")
|
|
34
35
|
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
36
|
links: Optional[conlist(Link)] = None
|
|
36
37
|
__properties = ["attributeName", "effectiveRange", "previousValue", "newValue", "asAtBasis", "links"]
|
|
@@ -62,6 +63,12 @@ class StagedModificationsRequestedChangeInterval(BaseModel):
|
|
|
62
63
|
# override the default output from pydantic by calling `to_dict()` of effective_range
|
|
63
64
|
if self.effective_range:
|
|
64
65
|
_dict['effectiveRange'] = self.effective_range.to_dict()
|
|
66
|
+
# override the default output from pydantic by calling `to_dict()` of previous_value
|
|
67
|
+
if self.previous_value:
|
|
68
|
+
_dict['previousValue'] = self.previous_value.to_dict()
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of new_value
|
|
70
|
+
if self.new_value:
|
|
71
|
+
_dict['newValue'] = self.new_value.to_dict()
|
|
65
72
|
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
66
73
|
_items = []
|
|
67
74
|
if self.links:
|
|
@@ -74,16 +81,6 @@ class StagedModificationsRequestedChangeInterval(BaseModel):
|
|
|
74
81
|
if self.attribute_name is None and "attribute_name" in self.__fields_set__:
|
|
75
82
|
_dict['attributeName'] = None
|
|
76
83
|
|
|
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
84
|
# set to None if as_at_basis (nullable) is None
|
|
88
85
|
# and __fields_set__ contains the field
|
|
89
86
|
if self.as_at_basis is None and "as_at_basis" in self.__fields_set__:
|
|
@@ -108,8 +105,8 @@ class StagedModificationsRequestedChangeInterval(BaseModel):
|
|
|
108
105
|
_obj = StagedModificationsRequestedChangeInterval.parse_obj({
|
|
109
106
|
"attribute_name": obj.get("attributeName"),
|
|
110
107
|
"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"),
|
|
108
|
+
"previous_value": PropertyValue.from_dict(obj.get("previousValue")) if obj.get("previousValue") is not None else None,
|
|
109
|
+
"new_value": PropertyValue.from_dict(obj.get("newValue")) if obj.get("newValue") is not None else None,
|
|
113
110
|
"as_at_basis": obj.get("asAtBasis"),
|
|
114
111
|
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
115
112
|
})
|