lusid-sdk 2.1.110__py3-none-any.whl → 2.1.131__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.

Files changed (47) hide show
  1. lusid/__init__.py +40 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/amortisation_rule_sets_api.py +175 -0
  4. lusid/api/compliance_api.py +502 -0
  5. lusid/api/fee_types_api.py +909 -0
  6. lusid/api/instrument_events_api.py +189 -0
  7. lusid/api/portfolio_groups_api.py +16 -8
  8. lusid/api/portfolios_api.py +212 -0
  9. lusid/api/transaction_portfolios_api.py +32 -16
  10. lusid/configuration.py +1 -1
  11. lusid/models/__init__.py +38 -0
  12. lusid/models/amortisation_rule_set.py +7 -11
  13. lusid/models/applicable_instrument_event.py +106 -0
  14. lusid/models/compliance_rule_template.py +153 -0
  15. lusid/models/compliance_step_request.py +76 -0
  16. lusid/models/compliance_step_type_request.py +42 -0
  17. lusid/models/compliance_template_variation_dto.py +112 -0
  18. lusid/models/compliance_template_variation_request.py +112 -0
  19. lusid/models/create_compliance_template_request.py +95 -0
  20. lusid/models/create_derived_property_definition_request.py +3 -3
  21. lusid/models/create_property_definition_request.py +3 -3
  22. lusid/models/diary_entry_request.py +1 -1
  23. lusid/models/fee_accrual.py +83 -0
  24. lusid/models/fee_type.py +115 -0
  25. lusid/models/fee_type_request.py +105 -0
  26. lusid/models/flow_conventions.py +1 -1
  27. lusid/models/operation.py +2 -2
  28. lusid/models/paged_resource_list_of_fee_type.py +113 -0
  29. lusid/models/paged_resource_list_of_instrument_event_instruction.py +113 -0
  30. lusid/models/portfolio_entity_id.py +2 -18
  31. lusid/models/portfolio_holding.py +19 -4
  32. lusid/models/property_definition.py +3 -3
  33. lusid/models/property_definition_search_result.py +3 -3
  34. lusid/models/property_domain.py +1 -0
  35. lusid/models/query_applicable_instrument_events_request.py +89 -0
  36. lusid/models/quote_access_metadata_rule_id.py +1 -1
  37. lusid/models/quote_series_id.py +1 -1
  38. lusid/models/resource_list_of_applicable_instrument_event.py +113 -0
  39. lusid/models/rules_interval.py +83 -0
  40. lusid/models/set_amortisation_rules_request.py +73 -0
  41. lusid/models/settlement_schedule.py +78 -0
  42. lusid/models/update_compliance_template_request.py +95 -0
  43. lusid/models/update_fee_type_request.py +96 -0
  44. lusid/models/valuation_point_data_response.py +15 -2
  45. {lusid_sdk-2.1.110.dist-info → lusid_sdk-2.1.131.dist-info}/METADATA +34 -4
  46. {lusid_sdk-2.1.110.dist-info → lusid_sdk-2.1.131.dist-info}/RECORD +47 -27
  47. {lusid_sdk-2.1.110.dist-info → lusid_sdk-2.1.131.dist-info}/WHEEL +0 -0
