lusid-sdk 2.1.4__py3-none-any.whl → 2.1.7__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 +14 -0
- lusid/api/__init__.py +2 -0
- lusid/api/amortisation_rule_sets_api.py +925 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +12 -0
- lusid/models/address_key_list.py +3 -3
- lusid/models/amortisation_rule.py +104 -0
- lusid/models/amortisation_rule_set.py +137 -0
- lusid/models/create_amortisation_rule_set_request.py +102 -0
- lusid/models/decimal_list.py +3 -3
- lusid/models/instrument_list.py +3 -3
- lusid/models/paged_resource_list_of_amortisation_rule_set.py +113 -0
- lusid/models/portfolio_group_id_list.py +3 -3
- lusid/models/portfolio_id_list.py +3 -3
- lusid/models/property_list.py +99 -0
- lusid/models/reference_list.py +6 -5
- lusid/models/reference_list_type.py +1 -0
- lusid/models/string_list.py +3 -3
- lusid/models/update_amortisation_rule_set_details_request.py +93 -0
- {lusid_sdk-2.1.4.dist-info → lusid_sdk-2.1.7.dist-info}/METADATA +14 -3
- {lusid_sdk-2.1.4.dist-info → lusid_sdk-2.1.7.dist-info}/RECORD +22 -15
- {lusid_sdk-2.1.4.dist-info → lusid_sdk-2.1.7.dist-info}/WHEEL +0 -0
lusid/configuration.py
CHANGED
|
@@ -373,7 +373,7 @@ class Configuration:
|
|
|
373
373
|
return "Python SDK Debug Report:\n"\
|
|
374
374
|
"OS: {env}\n"\
|
|
375
375
|
"Python Version: {pyversion}\n"\
|
|
376
|
-
"Version of the API: 0.11.
|
|
376
|
+
"Version of the API: 0.11.6442\n"\
|
|
377
377
|
"SDK Package Version: {package_version}".\
|
|
378
378
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
|
379
379
|
|
lusid/models/__init__.py
CHANGED
|
@@ -65,6 +65,8 @@ from lusid.models.allocation_request import AllocationRequest
|
|
|
65
65
|
from lusid.models.allocation_service_run_response import AllocationServiceRunResponse
|
|
66
66
|
from lusid.models.allocation_set_request import AllocationSetRequest
|
|
67
67
|
from lusid.models.amortisation_event import AmortisationEvent
|
|
68
|
+
from lusid.models.amortisation_rule import AmortisationRule
|
|
69
|
+
from lusid.models.amortisation_rule_set import AmortisationRuleSet
|
|
68
70
|
from lusid.models.annul_quotes_response import AnnulQuotesResponse
|
|
69
71
|
from lusid.models.annul_single_structured_data_response import AnnulSingleStructuredDataResponse
|
|
70
72
|
from lusid.models.annul_structured_data_response import AnnulStructuredDataResponse
|
|
@@ -179,6 +181,7 @@ from lusid.models.counterparty_agreement import CounterpartyAgreement
|
|
|
179
181
|
from lusid.models.counterparty_risk_information import CounterpartyRiskInformation
|
|
180
182
|
from lusid.models.counterparty_signatory import CounterpartySignatory
|
|
181
183
|
from lusid.models.create_address_key_definition_request import CreateAddressKeyDefinitionRequest
|
|
184
|
+
from lusid.models.create_amortisation_rule_set_request import CreateAmortisationRuleSetRequest
|
|
182
185
|
from lusid.models.create_calendar_request import CreateCalendarRequest
|
|
183
186
|
from lusid.models.create_corporate_action_source_request import CreateCorporateActionSourceRequest
|
|
184
187
|
from lusid.models.create_custom_entity_type_request import CreateCustomEntityTypeRequest
|
|
@@ -510,6 +513,7 @@ from lusid.models.paged_resource_list_of_abor_configuration import PagedResource
|
|
|
510
513
|
from lusid.models.paged_resource_list_of_account import PagedResourceListOfAccount
|
|
511
514
|
from lusid.models.paged_resource_list_of_address_key_definition import PagedResourceListOfAddressKeyDefinition
|
|
512
515
|
from lusid.models.paged_resource_list_of_allocation import PagedResourceListOfAllocation
|
|
516
|
+
from lusid.models.paged_resource_list_of_amortisation_rule_set import PagedResourceListOfAmortisationRuleSet
|
|
513
517
|
from lusid.models.paged_resource_list_of_block import PagedResourceListOfBlock
|
|
514
518
|
from lusid.models.paged_resource_list_of_calendar import PagedResourceListOfCalendar
|
|
515
519
|
from lusid.models.paged_resource_list_of_chart_of_accounts import PagedResourceListOfChartOfAccounts
|
|
@@ -613,6 +617,7 @@ from lusid.models.property_interval import PropertyInterval
|
|
|
613
617
|
from lusid.models.property_key_compliance_parameter import PropertyKeyComplianceParameter
|
|
614
618
|
from lusid.models.property_key_list_compliance_parameter import PropertyKeyListComplianceParameter
|
|
615
619
|
from lusid.models.property_life_time import PropertyLifeTime
|
|
620
|
+
from lusid.models.property_list import PropertyList
|
|
616
621
|
from lusid.models.property_schema import PropertySchema
|
|
617
622
|
from lusid.models.property_type import PropertyType
|
|
618
623
|
from lusid.models.property_value import PropertyValue
|
|
@@ -853,6 +858,7 @@ from lusid.models.typed_resource_id import TypedResourceId
|
|
|
853
858
|
from lusid.models.unit_schema import UnitSchema
|
|
854
859
|
from lusid.models.units_ratio import UnitsRatio
|
|
855
860
|
from lusid.models.unmatched_holding_method import UnmatchedHoldingMethod
|
|
861
|
+
from lusid.models.update_amortisation_rule_set_details_request import UpdateAmortisationRuleSetDetailsRequest
|
|
856
862
|
from lusid.models.update_calendar_request import UpdateCalendarRequest
|
|
857
863
|
from lusid.models.update_custom_entity_definition_request import UpdateCustomEntityDefinitionRequest
|
|
858
864
|
from lusid.models.update_custom_entity_type_request import UpdateCustomEntityTypeRequest
|
|
@@ -995,6 +1001,8 @@ __all__ = [
|
|
|
995
1001
|
"AllocationServiceRunResponse",
|
|
996
1002
|
"AllocationSetRequest",
|
|
997
1003
|
"AmortisationEvent",
|
|
1004
|
+
"AmortisationRule",
|
|
1005
|
+
"AmortisationRuleSet",
|
|
998
1006
|
"AnnulQuotesResponse",
|
|
999
1007
|
"AnnulSingleStructuredDataResponse",
|
|
1000
1008
|
"AnnulStructuredDataResponse",
|
|
@@ -1109,6 +1117,7 @@ __all__ = [
|
|
|
1109
1117
|
"CounterpartyRiskInformation",
|
|
1110
1118
|
"CounterpartySignatory",
|
|
1111
1119
|
"CreateAddressKeyDefinitionRequest",
|
|
1120
|
+
"CreateAmortisationRuleSetRequest",
|
|
1112
1121
|
"CreateCalendarRequest",
|
|
1113
1122
|
"CreateCorporateActionSourceRequest",
|
|
1114
1123
|
"CreateCustomEntityTypeRequest",
|
|
@@ -1440,6 +1449,7 @@ __all__ = [
|
|
|
1440
1449
|
"PagedResourceListOfAccount",
|
|
1441
1450
|
"PagedResourceListOfAddressKeyDefinition",
|
|
1442
1451
|
"PagedResourceListOfAllocation",
|
|
1452
|
+
"PagedResourceListOfAmortisationRuleSet",
|
|
1443
1453
|
"PagedResourceListOfBlock",
|
|
1444
1454
|
"PagedResourceListOfCalendar",
|
|
1445
1455
|
"PagedResourceListOfChartOfAccounts",
|
|
@@ -1543,6 +1553,7 @@ __all__ = [
|
|
|
1543
1553
|
"PropertyKeyComplianceParameter",
|
|
1544
1554
|
"PropertyKeyListComplianceParameter",
|
|
1545
1555
|
"PropertyLifeTime",
|
|
1556
|
+
"PropertyList",
|
|
1546
1557
|
"PropertySchema",
|
|
1547
1558
|
"PropertyType",
|
|
1548
1559
|
"PropertyValue",
|
|
@@ -1783,6 +1794,7 @@ __all__ = [
|
|
|
1783
1794
|
"UnitSchema",
|
|
1784
1795
|
"UnitsRatio",
|
|
1785
1796
|
"UnmatchedHoldingMethod",
|
|
1797
|
+
"UpdateAmortisationRuleSetDetailsRequest",
|
|
1786
1798
|
"UpdateCalendarRequest",
|
|
1787
1799
|
"UpdateCustomEntityDefinitionRequest",
|
|
1788
1800
|
"UpdateCustomEntityTypeRequest",
|
lusid/models/address_key_list.py
CHANGED
|
@@ -27,15 +27,15 @@ class AddressKeyList(ReferenceList):
|
|
|
27
27
|
AddressKeyList
|
|
28
28
|
"""
|
|
29
29
|
values: conlist(StrictStr, max_items=100, min_items=0) = Field(...)
|
|
30
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList")
|
|
30
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["referenceListType", "values"]
|
|
33
33
|
|
|
34
34
|
@validator('reference_list_type')
|
|
35
35
|
def reference_list_type_validate_enum(cls, value):
|
|
36
36
|
"""Validates the enum"""
|
|
37
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList'):
|
|
38
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList')")
|
|
37
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
|
38
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|
|
@@ -0,0 +1,104 @@
|
|
|
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, constr, validator
|
|
23
|
+
|
|
24
|
+
class AmortisationRule(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
AmortisationRule
|
|
27
|
+
"""
|
|
28
|
+
name: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The name of the rule.")
|
|
29
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description of the rule.")
|
|
30
|
+
filter: constr(strict=True, max_length=16384, min_length=0) = Field(..., description="The filter for this rule.")
|
|
31
|
+
amortisation_method: constr(strict=True, min_length=1) = Field(..., alias="amortisationMethod", description="The filter for this rule.")
|
|
32
|
+
__properties = ["name", "description", "filter", "amortisationMethod"]
|
|
33
|
+
|
|
34
|
+
@validator('name')
|
|
35
|
+
def name_validate_regular_expression(cls, value):
|
|
36
|
+
"""Validates the regular expression"""
|
|
37
|
+
if not re.match(r"^[^\\<>&\"]+$", value):
|
|
38
|
+
raise ValueError(r"must validate the regular expression /^[^\\<>&\"]+$/")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
@validator('description')
|
|
42
|
+
def description_validate_regular_expression(cls, value):
|
|
43
|
+
"""Validates the regular expression"""
|
|
44
|
+
if value is None:
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
48
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
@validator('filter')
|
|
52
|
+
def filter_validate_regular_expression(cls, value):
|
|
53
|
+
"""Validates the regular expression"""
|
|
54
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
55
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
class Config:
|
|
59
|
+
"""Pydantic configuration"""
|
|
60
|
+
allow_population_by_field_name = True
|
|
61
|
+
validate_assignment = True
|
|
62
|
+
|
|
63
|
+
def to_str(self) -> str:
|
|
64
|
+
"""Returns the string representation of the model using alias"""
|
|
65
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
66
|
+
|
|
67
|
+
def to_json(self) -> str:
|
|
68
|
+
"""Returns the JSON representation of the model using alias"""
|
|
69
|
+
return json.dumps(self.to_dict())
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_json(cls, json_str: str) -> AmortisationRule:
|
|
73
|
+
"""Create an instance of AmortisationRule from a JSON string"""
|
|
74
|
+
return cls.from_dict(json.loads(json_str))
|
|
75
|
+
|
|
76
|
+
def to_dict(self):
|
|
77
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
78
|
+
_dict = self.dict(by_alias=True,
|
|
79
|
+
exclude={
|
|
80
|
+
},
|
|
81
|
+
exclude_none=True)
|
|
82
|
+
# set to None if description (nullable) is None
|
|
83
|
+
# and __fields_set__ contains the field
|
|
84
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
85
|
+
_dict['description'] = None
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: dict) -> AmortisationRule:
|
|
91
|
+
"""Create an instance of AmortisationRule from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return AmortisationRule.parse_obj(obj)
|
|
97
|
+
|
|
98
|
+
_obj = AmortisationRule.parse_obj({
|
|
99
|
+
"name": obj.get("name"),
|
|
100
|
+
"description": obj.get("description"),
|
|
101
|
+
"filter": obj.get("filter"),
|
|
102
|
+
"amortisation_method": obj.get("amortisationMethod")
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
@@ -0,0 +1,137 @@
|
|
|
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, constr, validator
|
|
23
|
+
from lusid.models.amortisation_rule import AmortisationRule
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
from lusid.models.resource_id import ResourceId
|
|
26
|
+
from lusid.models.version import Version
|
|
27
|
+
|
|
28
|
+
class AmortisationRuleSet(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
AmortisationRuleSet
|
|
31
|
+
"""
|
|
32
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
33
|
+
id: ResourceId = Field(...)
|
|
34
|
+
display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="A user-friendly name.")
|
|
35
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description of what this rule set is for.")
|
|
36
|
+
rules: conlist(AmortisationRule, max_items=100) = Field(..., description="The rules of this rule set.")
|
|
37
|
+
version: Optional[Version] = None
|
|
38
|
+
links: Optional[conlist(Link)] = None
|
|
39
|
+
__properties = ["href", "id", "displayName", "description", "rules", "version", "links"]
|
|
40
|
+
|
|
41
|
+
@validator('display_name')
|
|
42
|
+
def display_name_validate_regular_expression(cls, value):
|
|
43
|
+
"""Validates the regular expression"""
|
|
44
|
+
if not re.match(r"^[^\\<>&\"]+$", value):
|
|
45
|
+
raise ValueError(r"must validate the regular expression /^[^\\<>&\"]+$/")
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
@validator('description')
|
|
49
|
+
def description_validate_regular_expression(cls, value):
|
|
50
|
+
"""Validates the regular expression"""
|
|
51
|
+
if value is None:
|
|
52
|
+
return value
|
|
53
|
+
|
|
54
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
55
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
class Config:
|
|
59
|
+
"""Pydantic configuration"""
|
|
60
|
+
allow_population_by_field_name = True
|
|
61
|
+
validate_assignment = True
|
|
62
|
+
|
|
63
|
+
def to_str(self) -> str:
|
|
64
|
+
"""Returns the string representation of the model using alias"""
|
|
65
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
66
|
+
|
|
67
|
+
def to_json(self) -> str:
|
|
68
|
+
"""Returns the JSON representation of the model using alias"""
|
|
69
|
+
return json.dumps(self.to_dict())
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_json(cls, json_str: str) -> AmortisationRuleSet:
|
|
73
|
+
"""Create an instance of AmortisationRuleSet from a JSON string"""
|
|
74
|
+
return cls.from_dict(json.loads(json_str))
|
|
75
|
+
|
|
76
|
+
def to_dict(self):
|
|
77
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
78
|
+
_dict = self.dict(by_alias=True,
|
|
79
|
+
exclude={
|
|
80
|
+
},
|
|
81
|
+
exclude_none=True)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
|
83
|
+
if self.id:
|
|
84
|
+
_dict['id'] = self.id.to_dict()
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rules (list)
|
|
86
|
+
_items = []
|
|
87
|
+
if self.rules:
|
|
88
|
+
for _item in self.rules:
|
|
89
|
+
if _item:
|
|
90
|
+
_items.append(_item.to_dict())
|
|
91
|
+
_dict['rules'] = _items
|
|
92
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
|
93
|
+
if self.version:
|
|
94
|
+
_dict['version'] = self.version.to_dict()
|
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
96
|
+
_items = []
|
|
97
|
+
if self.links:
|
|
98
|
+
for _item in self.links:
|
|
99
|
+
if _item:
|
|
100
|
+
_items.append(_item.to_dict())
|
|
101
|
+
_dict['links'] = _items
|
|
102
|
+
# set to None if href (nullable) is None
|
|
103
|
+
# and __fields_set__ contains the field
|
|
104
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
105
|
+
_dict['href'] = None
|
|
106
|
+
|
|
107
|
+
# set to None if description (nullable) is None
|
|
108
|
+
# and __fields_set__ contains the field
|
|
109
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
110
|
+
_dict['description'] = None
|
|
111
|
+
|
|
112
|
+
# set to None if links (nullable) is None
|
|
113
|
+
# and __fields_set__ contains the field
|
|
114
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
115
|
+
_dict['links'] = None
|
|
116
|
+
|
|
117
|
+
return _dict
|
|
118
|
+
|
|
119
|
+
@classmethod
|
|
120
|
+
def from_dict(cls, obj: dict) -> AmortisationRuleSet:
|
|
121
|
+
"""Create an instance of AmortisationRuleSet from a dict"""
|
|
122
|
+
if obj is None:
|
|
123
|
+
return None
|
|
124
|
+
|
|
125
|
+
if not isinstance(obj, dict):
|
|
126
|
+
return AmortisationRuleSet.parse_obj(obj)
|
|
127
|
+
|
|
128
|
+
_obj = AmortisationRuleSet.parse_obj({
|
|
129
|
+
"href": obj.get("href"),
|
|
130
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
|
131
|
+
"display_name": obj.get("displayName"),
|
|
132
|
+
"description": obj.get("description"),
|
|
133
|
+
"rules": [AmortisationRule.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None,
|
|
134
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
|
|
135
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
136
|
+
})
|
|
137
|
+
return _obj
|
|
@@ -0,0 +1,102 @@
|
|
|
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, constr, validator
|
|
23
|
+
|
|
24
|
+
class CreateAmortisationRuleSetRequest(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
CreateAmortisationRuleSetRequest
|
|
27
|
+
"""
|
|
28
|
+
code: constr(strict=True, max_length=64, min_length=1) = Field(...)
|
|
29
|
+
display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName")
|
|
30
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
|
|
31
|
+
__properties = ["code", "displayName", "description"]
|
|
32
|
+
|
|
33
|
+
@validator('code')
|
|
34
|
+
def code_validate_regular_expression(cls, value):
|
|
35
|
+
"""Validates the regular expression"""
|
|
36
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
37
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
@validator('display_name')
|
|
41
|
+
def display_name_validate_regular_expression(cls, value):
|
|
42
|
+
"""Validates the regular expression"""
|
|
43
|
+
if not re.match(r"^[^\\<>&\"]+$", value):
|
|
44
|
+
raise ValueError(r"must validate the regular expression /^[^\\<>&\"]+$/")
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
@validator('description')
|
|
48
|
+
def description_validate_regular_expression(cls, value):
|
|
49
|
+
"""Validates the regular expression"""
|
|
50
|
+
if value is None:
|
|
51
|
+
return value
|
|
52
|
+
|
|
53
|
+
if not re.match(r"^[\s\S]*$", value):
|
|
54
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
|
55
|
+
return value
|
|
56
|
+
|
|
57
|
+
class Config:
|
|
58
|
+
"""Pydantic configuration"""
|
|
59
|
+
allow_population_by_field_name = True
|
|
60
|
+
validate_assignment = True
|
|
61
|
+
|
|
62
|
+
def to_str(self) -> str:
|
|
63
|
+
"""Returns the string representation of the model using alias"""
|
|
64
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
65
|
+
|
|
66
|
+
def to_json(self) -> str:
|
|
67
|
+
"""Returns the JSON representation of the model using alias"""
|
|
68
|
+
return json.dumps(self.to_dict())
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_json(cls, json_str: str) -> CreateAmortisationRuleSetRequest:
|
|
72
|
+
"""Create an instance of CreateAmortisationRuleSetRequest from a JSON string"""
|
|
73
|
+
return cls.from_dict(json.loads(json_str))
|
|
74
|
+
|
|
75
|
+
def to_dict(self):
|
|
76
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
77
|
+
_dict = self.dict(by_alias=True,
|
|
78
|
+
exclude={
|
|
79
|
+
},
|
|
80
|
+
exclude_none=True)
|
|
81
|
+
# set to None if description (nullable) is None
|
|
82
|
+
# and __fields_set__ contains the field
|
|
83
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
84
|
+
_dict['description'] = None
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: dict) -> CreateAmortisationRuleSetRequest:
|
|
90
|
+
"""Create an instance of CreateAmortisationRuleSetRequest from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return CreateAmortisationRuleSetRequest.parse_obj(obj)
|
|
96
|
+
|
|
97
|
+
_obj = CreateAmortisationRuleSetRequest.parse_obj({
|
|
98
|
+
"code": obj.get("code"),
|
|
99
|
+
"display_name": obj.get("displayName"),
|
|
100
|
+
"description": obj.get("description")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
lusid/models/decimal_list.py
CHANGED
|
@@ -27,15 +27,15 @@ class DecimalList(ReferenceList):
|
|
|
27
27
|
DecimalList
|
|
28
28
|
"""
|
|
29
29
|
values: conlist(Union[StrictFloat, StrictInt], max_items=100, min_items=0) = Field(...)
|
|
30
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList")
|
|
30
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["referenceListType", "values"]
|
|
33
33
|
|
|
34
34
|
@validator('reference_list_type')
|
|
35
35
|
def reference_list_type_validate_enum(cls, value):
|
|
36
36
|
"""Validates the enum"""
|
|
37
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList'):
|
|
38
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList')")
|
|
37
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
|
38
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|
lusid/models/instrument_list.py
CHANGED
|
@@ -27,15 +27,15 @@ class InstrumentList(ReferenceList):
|
|
|
27
27
|
InstrumentList
|
|
28
28
|
"""
|
|
29
29
|
values: conlist(StrictStr, max_items=100, min_items=0) = Field(...)
|
|
30
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList")
|
|
30
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["referenceListType", "values"]
|
|
33
33
|
|
|
34
34
|
@validator('reference_list_type')
|
|
35
35
|
def reference_list_type_validate_enum(cls, value):
|
|
36
36
|
"""Validates the enum"""
|
|
37
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList'):
|
|
38
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList')")
|
|
37
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
|
38
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|
|
@@ -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.amortisation_rule_set import AmortisationRuleSet
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
|
|
26
|
+
class PagedResourceListOfAmortisationRuleSet(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PagedResourceListOfAmortisationRuleSet
|
|
29
|
+
"""
|
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
|
32
|
+
values: conlist(AmortisationRuleSet) = 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) -> PagedResourceListOfAmortisationRuleSet:
|
|
52
|
+
"""Create an instance of PagedResourceListOfAmortisationRuleSet 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) -> PagedResourceListOfAmortisationRuleSet:
|
|
99
|
+
"""Create an instance of PagedResourceListOfAmortisationRuleSet from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return PagedResourceListOfAmortisationRuleSet.parse_obj(obj)
|
|
105
|
+
|
|
106
|
+
_obj = PagedResourceListOfAmortisationRuleSet.parse_obj({
|
|
107
|
+
"next_page": obj.get("nextPage"),
|
|
108
|
+
"previous_page": obj.get("previousPage"),
|
|
109
|
+
"values": [AmortisationRuleSet.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
|
|
@@ -28,15 +28,15 @@ class PortfolioGroupIdList(ReferenceList):
|
|
|
28
28
|
PortfolioGroupIdList
|
|
29
29
|
"""
|
|
30
30
|
values: conlist(ResourceId, max_items=100) = Field(...)
|
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList")
|
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
|
33
33
|
__properties = ["referenceListType", "values"]
|
|
34
34
|
|
|
35
35
|
@validator('reference_list_type')
|
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
|
37
37
|
"""Validates the enum"""
|
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList'):
|
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList')")
|
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
42
|
class Config:
|
|
@@ -28,15 +28,15 @@ class PortfolioIdList(ReferenceList):
|
|
|
28
28
|
PortfolioIdList
|
|
29
29
|
"""
|
|
30
30
|
values: conlist(ResourceId, max_items=100) = Field(...)
|
|
31
|
-
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList")
|
|
31
|
+
reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
|
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
|
33
33
|
__properties = ["referenceListType", "values"]
|
|
34
34
|
|
|
35
35
|
@validator('reference_list_type')
|
|
36
36
|
def reference_list_type_validate_enum(cls, value):
|
|
37
37
|
"""Validates the enum"""
|
|
38
|
-
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList'):
|
|
39
|
-
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList')")
|
|
38
|
+
if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
|
|
39
|
+
raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
42
|
class Config:
|