lusid-sdk 2.1.401__py3-none-any.whl → 2.1.423__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.
Files changed (77) hide show
  1. lusid/__init__.py +44 -12
  2. lusid/api/__init__.py +2 -2
  3. lusid/api/abor_api.py +8 -16
  4. lusid/api/allocations_api.py +2 -2
  5. lusid/api/chart_of_accounts_api.py +174 -0
  6. lusid/api/custom_entities_api.py +2 -2
  7. lusid/api/entities_api.py +180 -0
  8. lusid/api/{fund_configurations_api.py → fund_configuration_entities_api.py} +1 -1
  9. lusid/api/group_reconciliations_api.py +1418 -27
  10. lusid/api/instruments_api.py +6 -6
  11. lusid/api/legal_entities_api.py +4 -4
  12. lusid/api/order_graph_api.py +4 -4
  13. lusid/api/order_management_api.py +25 -12
  14. lusid/api/persons_api.py +4 -4
  15. lusid/api/portfolios_api.py +27 -30
  16. lusid/api/reference_lists_api.py +2 -2
  17. lusid/api/reference_portfolio_api.py +176 -0
  18. lusid/api/transaction_portfolios_api.py +2 -2
  19. lusid/configuration.py +1 -1
  20. lusid/models/__init__.py +42 -10
  21. lusid/models/access_metadata_value.py +1 -1
  22. lusid/models/address_key_list.py +3 -3
  23. lusid/models/amount.py +69 -0
  24. lusid/models/batch_upsert_portfolio_access_metadata_request.py +27 -17
  25. lusid/models/batch_upsert_portfolio_access_metadata_response.py +56 -16
  26. lusid/models/{metadata_key_value.py → batch_upsert_portfolio_access_metadata_response_item.py} +15 -9
  27. lusid/models/{component_rule.py → break_code_source.py} +17 -21
  28. lusid/models/change_interval_with_order_management_detail.py +137 -0
  29. lusid/models/create_group_reconciliation_definition_request.py +113 -0
  30. lusid/models/custom_entity_entity.py +146 -0
  31. lusid/models/decimal_list.py +3 -3
  32. lusid/models/diary_entry_request.py +10 -1
  33. lusid/models/fixed_schedule.py +3 -3
  34. lusid/models/float_schedule.py +4 -4
  35. lusid/models/flow_conventions.py +7 -1
  36. lusid/models/fund_configuration.py +44 -17
  37. lusid/models/fund_configuration_request.py +31 -19
  38. lusid/models/fund_id_list.py +99 -0
  39. lusid/models/group_reconciliation_aggregate_attribute_rule.py +2 -2
  40. lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +1 -1
  41. lusid/models/group_reconciliation_core_comparison_rule_operand.py +1 -1
  42. lusid/models/group_reconciliation_definition.py +136 -0
  43. lusid/models/group_reconciliation_definition_comparison_ruleset_ids.py +83 -0
  44. lusid/models/group_reconciliation_definition_currencies.py +71 -0
  45. lusid/models/group_reconciliation_definition_portfolio_entity_ids.py +86 -0
  46. lusid/models/group_reconciliation_definition_recipe_ids.py +78 -0
  47. lusid/models/instrument.py +7 -1
  48. lusid/models/instrument_definition.py +8 -2
  49. lusid/models/instrument_list.py +3 -3
  50. lusid/models/market_data_key_rule.py +5 -3
  51. lusid/models/market_data_specific_rule.py +5 -3
  52. lusid/models/merger_event.py +19 -19
  53. lusid/models/output_transaction.py +9 -2
  54. lusid/models/paged_resource_list_of_group_reconciliation_comparison_ruleset.py +113 -0
  55. lusid/models/paged_resource_list_of_group_reconciliation_definition.py +113 -0
  56. lusid/models/portfolio_group_id_list.py +3 -3
  57. lusid/models/portfolio_id_list.py +3 -3
  58. lusid/models/property_list.py +3 -3
  59. lusid/models/reference_list.py +6 -5
  60. lusid/models/reference_list_type.py +1 -0
  61. lusid/models/{resource_list_of_entity_change_item.py → resource_list_of_change_interval_with_order_management_detail.py} +11 -11
  62. lusid/models/settlement_cycle.py +79 -0
  63. lusid/models/share_class_dealing_breakdown.py +3 -2
  64. lusid/models/stock_dividend_event.py +17 -3
  65. lusid/models/string_list.py +3 -3
  66. lusid/models/transaction.py +9 -2
  67. lusid/models/transaction_date_windows.py +85 -0
  68. lusid/models/transaction_request.py +9 -2
  69. lusid/models/update_group_reconciliation_comparison_ruleset_request.py +91 -0
  70. lusid/models/update_group_reconciliation_definition_request.py +107 -0
  71. lusid/models/upsert_reference_portfolio_constituent_properties_request.py +84 -0
  72. lusid/models/upsert_reference_portfolio_constituent_properties_response.py +115 -0
  73. {lusid_sdk-2.1.401.dist-info → lusid_sdk-2.1.423.dist-info}/METADATA +54 -27
  74. {lusid_sdk-2.1.401.dist-info → lusid_sdk-2.1.423.dist-info}/RECORD +75 -59
  75. lusid/models/entity_change_item.py +0 -121
  76. lusid/models/metadata_key_value_response.py +0 -86
  77. {lusid_sdk-2.1.401.dist-info → lusid_sdk-2.1.423.dist-info}/WHEEL +0 -0
