lusid-sdk 2.1.886__py3-none-any.whl → 2.1.888__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.
- lusid/__init__.py +16 -0
- lusid/api/__init__.py +2 -0
- lusid/api/check_definitions_api.py +945 -0
- lusid/api/custom_data_models_api.py +2 -2
- lusid/api/funds_api.py +2 -2
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +14 -0
- lusid/models/check_definition.py +164 -0
- lusid/models/check_definition_dataset_schema.py +89 -0
- lusid/models/check_definition_rule.py +105 -0
- lusid/models/check_definition_rule_set.py +118 -0
- lusid/models/create_check_definition_request.py +121 -0
- lusid/models/data_model_summary.py +7 -2
- lusid/models/nav_type_definition.py +1 -8
- lusid/models/paged_resource_list_of_check_definition.py +121 -0
- lusid/models/relational_dataset_field_definition.py +2 -7
- lusid/models/update_check_definition_request.py +115 -0
- lusid/models/valuation_schedule.py +15 -3
- {lusid_sdk-2.1.886.dist-info → lusid_sdk-2.1.888.dist-info}/METADATA +14 -2
- {lusid_sdk-2.1.886.dist-info → lusid_sdk-2.1.888.dist-info}/RECORD +21 -13
- {lusid_sdk-2.1.886.dist-info → lusid_sdk-2.1.888.dist-info}/WHEEL +0 -0
@@ -0,0 +1,121 @@
|
|
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 StrictStr, Field, BaseModel, Field, conlist, constr, validator
|
23
|
+
from lusid.models.check_definition_dataset_schema import CheckDefinitionDatasetSchema
|
24
|
+
from lusid.models.check_definition_rule_set import CheckDefinitionRuleSet
|
25
|
+
from lusid.models.model_property import ModelProperty
|
26
|
+
from lusid.models.resource_id import ResourceId
|
27
|
+
|
28
|
+
class CreateCheckDefinitionRequest(BaseModel):
|
29
|
+
"""
|
30
|
+
CreateCheckDefinitionRequest
|
31
|
+
"""
|
32
|
+
id: ResourceId = Field(...)
|
33
|
+
display_name: StrictStr = Field(...,alias="displayName", description="The name of the Check Definition.")
|
34
|
+
description: StrictStr = Field(...,alias="description", description="A description for the Check Definition.")
|
35
|
+
dataset_schema: Optional[CheckDefinitionDatasetSchema] = Field(None, alias="datasetSchema")
|
36
|
+
rule_sets: conlist(CheckDefinitionRuleSet) = Field(..., alias="ruleSets", description="A collection of rule sets for the Check Definition.")
|
37
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Check Definition.")
|
38
|
+
__properties = ["id", "displayName", "description", "datasetSchema", "ruleSets", "properties"]
|
39
|
+
|
40
|
+
class Config:
|
41
|
+
"""Pydantic configuration"""
|
42
|
+
allow_population_by_field_name = True
|
43
|
+
validate_assignment = True
|
44
|
+
|
45
|
+
def __str__(self):
|
46
|
+
"""For `print` and `pprint`"""
|
47
|
+
return pprint.pformat(self.dict(by_alias=False))
|
48
|
+
|
49
|
+
def __repr__(self):
|
50
|
+
"""For `print` and `pprint`"""
|
51
|
+
return self.to_str()
|
52
|
+
|
53
|
+
def to_str(self) -> str:
|
54
|
+
"""Returns the string representation of the model using alias"""
|
55
|
+
return pprint.pformat(self.dict(by_alias=True))
|
56
|
+
|
57
|
+
def to_json(self) -> str:
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
59
|
+
return json.dumps(self.to_dict())
|
60
|
+
|
61
|
+
@classmethod
|
62
|
+
def from_json(cls, json_str: str) -> CreateCheckDefinitionRequest:
|
63
|
+
"""Create an instance of CreateCheckDefinitionRequest from a JSON string"""
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
65
|
+
|
66
|
+
def to_dict(self):
|
67
|
+
"""Returns the dictionary representation of the model using alias"""
|
68
|
+
_dict = self.dict(by_alias=True,
|
69
|
+
exclude={
|
70
|
+
},
|
71
|
+
exclude_none=True)
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
73
|
+
if self.id:
|
74
|
+
_dict['id'] = self.id.to_dict()
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of dataset_schema
|
76
|
+
if self.dataset_schema:
|
77
|
+
_dict['datasetSchema'] = self.dataset_schema.to_dict()
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rule_sets (list)
|
79
|
+
_items = []
|
80
|
+
if self.rule_sets:
|
81
|
+
for _item in self.rule_sets:
|
82
|
+
if _item:
|
83
|
+
_items.append(_item.to_dict())
|
84
|
+
_dict['ruleSets'] = _items
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
86
|
+
_field_dict = {}
|
87
|
+
if self.properties:
|
88
|
+
for _key in self.properties:
|
89
|
+
if self.properties[_key]:
|
90
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
91
|
+
_dict['properties'] = _field_dict
|
92
|
+
# set to None if properties (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
95
|
+
_dict['properties'] = None
|
96
|
+
|
97
|
+
return _dict
|
98
|
+
|
99
|
+
@classmethod
|
100
|
+
def from_dict(cls, obj: dict) -> CreateCheckDefinitionRequest:
|
101
|
+
"""Create an instance of CreateCheckDefinitionRequest from a dict"""
|
102
|
+
if obj is None:
|
103
|
+
return None
|
104
|
+
|
105
|
+
if not isinstance(obj, dict):
|
106
|
+
return CreateCheckDefinitionRequest.parse_obj(obj)
|
107
|
+
|
108
|
+
_obj = CreateCheckDefinitionRequest.parse_obj({
|
109
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
110
|
+
"display_name": obj.get("displayName"),
|
111
|
+
"description": obj.get("description"),
|
112
|
+
"dataset_schema": CheckDefinitionDatasetSchema.from_dict(obj.get("datasetSchema")) if obj.get("datasetSchema") is not None else None,
|
113
|
+
"rule_sets": [CheckDefinitionRuleSet.from_dict(_item) for _item in obj.get("ruleSets")] if obj.get("ruleSets") is not None else None,
|
114
|
+
"properties": dict(
|
115
|
+
(_k, ModelProperty.from_dict(_v))
|
116
|
+
for _k, _v in obj.get("properties").items()
|
117
|
+
)
|
118
|
+
if obj.get("properties") is not None
|
119
|
+
else None
|
120
|
+
})
|
121
|
+
return _obj
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict, List
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictInt, conlist, constr
|
23
23
|
from lusid.models.resource_id import ResourceId
|
24
24
|
|
@@ -32,8 +32,9 @@ class DataModelSummary(BaseModel):
|
|
32
32
|
entity_type: StrictStr = Field(...,alias="entityType", description="The entity type that the Custom Data Model binds to.")
|
33
33
|
type: StrictStr = Field(...,alias="type", description="Either Root or Leaf or Intermediate.")
|
34
34
|
precedence: StrictInt = Field(..., description="Where in the hierarchy this model sits.")
|
35
|
+
parent: Optional[ResourceId] = None
|
35
36
|
children: conlist(DataModelSummary) = Field(..., description="Child Custom Data Models that will inherit from this data model.")
|
36
|
-
__properties = ["id", "displayName", "description", "entityType", "type", "precedence", "children"]
|
37
|
+
__properties = ["id", "displayName", "description", "entityType", "type", "precedence", "parent", "children"]
|
37
38
|
|
38
39
|
class Config:
|
39
40
|
"""Pydantic configuration"""
|
@@ -70,6 +71,9 @@ class DataModelSummary(BaseModel):
|
|
70
71
|
# override the default output from pydantic by calling `to_dict()` of id
|
71
72
|
if self.id:
|
72
73
|
_dict['id'] = self.id.to_dict()
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of parent
|
75
|
+
if self.parent:
|
76
|
+
_dict['parent'] = self.parent.to_dict()
|
73
77
|
# override the default output from pydantic by calling `to_dict()` of each item in children (list)
|
74
78
|
_items = []
|
75
79
|
if self.children:
|
@@ -95,6 +99,7 @@ class DataModelSummary(BaseModel):
|
|
95
99
|
"entity_type": obj.get("entityType"),
|
96
100
|
"type": obj.get("type"),
|
97
101
|
"precedence": obj.get("precedence"),
|
102
|
+
"parent": ResourceId.from_dict(obj.get("parent")) if obj.get("parent") is not None else None,
|
98
103
|
"children": [DataModelSummary.from_dict(_item) for _item in obj.get("children")] if obj.get("children") is not None else None
|
99
104
|
})
|
100
105
|
return _obj
|
@@ -36,11 +36,10 @@ class NavTypeDefinition(BaseModel):
|
|
36
36
|
holding_recipe_id: ResourceId = Field(..., alias="holdingRecipeId")
|
37
37
|
accounting_method: StrictStr = Field(...,alias="accountingMethod")
|
38
38
|
sub_holding_keys: Optional[conlist(StrictStr)] = Field(None, alias="subHoldingKeys", description="Set of unique holding identifiers, e.g. trader, desk, strategy.")
|
39
|
-
instrument_scopes: Optional[conlist(StrictStr)] = Field(None, alias="instrumentScopes", description="The resolution strategy used to resolve instruments of transactions/holdings upserted to the portfolios.")
|
40
39
|
amortisation_method: StrictStr = Field(...,alias="amortisationMethod")
|
41
40
|
transaction_type_scope: Optional[StrictStr] = Field(None,alias="transactionTypeScope")
|
42
41
|
cash_gain_loss_calculation_date: StrictStr = Field(...,alias="cashGainLossCalculationDate")
|
43
|
-
__properties = ["code", "displayName", "description", "chartOfAccountsId", "postingModuleCodes", "cleardownModuleCodes", "valuationRecipeId", "holdingRecipeId", "accountingMethod", "subHoldingKeys", "
|
42
|
+
__properties = ["code", "displayName", "description", "chartOfAccountsId", "postingModuleCodes", "cleardownModuleCodes", "valuationRecipeId", "holdingRecipeId", "accountingMethod", "subHoldingKeys", "amortisationMethod", "transactionTypeScope", "cashGainLossCalculationDate"]
|
44
43
|
|
45
44
|
class Config:
|
46
45
|
"""Pydantic configuration"""
|
@@ -113,11 +112,6 @@ class NavTypeDefinition(BaseModel):
|
|
113
112
|
if self.sub_holding_keys is None and "sub_holding_keys" in self.__fields_set__:
|
114
113
|
_dict['subHoldingKeys'] = None
|
115
114
|
|
116
|
-
# set to None if instrument_scopes (nullable) is None
|
117
|
-
# and __fields_set__ contains the field
|
118
|
-
if self.instrument_scopes is None and "instrument_scopes" in self.__fields_set__:
|
119
|
-
_dict['instrumentScopes'] = None
|
120
|
-
|
121
115
|
# set to None if transaction_type_scope (nullable) is None
|
122
116
|
# and __fields_set__ contains the field
|
123
117
|
if self.transaction_type_scope is None and "transaction_type_scope" in self.__fields_set__:
|
@@ -145,7 +139,6 @@ class NavTypeDefinition(BaseModel):
|
|
145
139
|
"holding_recipe_id": ResourceId.from_dict(obj.get("holdingRecipeId")) if obj.get("holdingRecipeId") is not None else None,
|
146
140
|
"accounting_method": obj.get("accountingMethod"),
|
147
141
|
"sub_holding_keys": obj.get("subHoldingKeys"),
|
148
|
-
"instrument_scopes": obj.get("instrumentScopes"),
|
149
142
|
"amortisation_method": obj.get("amortisationMethod"),
|
150
143
|
"transaction_type_scope": obj.get("transactionTypeScope"),
|
151
144
|
"cash_gain_loss_calculation_date": obj.get("cashGainLossCalculationDate")
|
@@ -0,0 +1,121 @@
|
|
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 StrictStr, Field, BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.check_definition import CheckDefinition
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfCheckDefinition(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfCheckDefinition
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None,alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None,alias="previousPage")
|
32
|
+
values: conlist(CheckDefinition) = Field(...)
|
33
|
+
href: Optional[StrictStr] = Field(None,alias="href")
|
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 __str__(self):
|
43
|
+
"""For `print` and `pprint`"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=False))
|
45
|
+
|
46
|
+
def __repr__(self):
|
47
|
+
"""For `print` and `pprint`"""
|
48
|
+
return self.to_str()
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfCheckDefinition:
|
60
|
+
"""Create an instance of PagedResourceListOfCheckDefinition from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self):
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
65
|
+
_dict = self.dict(by_alias=True,
|
66
|
+
exclude={
|
67
|
+
},
|
68
|
+
exclude_none=True)
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
70
|
+
_items = []
|
71
|
+
if self.values:
|
72
|
+
for _item in self.values:
|
73
|
+
if _item:
|
74
|
+
_items.append(_item.to_dict())
|
75
|
+
_dict['values'] = _items
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
77
|
+
_items = []
|
78
|
+
if self.links:
|
79
|
+
for _item in self.links:
|
80
|
+
if _item:
|
81
|
+
_items.append(_item.to_dict())
|
82
|
+
_dict['links'] = _items
|
83
|
+
# set to None if next_page (nullable) is None
|
84
|
+
# and __fields_set__ contains the field
|
85
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
86
|
+
_dict['nextPage'] = None
|
87
|
+
|
88
|
+
# set to None if previous_page (nullable) is None
|
89
|
+
# and __fields_set__ contains the field
|
90
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
91
|
+
_dict['previousPage'] = None
|
92
|
+
|
93
|
+
# set to None if href (nullable) is None
|
94
|
+
# and __fields_set__ contains the field
|
95
|
+
if self.href is None and "href" in self.__fields_set__:
|
96
|
+
_dict['href'] = None
|
97
|
+
|
98
|
+
# set to None if links (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.links is None and "links" in self.__fields_set__:
|
101
|
+
_dict['links'] = None
|
102
|
+
|
103
|
+
return _dict
|
104
|
+
|
105
|
+
@classmethod
|
106
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfCheckDefinition:
|
107
|
+
"""Create an instance of PagedResourceListOfCheckDefinition from a dict"""
|
108
|
+
if obj is None:
|
109
|
+
return None
|
110
|
+
|
111
|
+
if not isinstance(obj, dict):
|
112
|
+
return PagedResourceListOfCheckDefinition.parse_obj(obj)
|
113
|
+
|
114
|
+
_obj = PagedResourceListOfCheckDefinition.parse_obj({
|
115
|
+
"next_page": obj.get("nextPage"),
|
116
|
+
"previous_page": obj.get("previousPage"),
|
117
|
+
"values": [CheckDefinition.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
118
|
+
"href": obj.get("href"),
|
119
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
120
|
+
})
|
121
|
+
return _obj
|
@@ -19,7 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool,
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictBool, constr
|
23
23
|
from lusid.models.resource_id import ResourceId
|
24
24
|
|
25
25
|
class RelationalDatasetFieldDefinition(BaseModel):
|
@@ -31,7 +31,7 @@ class RelationalDatasetFieldDefinition(BaseModel):
|
|
31
31
|
description: Optional[StrictStr] = Field(None,alias="description", description="A detailed description of the field and its purpose.")
|
32
32
|
data_type_id: ResourceId = Field(..., alias="dataTypeId")
|
33
33
|
required: Optional[StrictBool] = Field(None, description="Whether this field is mandatory in the dataset.")
|
34
|
-
usage:
|
34
|
+
usage: StrictStr = Field(...,alias="usage", description="The intended usage of the field (SeriesIdentifier, Value, or Metadata).")
|
35
35
|
__properties = ["fieldName", "displayName", "description", "dataTypeId", "required", "usage"]
|
36
36
|
|
37
37
|
class Config:
|
@@ -79,11 +79,6 @@ class RelationalDatasetFieldDefinition(BaseModel):
|
|
79
79
|
if self.description is None and "description" in self.__fields_set__:
|
80
80
|
_dict['description'] = None
|
81
81
|
|
82
|
-
# set to None if usage (nullable) is None
|
83
|
-
# and __fields_set__ contains the field
|
84
|
-
if self.usage is None and "usage" in self.__fields_set__:
|
85
|
-
_dict['usage'] = None
|
86
|
-
|
87
82
|
return _dict
|
88
83
|
|
89
84
|
@classmethod
|
@@ -0,0 +1,115 @@
|
|
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 StrictStr, Field, BaseModel, Field, conlist, constr, validator
|
23
|
+
from lusid.models.check_definition_dataset_schema import CheckDefinitionDatasetSchema
|
24
|
+
from lusid.models.check_definition_rule_set import CheckDefinitionRuleSet
|
25
|
+
from lusid.models.model_property import ModelProperty
|
26
|
+
|
27
|
+
class UpdateCheckDefinitionRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
UpdateCheckDefinitionRequest
|
30
|
+
"""
|
31
|
+
display_name: StrictStr = Field(...,alias="displayName", description="The name of the Check Definition.")
|
32
|
+
description: StrictStr = Field(...,alias="description", description="A description for the Check Definition.")
|
33
|
+
dataset_schema: Optional[CheckDefinitionDatasetSchema] = Field(None, alias="datasetSchema")
|
34
|
+
rule_sets: conlist(CheckDefinitionRuleSet) = Field(..., alias="ruleSets", description="A collection of rule sets for the Check Definition.")
|
35
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Check Definition.")
|
36
|
+
__properties = ["displayName", "description", "datasetSchema", "ruleSets", "properties"]
|
37
|
+
|
38
|
+
class Config:
|
39
|
+
"""Pydantic configuration"""
|
40
|
+
allow_population_by_field_name = True
|
41
|
+
validate_assignment = True
|
42
|
+
|
43
|
+
def __str__(self):
|
44
|
+
"""For `print` and `pprint`"""
|
45
|
+
return pprint.pformat(self.dict(by_alias=False))
|
46
|
+
|
47
|
+
def __repr__(self):
|
48
|
+
"""For `print` and `pprint`"""
|
49
|
+
return self.to_str()
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> UpdateCheckDefinitionRequest:
|
61
|
+
"""Create an instance of UpdateCheckDefinitionRequest from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of dataset_schema
|
71
|
+
if self.dataset_schema:
|
72
|
+
_dict['datasetSchema'] = self.dataset_schema.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rule_sets (list)
|
74
|
+
_items = []
|
75
|
+
if self.rule_sets:
|
76
|
+
for _item in self.rule_sets:
|
77
|
+
if _item:
|
78
|
+
_items.append(_item.to_dict())
|
79
|
+
_dict['ruleSets'] = _items
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
81
|
+
_field_dict = {}
|
82
|
+
if self.properties:
|
83
|
+
for _key in self.properties:
|
84
|
+
if self.properties[_key]:
|
85
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
86
|
+
_dict['properties'] = _field_dict
|
87
|
+
# set to None if properties (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
90
|
+
_dict['properties'] = None
|
91
|
+
|
92
|
+
return _dict
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def from_dict(cls, obj: dict) -> UpdateCheckDefinitionRequest:
|
96
|
+
"""Create an instance of UpdateCheckDefinitionRequest from a dict"""
|
97
|
+
if obj is None:
|
98
|
+
return None
|
99
|
+
|
100
|
+
if not isinstance(obj, dict):
|
101
|
+
return UpdateCheckDefinitionRequest.parse_obj(obj)
|
102
|
+
|
103
|
+
_obj = UpdateCheckDefinitionRequest.parse_obj({
|
104
|
+
"display_name": obj.get("displayName"),
|
105
|
+
"description": obj.get("description"),
|
106
|
+
"dataset_schema": CheckDefinitionDatasetSchema.from_dict(obj.get("datasetSchema")) if obj.get("datasetSchema") is not None else None,
|
107
|
+
"rule_sets": [CheckDefinitionRuleSet.from_dict(_item) for _item in obj.get("ruleSets")] if obj.get("ruleSets") is not None else None,
|
108
|
+
"properties": dict(
|
109
|
+
(_k, ModelProperty.from_dict(_v))
|
110
|
+
for _k, _v in obj.get("properties").items()
|
111
|
+
)
|
112
|
+
if obj.get("properties") is not None
|
113
|
+
else None
|
114
|
+
})
|
115
|
+
return _obj
|
@@ -27,14 +27,15 @@ class ValuationSchedule(BaseModel):
|
|
27
27
|
Specification object for the valuation schedule, how do we determine which days we wish to perform a valuation upon. # noqa: E501
|
28
28
|
"""
|
29
29
|
effective_from: Optional[StrictStr] = Field(None,alias="effectiveFrom", description="If present, the EffectiveFrom and EffectiveAt dates are interpreted as a range of dates for which to perform a valuation. In this case, valuation is calculated for the portfolio(s) for each business day in the given range.")
|
30
|
-
effective_at: StrictStr = Field(
|
30
|
+
effective_at: Optional[StrictStr] = Field(None,alias="effectiveAt", description="The market data time, i.e. the time to run the valuation request effective of.")
|
31
31
|
tenor: Optional[StrictStr] = Field(None,alias="tenor", description="Tenor, e.g \"1D\", \"1M\" to be used in generating the date schedule when effectiveFrom and effectiveAt are both given and are not the same.")
|
32
32
|
roll_convention: Optional[StrictStr] = Field(None,alias="rollConvention", description="When Tenor is given and is \"1M\" or longer, this specifies the rule which should be used to generate the date schedule. For example, \"EndOfMonth\" to generate end of month dates, or \"1\" to specify the first day of the applicable month.")
|
33
33
|
holiday_calendars: Optional[conlist(StrictStr)] = Field(None, alias="holidayCalendars", description="The holiday calendar(s) that should be used in determining the date schedule. Holiday calendar(s) are supplied by their names, for example, \"CoppClark\". Note that when the calendars are not available (e.g. when the user has insufficient permissions), a recipe setting will be used to determine whether the whole batch should then fail or whether the calendar not being available should simply be ignored.")
|
34
34
|
valuation_date_times: Optional[conlist(StrictStr)] = Field(None, alias="valuationDateTimes", description="If given, this is the exact set of dates on which to perform a valuation. This will replace/override all other specified values if given.")
|
35
35
|
business_day_convention: Optional[StrictStr] = Field(None,alias="businessDayConvention", description="When Tenor is given and is not equal to \"1D\", there may be cases where \"date + tenor\" land on non-business days around month end. In that case, the BusinessDayConvention, e.g. modified following \"MF\" would be applied to determine the next GBD.")
|
36
36
|
timeline_id: Optional[ResourceId] = Field(None, alias="timelineId")
|
37
|
-
|
37
|
+
closed_period_id: Optional[StrictStr] = Field(None,alias="closedPeriodId", description="Unique identifier for a closed period within a given timeline. If this field is specified, the TimelineId field must also be specified. If given, this field defines the effective date of the request as the EffectiveEnd of the given closed period.")
|
38
|
+
__properties = ["effectiveFrom", "effectiveAt", "tenor", "rollConvention", "holidayCalendars", "valuationDateTimes", "businessDayConvention", "timelineId", "closedPeriodId"]
|
38
39
|
|
39
40
|
class Config:
|
40
41
|
"""Pydantic configuration"""
|
@@ -76,6 +77,11 @@ class ValuationSchedule(BaseModel):
|
|
76
77
|
if self.effective_from is None and "effective_from" in self.__fields_set__:
|
77
78
|
_dict['effectiveFrom'] = None
|
78
79
|
|
80
|
+
# set to None if effective_at (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.effective_at is None and "effective_at" in self.__fields_set__:
|
83
|
+
_dict['effectiveAt'] = None
|
84
|
+
|
79
85
|
# set to None if tenor (nullable) is None
|
80
86
|
# and __fields_set__ contains the field
|
81
87
|
if self.tenor is None and "tenor" in self.__fields_set__:
|
@@ -101,6 +107,11 @@ class ValuationSchedule(BaseModel):
|
|
101
107
|
if self.business_day_convention is None and "business_day_convention" in self.__fields_set__:
|
102
108
|
_dict['businessDayConvention'] = None
|
103
109
|
|
110
|
+
# set to None if closed_period_id (nullable) is None
|
111
|
+
# and __fields_set__ contains the field
|
112
|
+
if self.closed_period_id is None and "closed_period_id" in self.__fields_set__:
|
113
|
+
_dict['closedPeriodId'] = None
|
114
|
+
|
104
115
|
return _dict
|
105
116
|
|
106
117
|
@classmethod
|
@@ -120,6 +131,7 @@ class ValuationSchedule(BaseModel):
|
|
120
131
|
"holiday_calendars": obj.get("holidayCalendars"),
|
121
132
|
"valuation_date_times": obj.get("valuationDateTimes"),
|
122
133
|
"business_day_convention": obj.get("businessDayConvention"),
|
123
|
-
"timeline_id": ResourceId.from_dict(obj.get("timelineId")) if obj.get("timelineId") is not None else None
|
134
|
+
"timeline_id": ResourceId.from_dict(obj.get("timelineId")) if obj.get("timelineId") is not None else None,
|
135
|
+
"closed_period_id": obj.get("closedPeriodId")
|
124
136
|
})
|
125
137
|
return _obj
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lusid-sdk
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.888
|
4
4
|
Summary: LUSID API
|
5
5
|
Home-page: https://github.com/finbourne/lusid-sdk-python
|
6
6
|
License: MIT
|
@@ -129,6 +129,11 @@ Class | Method | HTTP request | Description
|
|
129
129
|
*ChartOfAccountsApi* | [**upsert_account_properties**](docs/ChartOfAccountsApi.md#upsert_account_properties) | **POST** /api/chartofaccounts/{scope}/{code}/accounts/{accountCode}/properties/$upsert | [EXPERIMENTAL] UpsertAccountProperties: Upsert account properties
|
130
130
|
*ChartOfAccountsApi* | [**upsert_accounts**](docs/ChartOfAccountsApi.md#upsert_accounts) | **POST** /api/chartofaccounts/{scope}/{code}/accounts | [EXPERIMENTAL] UpsertAccounts: Upsert Accounts
|
131
131
|
*ChartOfAccountsApi* | [**upsert_chart_of_accounts_properties**](docs/ChartOfAccountsApi.md#upsert_chart_of_accounts_properties) | **POST** /api/chartofaccounts/{scope}/{code}/properties/$upsert | [EXPERIMENTAL] UpsertChartOfAccountsProperties: Upsert Chart of Accounts properties
|
132
|
+
*CheckDefinitionsApi* | [**create_check_definition**](docs/CheckDefinitionsApi.md#create_check_definition) | **POST** /api/dataquality/checkdefinitions | [EXPERIMENTAL] CreateCheckDefinition: Create a Check Definition
|
133
|
+
*CheckDefinitionsApi* | [**delete_check_definition**](docs/CheckDefinitionsApi.md#delete_check_definition) | **DELETE** /api/dataquality/checkdefinitions/{scope}/{code} | [EXPERIMENTAL] DeleteCheckDefinition: Deletes a particular Check Definition
|
134
|
+
*CheckDefinitionsApi* | [**get_check_definition**](docs/CheckDefinitionsApi.md#get_check_definition) | **GET** /api/dataquality/checkdefinitions/{scope}/{code} | [EXPERIMENTAL] GetCheckDefinition: Get a single Check Definition by scope and code.
|
135
|
+
*CheckDefinitionsApi* | [**list_check_definitions**](docs/CheckDefinitionsApi.md#list_check_definitions) | **GET** /api/dataquality/checkdefinitions | [EXPERIMENTAL] ListCheckDefinitions: List Check Definitions
|
136
|
+
*CheckDefinitionsApi* | [**update_check_definition**](docs/CheckDefinitionsApi.md#update_check_definition) | **PUT** /api/dataquality/checkdefinitions/{scope}/{code} | [EXPERIMENTAL] UpdateCheckDefinition: Update Check Definition defined by scope and code
|
132
137
|
*ComplexMarketDataApi* | [**delete_complex_market_data**](docs/ComplexMarketDataApi.md#delete_complex_market_data) | **POST** /api/complexmarketdata/{scope}/$delete | DeleteComplexMarketData: Delete one or more items of complex market data, assuming they are present.
|
133
138
|
*ComplexMarketDataApi* | [**get_complex_market_data**](docs/ComplexMarketDataApi.md#get_complex_market_data) | **POST** /api/complexmarketdata/{scope}/$get | GetComplexMarketData: Get complex market data
|
134
139
|
*ComplexMarketDataApi* | [**list_complex_market_data**](docs/ComplexMarketDataApi.md#list_complex_market_data) | **GET** /api/complexmarketdata | ListComplexMarketData: List the set of ComplexMarketData
|
@@ -205,7 +210,7 @@ Class | Method | HTTP request | Description
|
|
205
210
|
*CustomEntityDefinitionsApi* | [**get_definition**](docs/CustomEntityDefinitionsApi.md#get_definition) | **GET** /api/customentities/entitytypes/{entityType} | [EARLY ACCESS] GetDefinition: Get a Custom Entity type definition.
|
206
211
|
*CustomEntityDefinitionsApi* | [**list_custom_entity_definitions**](docs/CustomEntityDefinitionsApi.md#list_custom_entity_definitions) | **GET** /api/customentities/entitytypes | [EARLY ACCESS] ListCustomEntityDefinitions: List the Custom Entity type definitions
|
207
212
|
*CustomEntityDefinitionsApi* | [**update_custom_entity_definition**](docs/CustomEntityDefinitionsApi.md#update_custom_entity_definition) | **PUT** /api/customentities/entitytypes/{entityType} | [EARLY ACCESS] UpdateCustomEntityDefinition: Modify an existing Custom Entity type.
|
208
|
-
*CustomDataModelsApi* | [**batch_amend**](docs/CustomDataModelsApi.md#batch_amend) | **POST** /api/datamodel/$batchamend | [
|
213
|
+
*CustomDataModelsApi* | [**batch_amend**](docs/CustomDataModelsApi.md#batch_amend) | **POST** /api/datamodel/$batchamend | [EXPERIMENTAL] BatchAmend: Batch amend entities Custom Data Model membership.
|
209
214
|
*CustomDataModelsApi* | [**create_custom_data_model**](docs/CustomDataModelsApi.md#create_custom_data_model) | **POST** /api/datamodel/{entityType} | [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model
|
210
215
|
*CustomDataModelsApi* | [**delete_custom_data_model**](docs/CustomDataModelsApi.md#delete_custom_data_model) | **DELETE** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model
|
211
216
|
*CustomDataModelsApi* | [**get_custom_data_model**](docs/CustomDataModelsApi.md#get_custom_data_model) | **GET** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model
|
@@ -833,6 +838,10 @@ Class | Method | HTTP request | Description
|
|
833
838
|
- [ChartOfAccounts](docs/ChartOfAccounts.md)
|
834
839
|
- [ChartOfAccountsProperties](docs/ChartOfAccountsProperties.md)
|
835
840
|
- [ChartOfAccountsRequest](docs/ChartOfAccountsRequest.md)
|
841
|
+
- [CheckDefinition](docs/CheckDefinition.md)
|
842
|
+
- [CheckDefinitionDatasetSchema](docs/CheckDefinitionDatasetSchema.md)
|
843
|
+
- [CheckDefinitionRule](docs/CheckDefinitionRule.md)
|
844
|
+
- [CheckDefinitionRuleSet](docs/CheckDefinitionRuleSet.md)
|
836
845
|
- [CheckStep](docs/CheckStep.md)
|
837
846
|
- [CheckStepRequest](docs/CheckStepRequest.md)
|
838
847
|
- [CleardownModuleDetails](docs/CleardownModuleDetails.md)
|
@@ -909,6 +918,7 @@ Class | Method | HTTP request | Description
|
|
909
918
|
- [CreateAddressKeyDefinitionRequest](docs/CreateAddressKeyDefinitionRequest.md)
|
910
919
|
- [CreateAmortisationRuleSetRequest](docs/CreateAmortisationRuleSetRequest.md)
|
911
920
|
- [CreateCalendarRequest](docs/CreateCalendarRequest.md)
|
921
|
+
- [CreateCheckDefinitionRequest](docs/CreateCheckDefinitionRequest.md)
|
912
922
|
- [CreateClosedPeriodRequest](docs/CreateClosedPeriodRequest.md)
|
913
923
|
- [CreateComplianceTemplateRequest](docs/CreateComplianceTemplateRequest.md)
|
914
924
|
- [CreateCorporateActionSourceRequest](docs/CreateCorporateActionSourceRequest.md)
|
@@ -1379,6 +1389,7 @@ Class | Method | HTTP request | Description
|
|
1379
1389
|
- [PagedResourceListOfBlock](docs/PagedResourceListOfBlock.md)
|
1380
1390
|
- [PagedResourceListOfCalendar](docs/PagedResourceListOfCalendar.md)
|
1381
1391
|
- [PagedResourceListOfChartOfAccounts](docs/PagedResourceListOfChartOfAccounts.md)
|
1392
|
+
- [PagedResourceListOfCheckDefinition](docs/PagedResourceListOfCheckDefinition.md)
|
1382
1393
|
- [PagedResourceListOfCleardownModuleResponse](docs/PagedResourceListOfCleardownModuleResponse.md)
|
1383
1394
|
- [PagedResourceListOfCleardownModuleRule](docs/PagedResourceListOfCleardownModuleRule.md)
|
1384
1395
|
- [PagedResourceListOfClosedPeriod](docs/PagedResourceListOfClosedPeriod.md)
|
@@ -1821,6 +1832,7 @@ Class | Method | HTTP request | Description
|
|
1821
1832
|
- [UnmatchedHoldingMethod](docs/UnmatchedHoldingMethod.md)
|
1822
1833
|
- [UpdateAmortisationRuleSetDetailsRequest](docs/UpdateAmortisationRuleSetDetailsRequest.md)
|
1823
1834
|
- [UpdateCalendarRequest](docs/UpdateCalendarRequest.md)
|
1835
|
+
- [UpdateCheckDefinitionRequest](docs/UpdateCheckDefinitionRequest.md)
|
1824
1836
|
- [UpdateComplianceTemplateRequest](docs/UpdateComplianceTemplateRequest.md)
|
1825
1837
|
- [UpdateCustomDataModelRequest](docs/UpdateCustomDataModelRequest.md)
|
1826
1838
|
- [UpdateCustomEntityDefinitionRequest](docs/UpdateCustomEntityDefinitionRequest.md)
|