lusid-sdk 2.1.88__py3-none-any.whl → 2.1.90__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.6523\n"\
376
+ "Version of the API: 0.11.6525\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
@@ -557,6 +557,8 @@ from lusid.models.paged_resource_list_of_reconciliation import PagedResourceList
557
557
  from lusid.models.paged_resource_list_of_reference_list_response import PagedResourceListOfReferenceListResponse
558
558
  from lusid.models.paged_resource_list_of_relationship_definition import PagedResourceListOfRelationshipDefinition
559
559
  from lusid.models.paged_resource_list_of_sequence_definition import PagedResourceListOfSequenceDefinition
560
+ from lusid.models.paged_resource_list_of_staged_modification import PagedResourceListOfStagedModification
561
+ from lusid.models.paged_resource_list_of_staged_modifications_requested_change_interval import PagedResourceListOfStagedModificationsRequestedChangeInterval
560
562
  from lusid.models.paged_resource_list_of_staging_rule_set import PagedResourceListOfStagingRuleSet
561
563
  from lusid.models.paged_resource_list_of_transaction_template import PagedResourceListOfTransactionTemplate
562
564
  from lusid.models.paged_resource_list_of_transaction_template_specification import PagedResourceListOfTransactionTemplateSpecification
@@ -679,6 +681,7 @@ from lusid.models.relationship import Relationship
679
681
  from lusid.models.relationship_definition import RelationshipDefinition
680
682
  from lusid.models.relative_date_offset import RelativeDateOffset
681
683
  from lusid.models.repo import Repo
684
+ from lusid.models.requested_changes import RequestedChanges
682
685
  from lusid.models.reset_event import ResetEvent
683
686
  from lusid.models.resource_id import ResourceId
684
687
  from lusid.models.resource_list_of_access_controlled_resource import ResourceListOfAccessControlledResource
@@ -787,7 +790,14 @@ from lusid.models.sides_definition_request import SidesDefinitionRequest
787
790
  from lusid.models.simple_cash_flow_loan import SimpleCashFlowLoan
788
791
  from lusid.models.simple_instrument import SimpleInstrument
789
792
  from lusid.models.sort_order import SortOrder
793
+ from lusid.models.staged_modification import StagedModification
794
+ from lusid.models.staged_modification_decision import StagedModificationDecision
795
+ from lusid.models.staged_modification_decision_request import StagedModificationDecisionRequest
796
+ from lusid.models.staged_modification_effective_range import StagedModificationEffectiveRange
797
+ from lusid.models.staged_modification_staging_rule import StagedModificationStagingRule
798
+ from lusid.models.staged_modifications_entity_hrefs import StagedModificationsEntityHrefs
790
799
  from lusid.models.staged_modifications_info import StagedModificationsInfo
800
+ from lusid.models.staged_modifications_requested_change_interval import StagedModificationsRequestedChangeInterval
791
801
  from lusid.models.staging_rule import StagingRule
792
802
  from lusid.models.staging_rule_approval_criteria import StagingRuleApprovalCriteria
793
803
  from lusid.models.staging_rule_match_criteria import StagingRuleMatchCriteria