@@ -18,16 +18,18 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict
22
- from pydantic.v1 import BaseModel, Field
23
- from lusid.models.metadata_key_value import MetadataKeyValue
21
+ from typing import Any, Dict, List
22
+ from pydantic.v1 import BaseModel, Field, conlist
23
+ from lusid.models.access_metadata_value import AccessMetadataValue
24
+ from lusid.models.resource_id import ResourceId
24
25
 
25
26
  class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
26
27
  """
27
28
  BatchUpsertPortfolioAccessMetadataRequest
28
29
  """
29
- portfolios_with_metadata: Dict[str, MetadataKeyValue] = Field(..., alias="portfoliosWithMetadata", description="The set of portfolios with the access control metadata")
30
- __properties = ["portfoliosWithMetadata"]
30
+ portfolio_id: ResourceId = Field(..., alias="portfolioId")
31
+ metadata: Dict[str, conlist(AccessMetadataValue)] = Field(...)
32
+ __properties = ["portfolioId", "metadata"]
31
33
 
32
34
  class Config:
33
35
  """Pydantic configuration"""
@@ -53,13 +55,18 @@ class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
53
55
  exclude={
54
56
  },
55
57
  exclude_none=True)
56
- # override the default output from pydantic by calling `to_dict()` of each value in portfolios_with_metadata (dict)
57
- _field_dict = {}
58
- if self.portfolios_with_metadata:
59
- for _key in self.portfolios_with_metadata:
60
- if self.portfolios_with_metadata[_key]:
61
- _field_dict[_key] = self.portfolios_with_metadata[_key].to_dict()
62
- _dict['portfoliosWithMetadata'] = _field_dict
58
+ # override the default output from pydantic by calling `to_dict()` of portfolio_id
59
+ if self.portfolio_id:
60
+ _dict['portfolioId'] = self.portfolio_id.to_dict()
61
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
62
+ _field_dict_of_array = {}
63
+ if self.metadata:
64
+ for _key in self.metadata:
65
+ if self.metadata[_key]:
66
+ _field_dict_of_array[_key] = [
67
+ _item.to_dict() for _item in self.metadata[_key]
68
+ ]
69
+ _dict['metadata'] = _field_dict_of_array
63
70
  return _dict
64
71
 