@@ -0,0 +1,153 @@
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.compliance_template_variation_dto import ComplianceTemplateVariationDto
24
+ from lusid.models.link import Link
25
+ from lusid.models.model_property import ModelProperty
26
+ from lusid.models.resource_id import ResourceId
27
+ from lusid.models.version import Version
28
+
29
+ class ComplianceRuleTemplate(BaseModel):
30
+ """
31
+ ComplianceRuleTemplate
32
+ """
33
+ id: Optional[ResourceId] = None
34
+ description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="The description of the Compliance Template")
35
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="Properties associated with the Compliance Template Variation")
36
+ variations: Optional[conlist(ComplianceTemplateVariationDto)] = Field(None, description="Variation details of a Compliance Template")
37
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested asAt datetime.")
38
+ version: Optional[Version] = None
39
+ links: Optional[conlist(Link)] = None
40
+ __properties = ["id", "description", "properties", "variations", "href", "version", "links"]
41
+
42
+ @validator('description')
43
+ def description_validate_regular_expression(cls, value):
44
+ """Validates the regular expression"""
45
+ if value is None:
46
+ return value
47
+
48
+ if not re.match(r"^[\s\S]*$", value):
49
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
50
+ return value
51
+
52
+ class Config:
53
+ """Pydantic configuration"""
54
+ allow_population_by_field_name = True
55
+ validate_assignment = True
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.dict(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ return json.dumps(self.to_dict())
64
+
65
+ @classmethod
66
+ def from_json(cls, json_str: str) -> ComplianceRuleTemplate:
67
+ """Create an instance of ComplianceRuleTemplate from a JSON string"""
68
+ return cls.from_dict(json.loads(json_str))
69
+
70
+ def to_dict(self):
71
+ """Returns the dictionary representation of the model using alias"""
72
+ _dict = self.dict(by_alias=True,
73
+ exclude={
74
+ },
75
+ exclude_none=True)
76
+ # override the default output from pydantic by calling `to_dict()` of id
77
+ if self.id:
78
+ _dict['id'] = self.id.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
80
+ _field_dict = {}
81
+ if self.properties:
82
+ for _key in self.properties:
83
+ if self.properties[_key]:
84
+ _field_dict[_key] = self.properties[_key].to_dict()
85
+ _dict['properties'] = _field_dict
86
+ # override the default output from pydantic by calling `to_dict()` of each item in variations (list)
87
+ _items = []
88
+ if self.variations:
89
+ for _item in self.variations:
90
+ if _item:
91
+ _items.append(_item.to_dict())
92
+ _dict['variations'] = _items
93
+ # override the default output from pydantic by calling `to_dict()` of version
94
+ if self.version:
95
+ _dict['version'] = self.version.to_dict()
96
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
97
+ _items = []
98
+ if self.links:
99
+ for _item in self.links:
100
+ if _item:
101
+ _items.append(_item.to_dict())
102
+ _dict['links'] = _items
103
+ # set to None if description (nullable) is None
104
+ # and __fields_set__ contains the field
105
+ if self.description is None and "description" in self.__fields_set__:
106
+ _dict['description'] = None
107
+
108
+ # set to None if properties (nullable) is None
109
+ # and __fields_set__ contains the field
110
+ if self.properties is None and "properties" in self.__fields_set__:
111
+ _dict['properties'] = None
112
+
113
+ # set to None if variations (nullable) is None
114
+ # and __fields_set__ contains the field
115
+ if self.variations is None and "variations" in self.__fields_set__:
116
+ _dict['variations'] = None
117
+
118
+ # set to None if href (nullable) is None
119
+ # and __fields_set__ contains the field
120
+ if self.href is None and "href" in self.__fields_set__:
121
+ _dict['href'] = None
122
+
123
+ # set to None if links (nullable) is None
124
+ # and __fields_set__ contains the field
125
+ if self.links is None and "links" in self.__fields_set__:
126
+ _dict['links'] = None
127
+
128
+ return _dict
129
+
130
+ @classmethod
131
+ def from_dict(cls, obj: dict) -> ComplianceRuleTemplate:
132
+ """Create an instance of ComplianceRuleTemplate from a dict"""
133
+ if obj is None:
134
+ return None
135
+
136
+ if not isinstance(obj, dict):
137
+ return ComplianceRuleTemplate.parse_obj(obj)
138
+
139
+ _obj = ComplianceRuleTemplate.parse_obj({
140
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
141
+ "description": obj.get("description"),
142
+ "properties": dict(
143
+ (_k, ModelProperty.from_dict(_v))
144
+ for _k, _v in obj.get("properties").items()
145
+ )
146
+ if obj.get("properties") is not None
147
+ else None,
148
+ "variations": [ComplianceTemplateVariationDto.from_dict(_item) for _item in obj.get("variations")] if obj.get("variations") is not None else None,
149
+ "href": obj.get("href"),
150
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
151
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
152
+ })
153
+ return _obj
@@ -0,0 +1,76 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, validator
23
+
24
+ class ComplianceStepRequest(BaseModel):
25
+ """
26
+ ComplianceStepRequest
27
+ """
28
+ compliance_step_type: StrictStr = Field(..., alias="complianceStepType", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, RecombineStepRequest, CheckStepRequest")
29
+ __properties = ["complianceStepType"]
30
+
31
+ @validator('compliance_step_type')
32
+ def compliance_step_type_validate_enum(cls, value):
33
+ """Validates the enum"""
34
+ if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'RecombineStepRequest', 'CheckStepRequest'):
35
+ raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'RecombineStepRequest', 'CheckStepRequest')")
36
+ return value
37
+
38
+ class Config:
39
+ """Pydantic configuration"""
40
+ allow_population_by_field_name = True
41
+ validate_assignment = True
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.dict(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> ComplianceStepRequest:
53
+ """Create an instance of ComplianceStepRequest from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self):
57
+ """Returns the dictionary representation of the model using alias"""
58
+ _dict = self.dict(by_alias=True,
59
+ exclude={
60
+ },
61
+ exclude_none=True)
62
+ return _dict
63
+
64
+ @classmethod
65
+ def from_dict(cls, obj: dict) -> ComplianceStepRequest:
66
+ """Create an instance of ComplianceStepRequest from a dict"""
67
+ if obj is None:
68
+ return None
69
+
70
+ if not isinstance(obj, dict):
71
+ return ComplianceStepRequest.parse_obj(obj)
72
+
73
+ _obj = ComplianceStepRequest.parse_obj({
74
+ "compliance_step_type": obj.get("complianceStepType")
75
+ })
76
+ return _obj
@@ -0,0 +1,42 @@
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
+ import json
16
+ import pprint
17
+ import re # noqa: F401
18
+ from aenum import Enum, no_arg
19
+
20
+
21
+
22
+
23
+
24
+ class ComplianceStepTypeRequest(str, Enum):
25
+ """
26
+ ComplianceStepTypeRequest
27
+ """
28
+
29
+ """
30
+ allowed enum values
31
+ """
32
+ FILTERSTEPREQUEST = 'FilterStepRequest'
33
+ GROUPBYSTEPREQUEST = 'GroupByStepRequest'
34
+ GROUPFILTERSTEPREQUEST = 'GroupFilterStepRequest'
35
+ BRANCHSTEPREQUEST = 'BranchStepRequest'
36
+ RECOMBINESTEPREQUEST = 'RecombineStepRequest'
37
+ CHECKSTEPREQUEST = 'CheckStepRequest'
38
+
39
+ @classmethod
40
+ def from_json(cls, json_str: str) -> ComplianceStepTypeRequest:
41
+ """Create an instance of ComplianceStepTypeRequest from a JSON string"""
42
+ return ComplianceStepTypeRequest(json.loads(json_str))
@@ -0,0 +1,112 @@
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, conlist, constr, validator
23
+ from lusid.models.compliance_step import ComplianceStep
24
+
25
+ class ComplianceTemplateVariationDto(BaseModel):
26
+ """
27
+ ComplianceTemplateVariationDto
28
+ """
29
+ label: constr(strict=True, max_length=64, min_length=1) = Field(...)
30
+ description: constr(strict=True, max_length=1024, min_length=0) = Field(...)
31
+ outcome_description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="outcomeDescription")
32
+ referenced_group_label: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="referencedGroupLabel")
33
+ steps: conlist(ComplianceStep) = Field(...)
34
+ __properties = ["label", "description", "outcomeDescription", "referencedGroupLabel", "steps"]
35
+
36
+ @validator('description')
37
+ def description_validate_regular_expression(cls, value):
38
+ """Validates the regular expression"""
39
+ if not re.match(r"^[\s\S]*$", value):
40
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
41
+ return value
42
+
43
+ @validator('outcome_description')
44
+ def outcome_description_validate_regular_expression(cls, value):
45
+ """Validates the regular expression"""
46
+ if value is None:
47
+ return value
48
+
49
+ if not re.match(r"^[\s\S]*$", value):
50
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
51
+ return value
52
+
53
+ class Config:
54
+ """Pydantic configuration"""
55
+ allow_population_by_field_name = True
56
+ validate_assignment = True
57
+
58
+ def to_str(self) -> str:
59
+ """Returns the string representation of the model using alias"""
60
+ return pprint.pformat(self.dict(by_alias=True))
61
+
62
+ def to_json(self) -> str:
63
+ """Returns the JSON representation of the model using alias"""
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> ComplianceTemplateVariationDto:
68
+ """Create an instance of ComplianceTemplateVariationDto from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self):
72
+ """Returns the dictionary representation of the model using alias"""
73
+ _dict = self.dict(by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True)
77
+ # override the default output from pydantic by calling `to_dict()` of each item in steps (list)
78
+ _items = []
79
+ if self.steps:
80
+ for _item in self.steps:
81
+ if _item:
82
+ _items.append(_item.to_dict())
83
+ _dict['steps'] = _items
84
+ # set to None if outcome_description (nullable) is None
85
+ # and __fields_set__ contains the field
86
+ if self.outcome_description is None and "outcome_description" in self.__fields_set__:
87
+ _dict['outcomeDescription'] = None
88
+
89
+ # set to None if referenced_group_label (nullable) is None
90
+ # and __fields_set__ contains the field
91
+ if self.referenced_group_label is None and "referenced_group_label" in self.__fields_set__:
92
+ _dict['referencedGroupLabel'] = None
93
+
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: dict) -> ComplianceTemplateVariationDto:
98
+ """Create an instance of ComplianceTemplateVariationDto from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return ComplianceTemplateVariationDto.parse_obj(obj)
104
+
105
+ _obj = ComplianceTemplateVariationDto.parse_obj({
106
+ "label": obj.get("label"),
107
+ "description": obj.get("description"),
108
+ "outcome_description": obj.get("outcomeDescription"),
109
+ "referenced_group_label": obj.get("referencedGroupLabel"),
110
+ "steps": [ComplianceStep.from_dict(_item) for _item in obj.get("steps")] if obj.get("steps") is not None else None
111
+ })
112
+ return _obj
@@ -0,0 +1,112 @@
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, conlist, constr, validator
23
+ from lusid.models.compliance_step_request import ComplianceStepRequest
24
+
25
+ class ComplianceTemplateVariationRequest(BaseModel):
26
+ """
27
+ ComplianceTemplateVariationRequest
28
+ """
29
+ label: constr(strict=True, max_length=64, min_length=1) = Field(...)
30
+ description: constr(strict=True, max_length=1024, min_length=0) = Field(...)
31
+ outcome_description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="outcomeDescription")
32
+ referenced_group_label: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="referencedGroupLabel")
33
+ steps: conlist(ComplianceStepRequest) = Field(...)
34
+ __properties = ["label", "description", "outcomeDescription", "referencedGroupLabel", "steps"]
35
+
36
+ @validator('description')
37
+ def description_validate_regular_expression(cls, value):
38
+ """Validates the regular expression"""
39
+ if not re.match(r"^[\s\S]*$", value):
40
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
41
+ return value
42
+
43
+ @validator('outcome_description')
44
+ def outcome_description_validate_regular_expression(cls, value):
45
+ """Validates the regular expression"""
46
+ if value is None:
47
+ return value
48
+
49
+ if not re.match(r"^[\s\S]*$", value):
50
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
51
+ return value
52
+
53
+ class Config:
54
+ """Pydantic configuration"""
55
+ allow_population_by_field_name = True
56
+ validate_assignment = True
57
+
58
+ def to_str(self) -> str:
59
+ """Returns the string representation of the model using alias"""
60
+ return pprint.pformat(self.dict(by_alias=True))
61
+
62
+ def to_json(self) -> str:
63
+ """Returns the JSON representation of the model using alias"""
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> ComplianceTemplateVariationRequest:
68
+ """Create an instance of ComplianceTemplateVariationRequest from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self):
72
+ """Returns the dictionary representation of the model using alias"""
73
+ _dict = self.dict(by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True)
77
+ # override the default output from pydantic by calling `to_dict()` of each item in steps (list)
78
+ _items = []
79
+ if self.steps:
80
+ for _item in self.steps:
81
+ if _item:
82
+ _items.append(_item.to_dict())
83
+ _dict['steps'] = _items
84
+ # set to None if outcome_description (nullable) is None
85
+ # and __fields_set__ contains the field
86
+ if self.outcome_description is None and "outcome_description" in self.__fields_set__:
87
+ _dict['outcomeDescription'] = None
88
+
89
+ # set to None if referenced_group_label (nullable) is None
90
+ # and __fields_set__ contains the field
91
+ if self.referenced_group_label is None and "referenced_group_label" in self.__fields_set__:
92
+ _dict['referencedGroupLabel'] = None
93
+
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: dict) -> ComplianceTemplateVariationRequest:
98
+ """Create an instance of ComplianceTemplateVariationRequest from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return ComplianceTemplateVariationRequest.parse_obj(obj)
104
+
105
+ _obj = ComplianceTemplateVariationRequest.parse_obj({
106
+ "label": obj.get("label"),
107
+ "description": obj.get("description"),
108
+ "outcome_description": obj.get("outcomeDescription"),
109
+ "referenced_group_label": obj.get("referencedGroupLabel"),
110
+ "steps": [ComplianceStepRequest.from_dict(_item) for _item in obj.get("steps")] if obj.get("steps") is not None else None
111
+ })
112
+ return _obj
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List
22
+ from pydantic.v1 import BaseModel, Field, conlist, constr, validator
23
+ from lusid.models.compliance_template_variation_request import ComplianceTemplateVariationRequest
24
+
25
+ class CreateComplianceTemplateRequest(BaseModel):
26
+ """
27
+ CreateComplianceTemplateRequest
28
+ """
29
+ code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code given for the Compliance Template")
30
+ description: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The description of the Compliance Template")
31
+ variations: conlist(ComplianceTemplateVariationRequest) = Field(..., description="Variation details of a Compliance Template")
32
+ __properties = ["code", "description", "variations"]
33
+
34
+ @validator('code')
35
+ def code_validate_regular_expression(cls, value):
36
+ """Validates the regular expression"""
37
+ if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
38
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
39
+ return value
40
+
41
+ @validator('description')
42
+ def description_validate_regular_expression(cls, value):
43
+ """Validates the regular expression"""
44
+ if not re.match(r"^[\s\S]*$", value):
45
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
46
+ return value
47
+
48
+ class Config:
49
+ """Pydantic configuration"""
50
+ allow_population_by_field_name = True
51
+ validate_assignment = True
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) -> CreateComplianceTemplateRequest:
63
+ """Create an instance of CreateComplianceTemplateRequest 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 each item in variations (list)
73
+ _items = []
74
+ if self.variations:
75
+ for _item in self.variations:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['variations'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: dict) -> CreateComplianceTemplateRequest:
83
+ """Create an instance of CreateComplianceTemplateRequest from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return CreateComplianceTemplateRequest.parse_obj(obj)
89
+
90
+ _obj = CreateComplianceTemplateRequest.parse_obj({
91
+ "code": obj.get("code"),
92
+ "description": obj.get("description"),
93
+ "variations": [ComplianceTemplateVariationRequest.from_dict(_item) for _item in obj.get("variations")] if obj.get("variations") is not None else None
94
+ })
95
+ return _obj
@@ -26,7 +26,7 @@ class CreateDerivedPropertyDefinitionRequest(BaseModel):
26
26
  """
