lusid-sdk 2.0.488__py3-none-any.whl → 2.1.5__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/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.6435\n"\
376
+ "Version of the API: 0.11.6440\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
@@ -853,6 +857,7 @@ from lusid.models.typed_resource_id import TypedResourceId
853
857
  from lusid.models.unit_schema import UnitSchema
854
858
  from lusid.models.units_ratio import UnitsRatio
855
859
  from lusid.models.unmatched_holding_method import UnmatchedHoldingMethod
860
+ from lusid.models.update_amortisation_rule_set_details_request import UpdateAmortisationRuleSetDetailsRequest
856
861
  from lusid.models.update_calendar_request import UpdateCalendarRequest
857
862
  from lusid.models.update_custom_entity_definition_request import UpdateCustomEntityDefinitionRequest
858
863
  from lusid.models.update_custom_entity_type_request import UpdateCustomEntityTypeRequest
@@ -995,6 +1000,8 @@ __all__ = [
995
1000
  "AllocationServiceRunResponse",
996
1001
  "AllocationSetRequest",
997
1002
  "AmortisationEvent",
1003
+ "AmortisationRule",
1004
+ "AmortisationRuleSet",
998
1005
  "AnnulQuotesResponse",
999
1006
  "AnnulSingleStructuredDataResponse",
1000
1007
  "AnnulStructuredDataResponse",
@@ -1109,6 +1116,7 @@ __all__ = [
1109
1116
  "CounterpartyRiskInformation",
1110
1117
  "CounterpartySignatory",
1111
1118
  "CreateAddressKeyDefinitionRequest",
1119
+ "CreateAmortisationRuleSetRequest",
1112
1120
  "CreateCalendarRequest",
1113
1121
  "CreateCorporateActionSourceRequest",
1114
1122
  "CreateCustomEntityTypeRequest",
@@ -1440,6 +1448,7 @@ __all__ = [
1440
1448
  "PagedResourceListOfAccount",
1441
1449
  "PagedResourceListOfAddressKeyDefinition",
1442
1450
  "PagedResourceListOfAllocation",
1451
+ "PagedResourceListOfAmortisationRuleSet",
1443
1452
  "PagedResourceListOfBlock",
1444
1453
  "PagedResourceListOfCalendar",
1445
1454
  "PagedResourceListOfChartOfAccounts",
@@ -1783,6 +1792,7 @@ __all__ = [
1783
1792
  "UnitSchema",
1784
1793
  "UnitsRatio",
1785
1794
  "UnmatchedHoldingMethod",
1795
+ "UpdateAmortisationRuleSetDetailsRequest",
1786
1796
  "UpdateCalendarRequest",
1787
1797
  "UpdateCustomEntityDefinitionRequest",
1788
1798
  "UpdateCustomEntityTypeRequest",
@@ -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
@@ -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
@@ -0,0 +1,93 @@
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 UpdateAmortisationRuleSetDetailsRequest(BaseModel):
25
+ """
26
+ UpdateAmortisationRuleSetDetailsRequest
27
+ """
28
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName")
29
+ description: Optional[constr(strict=True, max_length=1024, min_length=0)] = None
30
+ __properties = ["displayName", "description"]
31
+
32
+ @validator('display_name')
33
+ def display_name_validate_regular_expression(cls, value):
34
+ """Validates the regular expression"""
35
+ if not re.match(r"^[^\\<>&\"]+$", value):
36
+ raise ValueError(r"must validate the regular expression /^[^\\<>&\"]+$/")
37
+ return value
38
+
39
+ @validator('description')
40
+ def description_validate_regular_expression(cls, value):
41
+ """Validates the regular expression"""
42
+ if value is None:
43
+ return value
44
+
45
+ if not re.match(r"^[\s\S]*$", value):
46
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
47
+ return value
48
+
49
+ class Config:
50
+ """Pydantic configuration"""
51
+ allow_population_by_field_name = True
52
+ validate_assignment = True
53
+
54
+ def to_str(self) -> str:
55
+ """Returns the string representation of the model using alias"""
56
+ return pprint.pformat(self.dict(by_alias=True))
57
+
58
+ def to_json(self) -> str:
59
+ """Returns the JSON representation of the model using alias"""
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> UpdateAmortisationRuleSetDetailsRequest:
64
+ """Create an instance of UpdateAmortisationRuleSetDetailsRequest from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self):
68
+ """Returns the dictionary representation of the model using alias"""
69
+ _dict = self.dict(by_alias=True,
70
+ exclude={
71
+ },
72
+ exclude_none=True)
73
+ # set to None if description (nullable) is None
74
+ # and __fields_set__ contains the field
75
+ if self.description is None and "description" in self.__fields_set__:
76
+ _dict['description'] = None
77
+
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: dict) -> UpdateAmortisationRuleSetDetailsRequest:
82
+ """Create an instance of UpdateAmortisationRuleSetDetailsRequest from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return UpdateAmortisationRuleSetDetailsRequest.parse_obj(obj)
88
+
89
+ _obj = UpdateAmortisationRuleSetDetailsRequest.parse_obj({
90
+ "display_name": obj.get("displayName"),
91
+ "description": obj.get("description")
92
+ })
93
+ return _obj