65
72
  @classmethod
@@ -72,11 +79,14 @@ class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
72
79
  return BatchUpsertPortfolioAccessMetadataRequest.parse_obj(obj)
73
80
 
74
81
  _obj = BatchUpsertPortfolioAccessMetadataRequest.parse_obj({
75
- "portfolios_with_metadata": dict(
76
- (_k, MetadataKeyValue.from_dict(_v))
77
- for _k, _v in obj.get("portfoliosWithMetadata").items()
82
+ "portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
83
+ "metadata": dict(
84
+ (_k,
85
+ [AccessMetadataValue.from_dict(_item) for _item in _v]
86
+ if _v is not None
87
+ else None
88
+ )
89
+ for _k, _v in obj.get("metadata").items()
78
90
  )
79
- if obj.get("portfoliosWithMetadata") is not None
80
- else None
81
91
  })
82
92
  return _obj
@@ -18,16 +18,20 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict
22
- from pydantic.v1 import BaseModel, Field
23
- from lusid.models.metadata_key_value_response import MetadataKeyValueResponse
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, conlist
23
+ from lusid.models.batch_upsert_portfolio_access_metadata_response_item import BatchUpsertPortfolioAccessMetadataResponseItem
24
+ from lusid.models.error_detail import ErrorDetail
25
+ from lusid.models.link import Link
24
26
 
25
27
  class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
26
28
  """
27
29
  BatchUpsertPortfolioAccessMetadataResponse
28
30
  """
29
- portfolios_with_metadata: Dict[str, MetadataKeyValueResponse] = Field(..., alias="portfoliosWithMetadata", description="The set of portfolios with the access control metadata")
30
- __properties = ["portfoliosWithMetadata"]
31
+ values: Optional[Dict[str, BatchUpsertPortfolioAccessMetadataResponseItem]] = Field(None, description="The items have been successfully updated or created.")
32
+ failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The items that could not be updated or created along with a reason for their failure.")
33
+ links: Optional[conlist(Link)] = None
34
+ __properties = ["values", "failed", "links"]
31
35
 
32
36
  class Config:
33
37
  """Pydantic configuration"""
@@ -53,13 +57,42 @@ class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
53
57
  exclude={
54
58
  },
55
59
  exclude_none=True)
56
- # override the default output from pydantic by calling `to_dict()` of each value in portfolios_with_metadata (dict)
60
+ # override the default output from pydantic by calling `to_dict()` of each value in values (dict)
57
61
  _field_dict = {}
58
- if self.portfolios_with_metadata:
59
- for _key in self.portfolios_with_metadata:
60
- if self.portfolios_with_metadata[_key]:
61
- _field_dict[_key] = self.portfolios_with_metadata[_key].to_dict()
62
- _dict['portfoliosWithMetadata'] = _field_dict
62
+ if self.values:
63
+ for _key in self.values:
64
+ if self.values[_key]:
65
+ _field_dict[_key] = self.values[_key].to_dict()
66
+ _dict['values'] = _field_dict
67
+ # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
68
+ _field_dict = {}
69
+ if self.failed:
70
+ for _key in self.failed:
71
+ if self.failed[_key]:
72
+ _field_dict[_key] = self.failed[_key].to_dict()
73
+ _dict['failed'] = _field_dict
74
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
75
+ _items = []
76
+ if self.links:
77
+ for _item in self.links:
78
+ if _item:
79
+ _items.append(_item.to_dict())
80
+ _dict['links'] = _items
81
+ # set to None if values (nullable) is None
82
+ # and __fields_set__ contains the field
83
+ if self.values is None and "values" in self.__fields_set__:
84
+ _dict['values'] = None
85
+
86
+ # set to None if failed (nullable) is None
87
+ # and __fields_set__ contains the field
88
+ if self.failed is None and "failed" in self.__fields_set__:
89
+ _dict['failed'] = None
90
+
91
+ # set to None if links (nullable) is None
92
+ # and __fields_set__ contains the field
93
+ if self.links is None and "links" in self.__fields_set__:
94
+ _dict['links'] = None
95
+
63
96
  return _dict