27
27
  CreateDerivedPropertyDefinitionRequest
28
28
  """
29
- domain: StrictStr = Field(..., description="The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
29
+ domain: StrictStr = Field(..., description="The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
30
30
  scope: StrictStr = Field(..., description="The scope that the property exists in.")
31
31
  code: StrictStr = Field(..., description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
32
32
  display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The display name of the property.")
@@ -38,8 +38,8 @@ class CreateDerivedPropertyDefinitionRequest(BaseModel):
38
38
  @validator('domain')
39
39
  def domain_validate_enum(cls, value):
40
40
  """Validates the enum"""
41
- if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
42
- raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
41
+ if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
42
+ raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
43
43
  return value
44
44
 
45
45
  class Config:
@@ -26,7 +26,7 @@ class CreatePropertyDefinitionRequest(BaseModel):
26
26
  """
27
27
  CreatePropertyDefinitionRequest
28
28
  """
29
- domain: StrictStr = Field(..., description="The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
29
+ domain: StrictStr = Field(..., description="The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
30
30
  scope: StrictStr = Field(..., description="The scope that the property exists in.")
31
31
  code: StrictStr = Field(..., description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
32
32
  value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
@@ -41,8 +41,8 @@ class CreatePropertyDefinitionRequest(BaseModel):
41
41
  @validator('domain')
42
42
  def domain_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
45
- raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
44
+ if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
45
+ raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
46
46
  return value
47
47
 
48
48
  @validator('life_time')
@@ -27,7 +27,7 @@ class DiaryEntryRequest(BaseModel):
27
27
  The request to add a diary entry # noqa: E501
28
28
  """
29
29
  name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The name of the diary entry.")
30
- status: Optional[StrictStr] = Field(None, description="The status of the diary entry. Defaults to 'Undefined' for valuation points and 'Estimate' for closing periods.")
30
+ status: Optional[StrictStr] = Field(None, description="The status of the diary entry. Defaults to 'Undefined' and the allowed options are: 'Undefined' and 'Estimate'.")
31
31
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
32
32
  query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
33
33
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")