@@ -1501,6 +1511,8 @@ __all__ = [
1501
1511
  "PagedResourceListOfReferenceListResponse",
1502
1512
  "PagedResourceListOfRelationshipDefinition",
1503
1513
  "PagedResourceListOfSequenceDefinition",
1514
+ "PagedResourceListOfStagedModification",
1515
+ "PagedResourceListOfStagedModificationsRequestedChangeInterval",
1504
1516
  "PagedResourceListOfStagingRuleSet",
1505
1517
  "PagedResourceListOfTransactionTemplate",
1506
1518
  "PagedResourceListOfTransactionTemplateSpecification",
@@ -1623,6 +1635,7 @@ __all__ = [
1623
1635
  "RelationshipDefinition",
1624
1636
  "RelativeDateOffset",
1625
1637
  "Repo",
1638
+ "RequestedChanges",
1626
1639
  "ResetEvent",
1627
1640
  "ResourceId",
1628
1641
  "ResourceListOfAccessControlledResource",
@@ -1731,7 +1744,14 @@ __all__ = [
1731
1744
  "SimpleCashFlowLoan",
1732
1745
  "SimpleInstrument",
1733
1746
  "SortOrder",
1747
+ "StagedModification",
1748
+ "StagedModificationDecision",
1749
+ "StagedModificationDecisionRequest",
1750
+ "StagedModificationEffectiveRange",
1751
+ "StagedModificationStagingRule",
1752
+ "StagedModificationsEntityHrefs",
1734
1753
  "StagedModificationsInfo",
1754
+ "StagedModificationsRequestedChangeInterval",
1735
1755
  "StagingRule",
1736
1756
  "StagingRuleApprovalCriteria",
1737
1757
  "StagingRuleMatchCriteria",
@@ -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.link import Link
24
+ from lusid.models.staged_modification import StagedModification
25
+
26
+ class PagedResourceListOfStagedModification(BaseModel):
27
+ """
28
+ PagedResourceListOfStagedModification
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
32
+ values: conlist(StagedModification) = 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) -> PagedResourceListOfStagedModification:
52
+ """Create an instance of PagedResourceListOfStagedModification 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) -> PagedResourceListOfStagedModification:
99
+ """Create an instance of PagedResourceListOfStagedModification from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return PagedResourceListOfStagedModification.parse_obj(obj)
105
+
106
+ _obj = PagedResourceListOfStagedModification.parse_obj({
107
+ "next_page": obj.get("nextPage"),
108
+ "previous_page": obj.get("previousPage"),
109
+ "values": [StagedModification.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,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.link import Link
24
+ from lusid.models.staged_modifications_requested_change_interval import StagedModificationsRequestedChangeInterval
25
+
26
+ class PagedResourceListOfStagedModificationsRequestedChangeInterval(BaseModel):
27
+ """
28
+ PagedResourceListOfStagedModificationsRequestedChangeInterval
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
32
+ values: conlist(StagedModificationsRequestedChangeInterval) = 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) -> PagedResourceListOfStagedModificationsRequestedChangeInterval:
52
+ """Create an instance of PagedResourceListOfStagedModificationsRequestedChangeInterval 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) -> PagedResourceListOfStagedModificationsRequestedChangeInterval:
99
+ """Create an instance of PagedResourceListOfStagedModificationsRequestedChangeInterval from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return PagedResourceListOfStagedModificationsRequestedChangeInterval.parse_obj(obj)
105
+
106
+ _obj = PagedResourceListOfStagedModificationsRequestedChangeInterval.parse_obj({
107
+ "next_page": obj.get("nextPage"),
108
+ "previous_page": obj.get("previousPage"),
109
+ "values": [StagedModificationsRequestedChangeInterval.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,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, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist
23
+
24
+ class RequestedChanges(BaseModel):
25
+ """
26
+ RequestedChanges
27
+ """
28
+ attribute_count: Optional[StrictInt] = Field(None, alias="attributeCount", description="Number of attributes staged change applies to")
29
+ attribute_names: Optional[conlist(StrictStr)] = Field(None, alias="attributeNames", description="Names of the attributes the staged change applies to.")
30
+ __properties = ["attributeCount", "attributeNames"]
31
+
32
+ class Config:
33
+ """Pydantic configuration"""
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> RequestedChanges:
47
+ """Create an instance of RequestedChanges from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True,
53
+ exclude={
54
+ },
55
+ exclude_none=True)
56
+ # set to None if attribute_names (nullable) is None
57
+ # and __fields_set__ contains the field
58
+ if self.attribute_names is None and "attribute_names" in self.__fields_set__:
59
+ _dict['attributeNames'] = None
60
+
61
+ return _dict
62
+
63
+ @classmethod
64
+ def from_dict(cls, obj: dict) -> RequestedChanges:
65
+ """Create an instance of RequestedChanges from a dict"""
66
+ if obj is None:
67
+ return None
68
+
69
+ if not isinstance(obj, dict):
70
+ return RequestedChanges.parse_obj(obj)
71
+
72
+ _obj = RequestedChanges.parse_obj({
73
+ "attribute_count": obj.get("attributeCount"),
74
+ "attribute_names": obj.get("attributeNames")
75
+ })
76
+ return _obj
@@ -0,0 +1,160 @@
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
+ from datetime import datetime
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist
23
+ from lusid.models.requested_changes import RequestedChanges
24
+ from lusid.models.staged_modification_decision import StagedModificationDecision
25
+ from lusid.models.staged_modification_staging_rule import StagedModificationStagingRule
26
+ from lusid.models.staged_modifications_entity_hrefs import StagedModificationsEntityHrefs
27
+
28
+ class StagedModification(BaseModel):
29
+ """
30
+ StagedModification
31
+ """
32
+ id: Optional[StrictStr] = Field(None, description="The unique Id for the staged modification")
33
+ as_at_staged: Optional[datetime] = Field(None, alias="asAtStaged", description="Time at which the modification was staged.")
34
+ user_id_staged: Optional[StrictStr] = Field(None, alias="userIdStaged", description="Id of the user who created the stage modification request.")
35
+ requested_id_staged: Optional[StrictStr] = Field(None, alias="requestedIdStaged", description="The Request Id that initiated this staged modification.")
36
+ action: Optional[StrictStr] = Field(None, description="Type of action of the staged modification, either create, update or delete.")
37
+ staging_rule: Optional[StagedModificationStagingRule] = Field(None, alias="stagingRule")
38
+ decisions: Optional[conlist(StagedModificationDecision)] = Field(None, description="Object containing information relating to the decision on the staged modification.")
39
+ decisions_count: Optional[StrictInt] = Field(None, alias="decisionsCount", description="Number of decisions made.")
40
+ status: Optional[StrictStr] = Field(None, description="The status of the staged modification.")
41
+ entity_type: Optional[StrictStr] = Field(None, alias="entityType", description="The type of the entity that the staged modification applies to.")
42
+ scope: Optional[StrictStr] = Field(None, description="The scope of the entity that this staged modification applies to.")
43
+ entity_unique_id: Optional[StrictStr] = Field(None, alias="entityUniqueId", description="The unique Id of the entity the staged modification applies to.")
44
+ requested_changes: Optional[RequestedChanges] = Field(None, alias="requestedChanges")
45
+ entity_hrefs: Optional[StagedModificationsEntityHrefs] = Field(None, alias="entityHrefs")
46
+ __properties = ["id", "asAtStaged", "userIdStaged", "requestedIdStaged", "action", "stagingRule", "decisions", "decisionsCount", "status", "entityType", "scope", "entityUniqueId", "requestedChanges", "entityHrefs"]
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) -> StagedModification:
63
+ """Create an instance of StagedModification 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 staging_rule
73
+ if self.staging_rule:
74
+ _dict['stagingRule'] = self.staging_rule.to_dict()
75
+ # override the default output from pydantic by calling `to_dict()` of each item in decisions (list)
76
+ _items = []
77
+ if self.decisions:
78
+ for _item in self.decisions:
79
+ if _item:
80
+ _items.append(_item.to_dict())
81
+ _dict['decisions'] = _items
82
+ # override the default output from pydantic by calling `to_dict()` of requested_changes
83
+ if self.requested_changes:
84
+ _dict['requestedChanges'] = self.requested_changes.to_dict()
85
+ # override the default output from pydantic by calling `to_dict()` of entity_hrefs
86
+ if self.entity_hrefs:
87
+ _dict['entityHrefs'] = self.entity_hrefs.to_dict()
88
+ # set to None if id (nullable) is None
89
+ # and __fields_set__ contains the field
90
+ if self.id is None and "id" in self.__fields_set__:
91
+ _dict['id'] = None
92
+
93
+ # set to None if user_id_staged (nullable) is None
94
+ # and __fields_set__ contains the field
95
+ if self.user_id_staged is None and "user_id_staged" in self.__fields_set__:
96
+ _dict['userIdStaged'] = None
97
+
98
+ # set to None if requested_id_staged (nullable) is None
99
+ # and __fields_set__ contains the field
100
+ if self.requested_id_staged is None and "requested_id_staged" in self.__fields_set__:
101
+ _dict['requestedIdStaged'] = None
102
+
103
+ # set to None if action (nullable) is None
104
+ # and __fields_set__ contains the field
105
+ if self.action is None and "action" in self.__fields_set__:
106
+ _dict['action'] = None
107
+
108
+ # set to None if decisions (nullable) is None
109
+ # and __fields_set__ contains the field
110
+ if self.decisions is None and "decisions" in self.__fields_set__:
111
+ _dict['decisions'] = None
112
+
113
+ # set to None if status (nullable) is None
114
+ # and __fields_set__ contains the field
115
+ if self.status is None and "status" in self.__fields_set__:
116
+ _dict['status'] = None
117
+
118
+ # set to None if entity_type (nullable) is None
119
+ # and __fields_set__ contains the field
120
+ if self.entity_type is None and "entity_type" in self.__fields_set__:
121
+ _dict['entityType'] = None
122
+
123
+ # set to None if scope (nullable) is None
124
+ # and __fields_set__ contains the field
125
+ if self.scope is None and "scope" in self.__fields_set__:
126
+ _dict['scope'] = None
127
+
128
+ # set to None if entity_unique_id (nullable) is None
129
+ # and __fields_set__ contains the field
130
+ if self.entity_unique_id is None and "entity_unique_id" in self.__fields_set__:
131
+ _dict['entityUniqueId'] = None
132
+
133
+ return _dict
134
+
135
+ @classmethod
136
+ def from_dict(cls, obj: dict) -> StagedModification:
137
+ """Create an instance of StagedModification from a dict"""
138
+ if obj is None:
139
+ return None
140
+
141
+ if not isinstance(obj, dict):
142
+ return StagedModification.parse_obj(obj)
143
+
144
+ _obj = StagedModification.parse_obj({
145
+ "id": obj.get("id"),
146
+ "as_at_staged": obj.get("asAtStaged"),
147
+ "user_id_staged": obj.get("userIdStaged"),
148
+ "requested_id_staged": obj.get("requestedIdStaged"),
149
+ "action": obj.get("action"),
150
+ "staging_rule": StagedModificationStagingRule.from_dict(obj.get("stagingRule")) if obj.get("stagingRule") is not None else None,
151
+ "decisions": [StagedModificationDecision.from_dict(_item) for _item in obj.get("decisions")] if obj.get("decisions") is not None else None,
152
+ "decisions_count": obj.get("decisionsCount"),
153
+ "status": obj.get("status"),
154
+ "entity_type": obj.get("entityType"),
155
+ "scope": obj.get("scope"),
156
+ "entity_unique_id": obj.get("entityUniqueId"),
157
+ "requested_changes": RequestedChanges.from_dict(obj.get("requestedChanges")) if obj.get("requestedChanges") is not None else None,
158
+ "entity_hrefs": StagedModificationsEntityHrefs.from_dict(obj.get("entityHrefs")) if obj.get("entityHrefs") is not None else None
159
+ })
160
+ return _obj
@@ -0,0 +1,97 @@
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
+ from datetime import datetime
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr
23
+
24
+ class StagedModificationDecision(BaseModel):
25
+ """
26
+ StagedModificationDecision
27
+ """
28
+ as_at: Optional[datetime] = Field(None, alias="asAt", description="Time the decision request is made.")
29
+ user_id: Optional[StrictStr] = Field(None, alias="userId", description="ID of user that approved the request.")
30
+ request_id: Optional[StrictStr] = Field(None, alias="requestId", description="ID of user that made the request.")
31
+ decision: Optional[StrictStr] = Field(None, description="The decision on the requested staged modification, can be 'Approve' or 'Reject'.")
32
+ comment: Optional[StrictStr] = Field(None, description="Comment on decision.")
33
+ __properties = ["asAt", "userId", "requestId", "decision", "comment"]
34
+
35
+ class Config:
36
+ """Pydantic configuration"""
37
+ allow_population_by_field_name = True
38
+ validate_assignment = True
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.dict(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> StagedModificationDecision:
50
+ """Create an instance of StagedModificationDecision from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self):
54
+ """Returns the dictionary representation of the model using alias"""
55
+ _dict = self.dict(by_alias=True,
56
+ exclude={
57
+ },
58
+ exclude_none=True)
59
+ # set to None if user_id (nullable) is None
60
+ # and __fields_set__ contains the field
61
+ if self.user_id is None and "user_id" in self.__fields_set__:
62
+ _dict['userId'] = None
63
+
64
+ # set to None if request_id (nullable) is None
65
+ # and __fields_set__ contains the field
66
+ if self.request_id is None and "request_id" in self.__fields_set__:
67
+ _dict['requestId'] = None
68
+
69
+ # set to None if decision (nullable) is None
70
+ # and __fields_set__ contains the field
71
+ if self.decision is None and "decision" in self.__fields_set__:
72
+ _dict['decision'] = None
73
+
74
+ # set to None if comment (nullable) is None
75
+ # and __fields_set__ contains the field
76
+ if self.comment is None and "comment" in self.__fields_set__:
77
+ _dict['comment'] = None
78
+
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: dict) -> StagedModificationDecision:
83
+ """Create an instance of StagedModificationDecision from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return StagedModificationDecision.parse_obj(obj)
89
+
90
+ _obj = StagedModificationDecision.parse_obj({
91
+ "as_at": obj.get("asAt"),
92
+ "user_id": obj.get("userId"),
93
+ "request_id": obj.get("requestId"),
94
+ "decision": obj.get("decision"),
95
+ "comment": obj.get("comment")
96
+ })
97
+ return _obj