64
97
 
65
98
  @classmethod
@@ -72,11 +105,18 @@ class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
72
105
  return BatchUpsertPortfolioAccessMetadataResponse.parse_obj(obj)
73
106
 
74
107
  _obj = BatchUpsertPortfolioAccessMetadataResponse.parse_obj({
75
- "portfolios_with_metadata": dict(
76
- (_k, MetadataKeyValueResponse.from_dict(_v))
77
- for _k, _v in obj.get("portfoliosWithMetadata").items()
108
+ "values": dict(
109
+ (_k, BatchUpsertPortfolioAccessMetadataResponseItem.from_dict(_v))
110
+ for _k, _v in obj.get("values").items()
111
+ )
112
+ if obj.get("values") is not None
113
+ else None,
114
+ "failed": dict(
115
+ (_k, ErrorDetail.from_dict(_v))
116
+ for _k, _v in obj.get("failed").items()
78
117
  )
79
- if obj.get("portfoliosWithMetadata") is not None
80
- else None
118
+ if obj.get("failed") is not None
119
+ else None,
120
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
81
121
  })
82
122
  return _obj
@@ -21,13 +21,15 @@ import json
21
21
  from typing import Any, Dict, List
22
22
  from pydantic.v1 import BaseModel, Field, conlist
23
23
  from lusid.models.access_metadata_value import AccessMetadataValue
24
+ from lusid.models.resource_id import ResourceId
24
25
 
25
- class MetadataKeyValue(BaseModel):
26
+ class BatchUpsertPortfolioAccessMetadataResponseItem(BaseModel):
26
27
  """
27
- MetadataKeyValue
28
+ BatchUpsertPortfolioAccessMetadataResponseItem
28
29
  """
30
+ portfolio_id: ResourceId = Field(..., alias="portfolioId")
29
31
  metadata: Dict[str, conlist(AccessMetadataValue)] = Field(...)
30
- __properties = ["metadata"]
32
+ __properties = ["portfolioId", "metadata"]
31
33
 
32
34
  class Config:
33
35
  """Pydantic configuration"""
@@ -43,8 +45,8 @@ class MetadataKeyValue(BaseModel):
43
45
  return json.dumps(self.to_dict())
44
46
 
45
47
  @classmethod
46
- def from_json(cls, json_str: str) -> MetadataKeyValue:
47
- """Create an instance of MetadataKeyValue from a JSON string"""
48
+ def from_json(cls, json_str: str) -> BatchUpsertPortfolioAccessMetadataResponseItem:
49
+ """Create an instance of BatchUpsertPortfolioAccessMetadataResponseItem from a JSON string"""
48
50
  return cls.from_dict(json.loads(json_str))
49
51
 
50
52
  def to_dict(self):
@@ -53,6 +55,9 @@ class MetadataKeyValue(BaseModel):
53
55
  exclude={
54
56
  },
55
57
  exclude_none=True)
58
+ # override the default output from pydantic by calling `to_dict()` of portfolio_id
59
+ if self.portfolio_id:
60
+ _dict['portfolioId'] = self.portfolio_id.to_dict()
56
61
  # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
57
62
  _field_dict_of_array = {}
58
63
  if self.metadata:
@@ -65,15 +70,16 @@ class MetadataKeyValue(BaseModel):
65
70
  return _dict
66
71
 
67
72
  @classmethod
68
- def from_dict(cls, obj: dict) -> MetadataKeyValue:
69
- """Create an instance of MetadataKeyValue from a dict"""
73
+ def from_dict(cls, obj: dict) -> BatchUpsertPortfolioAccessMetadataResponseItem:
74
+ """Create an instance of BatchUpsertPortfolioAccessMetadataResponseItem from a dict"""
70
75
  if obj is None:
71
76
  return None
72
77
 
73
78
  if not isinstance(obj, dict):
74
- return MetadataKeyValue.parse_obj(obj)
79
+ return BatchUpsertPortfolioAccessMetadataResponseItem.parse_obj(obj)
75
80
 
76
- _obj = MetadataKeyValue.parse_obj({
81
+ _obj = BatchUpsertPortfolioAccessMetadataResponseItem.parse_obj({
82
+ "portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
77
83
  "metadata": dict(
78
84
  (_k,
79
85
  [AccessMetadataValue.from_dict(_item) for _item in _v]
@@ -18,16 +18,16 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict, List, Optional
22
- from pydantic.v1 import BaseModel, conlist
23
- from lusid.models.component_filter import ComponentFilter
21
+ from typing import Any, Dict
22
+ from pydantic.v1 import BaseModel, Field
23
+ from lusid.models.resource_id import ResourceId
24
24
 
25
- class ComponentRule(BaseModel):
25
+ class BreakCodeSource(BaseModel):
26
26
  """
27
- ComponentRule
27
+ BreakCodeSource
28
28
  """
29
- components: Optional[conlist(ComponentFilter)] = None
30
- __properties = ["components"]
29
+ data_type_id: ResourceId = Field(..., alias="dataTypeId")
30
+ __properties = ["dataTypeId"]
31
31
 
32
32
  class Config:
33
33
  """Pydantic configuration"""
@@ -43,8 +43,8 @@ class ComponentRule(BaseModel):
43
43
  return json.dumps(self.to_dict())
44
44
 
45
45
  @classmethod
46
- def from_json(cls, json_str: str) -> ComponentRule:
47
- """Create an instance of ComponentRule from a JSON string"""
46
+ def from_json(cls, json_str: str) -> BreakCodeSource:
47
+ """Create an instance of BreakCodeSource from a JSON string"""
48
48
  return cls.from_dict(json.loads(json_str))
49
49
 
50
50
  def to_dict(self):
@@ -53,25 +53,21 @@ class ComponentRule(BaseModel):
53
53
  exclude={
54
54
  },
55
55
  exclude_none=True)
56
- # override the default output from pydantic by calling `to_dict()` of each item in components (list)
57
- _items = []
58
- if self.components:
59
- for _item in self.components:
60
- if _item:
61
- _items.append(_item.to_dict())
62
- _dict['components'] = _items
56
+ # override the default output from pydantic by calling `to_dict()` of data_type_id
57
+ if self.data_type_id:
58
+ _dict['dataTypeId'] = self.data_type_id.to_dict()
63
59
  return _dict
64
60
 
65
61
  @classmethod
66
- def from_dict(cls, obj: dict) -> ComponentRule:
67
- """Create an instance of ComponentRule from a dict"""
62
+ def from_dict(cls, obj: dict) -> BreakCodeSource:
63
+ """Create an instance of BreakCodeSource from a dict"""
68
64
  if obj is None:
69
65
  return None
70
66
 
71
67
  if not isinstance(obj, dict):
72
- return ComponentRule.parse_obj(obj)
68
+ return BreakCodeSource.parse_obj(obj)
73
69
 
74
- _obj = ComponentRule.parse_obj({
75
- "components": [ComponentFilter.from_dict(_item) for _item in obj.get("components")] if obj.get("components") is not None else None
70
+ _obj = BreakCodeSource.parse_obj({
71
+ "data_type_id": ResourceId.from_dict(obj.get("dataTypeId")) if obj.get("dataTypeId") is not None else None
76
72
  })
77
73
  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
+ from datetime import datetime
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr
23
+ from lusid.models.property_value import PropertyValue
24
+ from lusid.models.staged_modification_effective_range import StagedModificationEffectiveRange
25
+
26
+ class ChangeIntervalWithOrderManagementDetail(BaseModel):
27
+ """
28
+ Defines a change that occured for an entity, with extra detail about the change # noqa: E501
29
+ """
30
+ detail: Optional[Dict[str, StrictStr]] = Field(None, description="Information about the particular instance of the ChangeInterval (supplied information depends on the type of Action). Contains extra detail for order management actions such as related entity ids and compliance run details.")
31
+ action_description: Optional[StrictStr] = Field(None, alias="actionDescription", description="Description of the action performed on the entity.")
32
+ as_at_modified: Optional[datetime] = Field(None, alias="asAtModified", description="The date/time of the change.")
33
+ user_id_modified: Optional[StrictStr] = Field(None, alias="userIdModified", description="The unique identifier of the user that made the change.")
34
+ request_id_modified: Optional[StrictStr] = Field(None, alias="requestIdModified", description="The unique identifier of the request that the changes were part of.")
35
+ as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The version number for the entity (the entity was created at version 1). This may refer to the version number of a changed related entity, not a change for the entity itself.")
36
+ staged_modification_id_modified: Optional[StrictStr] = Field(None, alias="stagedModificationIdModified", description="The id of the staged modification that was approved. Will be null if the change didn't come from a staged modification.")
37
+ action: Optional[StrictStr] = Field(None, description="The action performed on the entity.")
38
+ attribute_name: Optional[StrictStr] = Field(None, alias="attributeName", description="The name of the field or property that has been changed.")
39
+ previous_value: Optional[PropertyValue] = Field(None, alias="previousValue")
40
+ new_value: Optional[PropertyValue] = Field(None, alias="newValue")
41
+ effective_range: Optional[StagedModificationEffectiveRange] = Field(None, alias="effectiveRange")
42
+ __properties = ["detail", "actionDescription", "asAtModified", "userIdModified", "requestIdModified", "asAtVersionNumber", "stagedModificationIdModified", "action", "attributeName", "previousValue", "newValue", "effectiveRange"]
43
+
44
+ class Config:
45
+ """Pydantic configuration"""
46
+ allow_population_by_field_name = True
47
+ validate_assignment = True
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.dict(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> ChangeIntervalWithOrderManagementDetail:
59
+ """Create an instance of ChangeIntervalWithOrderManagementDetail from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self):
63
+ """Returns the dictionary representation of the model using alias"""
64
+ _dict = self.dict(by_alias=True,
65
+ exclude={
66
+ },
67
+ exclude_none=True)
68
+ # override the default output from pydantic by calling `to_dict()` of previous_value
69
+ if self.previous_value:
70
+ _dict['previousValue'] = self.previous_value.to_dict()
71
+ # override the default output from pydantic by calling `to_dict()` of new_value
72
+ if self.new_value:
73
+ _dict['newValue'] = self.new_value.to_dict()
74
+ # override the default output from pydantic by calling `to_dict()` of effective_range
75
+ if self.effective_range:
76
+ _dict['effectiveRange'] = self.effective_range.to_dict()
77
+ # set to None if detail (nullable) is None
78
+ # and __fields_set__ contains the field
79
+ if self.detail is None and "detail" in self.__fields_set__:
80
+ _dict['detail'] = None
81
+
82
+ # set to None if action_description (nullable) is None
83
+ # and __fields_set__ contains the field
84
+ if self.action_description is None and "action_description" in self.__fields_set__:
85
+ _dict['actionDescription'] = None
86
+
87
+ # set to None if user_id_modified (nullable) is None
88
+ # and __fields_set__ contains the field
89
+ if self.user_id_modified is None and "user_id_modified" in self.__fields_set__:
90
+ _dict['userIdModified'] = None
91
+
92
+ # set to None if request_id_modified (nullable) is None
93
+ # and __fields_set__ contains the field
94
+ if self.request_id_modified is None and "request_id_modified" in self.__fields_set__:
95
+ _dict['requestIdModified'] = None
96
+
97
+ # set to None if staged_modification_id_modified (nullable) is None
98
+ # and __fields_set__ contains the field
99
+ if self.staged_modification_id_modified is None and "staged_modification_id_modified" in self.__fields_set__:
100
+ _dict['stagedModificationIdModified'] = None
101
+
102
+ # set to None if action (nullable) is None
103
+ # and __fields_set__ contains the field
104
+ if self.action is None and "action" in self.__fields_set__:
105
+ _dict['action'] = None
106
+
107
+ # set to None if attribute_name (nullable) is None
108
+ # and __fields_set__ contains the field
109
+ if self.attribute_name is None and "attribute_name" in self.__fields_set__:
110
+ _dict['attributeName'] = None
111
+
112
+ return _dict
113
+
114
+ @classmethod
115
+ def from_dict(cls, obj: dict) -> ChangeIntervalWithOrderManagementDetail:
116
+ """Create an instance of ChangeIntervalWithOrderManagementDetail from a dict"""
117
+ if obj is None:
118
+ return None
119
+
120
+ if not isinstance(obj, dict):
121
+ return ChangeIntervalWithOrderManagementDetail.parse_obj(obj)
122
+
123
+ _obj = ChangeIntervalWithOrderManagementDetail.parse_obj({
124
+ "detail": obj.get("detail"),
125
+ "action_description": obj.get("actionDescription"),
126
+ "as_at_modified": obj.get("asAtModified"),
127
+ "user_id_modified": obj.get("userIdModified"),
128
+ "request_id_modified": obj.get("requestIdModified"),
129
+ "as_at_version_number": obj.get("asAtVersionNumber"),
130
+ "staged_modification_id_modified": obj.get("stagedModificationIdModified"),
131
+ "action": obj.get("action"),
132
+ "attribute_name": obj.get("attributeName"),
133
+ "previous_value": PropertyValue.from_dict(obj.get("previousValue")) if obj.get("previousValue") is not None else None,
134
+ "new_value": PropertyValue.from_dict(obj.get("newValue")) if obj.get("newValue") is not None else None,
135
+ "effective_range": StagedModificationEffectiveRange.from_dict(obj.get("effectiveRange")) if obj.get("effectiveRange") is not None else None
136
+ })
137
+ 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, Optional
22
+ from pydantic.v1 import BaseModel, Field, constr
23
+ from lusid.models.break_code_source import BreakCodeSource
24
+ from lusid.models.group_reconciliation_definition_comparison_ruleset_ids import GroupReconciliationDefinitionComparisonRulesetIds
25
+ from lusid.models.group_reconciliation_definition_currencies import GroupReconciliationDefinitionCurrencies
26
+ from lusid.models.group_reconciliation_definition_portfolio_entity_ids import GroupReconciliationDefinitionPortfolioEntityIds
27
+ from lusid.models.group_reconciliation_definition_recipe_ids import GroupReconciliationDefinitionRecipeIds
28
+ from lusid.models.resource_id import ResourceId
29
+ from lusid.models.transaction_date_windows import TransactionDateWindows
30
+
31
+ class CreateGroupReconciliationDefinitionRequest(BaseModel):
32
+ """
33
+ CreateGroupReconciliationDefinitionRequest
34
+ """
35
+ id: Optional[ResourceId] = None
36
+ display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The name of the Group Reconciliation Definition")
37
+ description: constr(strict=True, min_length=1) = Field(..., description="The description of the Group Reconciliation Definition")
38
+ portfolio_entity_ids: GroupReconciliationDefinitionPortfolioEntityIds = Field(..., alias="portfolioEntityIds")
39
+ recipe_ids: Optional[GroupReconciliationDefinitionRecipeIds] = Field(None, alias="recipeIds")
40
+ currencies: Optional[GroupReconciliationDefinitionCurrencies] = None
41
+ transaction_date_windows: Optional[TransactionDateWindows] = Field(None, alias="transactionDateWindows")
42
+ comparison_ruleset_ids: Optional[GroupReconciliationDefinitionComparisonRulesetIds] = Field(None, alias="comparisonRulesetIds")
43
+ break_code_source: BreakCodeSource = Field(..., alias="breakCodeSource")
44
+ __properties = ["id", "displayName", "description", "portfolioEntityIds", "recipeIds", "currencies", "transactionDateWindows", "comparisonRulesetIds", "breakCodeSource"]
45
+
46
+ class Config:
47
+ """Pydantic configuration"""
48
+ allow_population_by_field_name = True
49
+ validate_assignment = True
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) -> CreateGroupReconciliationDefinitionRequest:
61
+ """Create an instance of CreateGroupReconciliationDefinitionRequest 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 id
71
+ if self.id:
72
+ _dict['id'] = self.id.to_dict()
73
+ # override the default output from pydantic by calling `to_dict()` of portfolio_entity_ids
74
+ if self.portfolio_entity_ids:
75
+ _dict['portfolioEntityIds'] = self.portfolio_entity_ids.to_dict()
76
+ # override the default output from pydantic by calling `to_dict()` of recipe_ids
77
+ if self.recipe_ids:
78
+ _dict['recipeIds'] = self.recipe_ids.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of currencies
80
+ if self.currencies:
81
+ _dict['currencies'] = self.currencies.to_dict()
82
+ # override the default output from pydantic by calling `to_dict()` of transaction_date_windows
83
+ if self.transaction_date_windows:
84
+ _dict['transactionDateWindows'] = self.transaction_date_windows.to_dict()
85
+ # override the default output from pydantic by calling `to_dict()` of comparison_ruleset_ids
86
+ if self.comparison_ruleset_ids:
87
+ _dict['comparisonRulesetIds'] = self.comparison_ruleset_ids.to_dict()
88
+ # override the default output from pydantic by calling `to_dict()` of break_code_source
89
+ if self.break_code_source:
90
+ _dict['breakCodeSource'] = self.break_code_source.to_dict()
91
+ return _dict
92
+
93
+ @classmethod
94
+ def from_dict(cls, obj: dict) -> CreateGroupReconciliationDefinitionRequest:
95
+ """Create an instance of CreateGroupReconciliationDefinitionRequest from a dict"""
96
+ if obj is None:
97
+ return None
98
+
99
+ if not isinstance(obj, dict):
100
+ return CreateGroupReconciliationDefinitionRequest.parse_obj(obj)
101
+
102
+ _obj = CreateGroupReconciliationDefinitionRequest.parse_obj({
103
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
104
+ "display_name": obj.get("displayName"),
105
+ "description": obj.get("description"),
106
+ "portfolio_entity_ids": GroupReconciliationDefinitionPortfolioEntityIds.from_dict(obj.get("portfolioEntityIds")) if obj.get("portfolioEntityIds") is not None else None,
107
+ "recipe_ids": GroupReconciliationDefinitionRecipeIds.from_dict(obj.get("recipeIds")) if obj.get("recipeIds") is not None else None,
108
+ "currencies": GroupReconciliationDefinitionCurrencies.from_dict(obj.get("currencies")) if obj.get("currencies") is not None else None,
109
+ "transaction_date_windows": TransactionDateWindows.from_dict(obj.get("transactionDateWindows")) if obj.get("transactionDateWindows") is not None else None,
110
+ "comparison_ruleset_ids": GroupReconciliationDefinitionComparisonRulesetIds.from_dict(obj.get("comparisonRulesetIds")) if obj.get("comparisonRulesetIds") is not None else None,
111
+ "break_code_source": BreakCodeSource.from_dict(obj.get("breakCodeSource")) if obj.get("breakCodeSource") is not None else None
112
+ })
113
+ return _obj