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
@@ -0,0 +1,146 @@
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, constr
23
+ from lusid.models.custom_entity_response import CustomEntityResponse
24
+ from lusid.models.link import Link
25
+
26
+ class CustomEntityEntity(BaseModel):
27
+ """
28
+ CustomEntityEntity
29
+ """
30
+ href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
31
+ entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
32
+ as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
33
+ status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
34
+ as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
35
+ user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
36
+ request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
37
+ effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
38
+ prevailing_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="prevailingCustomEntity")
39
+ deleted_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="deletedCustomEntity")
40
+ previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
41
+ previewed_custom_entity: Optional[CustomEntityResponse] = Field(None, alias="previewedCustomEntity")
42
+ links: Optional[conlist(Link)] = None
43
+ __properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingCustomEntity", "deletedCustomEntity", "previewedStatus", "previewedCustomEntity", "links"]
44
+
45
+ class Config:
46
+ """Pydantic configuration"""
47
+ allow_population_by_field_name = True
48
+ validate_assignment = True
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> CustomEntityEntity:
60
+ """Create an instance of CustomEntityEntity from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True,
66
+ exclude={
67
+ },
68
+ exclude_none=True)
69
+ # override the default output from pydantic by calling `to_dict()` of prevailing_custom_entity
70
+ if self.prevailing_custom_entity:
71
+ _dict['prevailingCustomEntity'] = self.prevailing_custom_entity.to_dict()
72
+ # override the default output from pydantic by calling `to_dict()` of deleted_custom_entity
73
+ if self.deleted_custom_entity:
74
+ _dict['deletedCustomEntity'] = self.deleted_custom_entity.to_dict()
75
+ # override the default output from pydantic by calling `to_dict()` of previewed_custom_entity
76
+ if self.previewed_custom_entity:
77
+ _dict['previewedCustomEntity'] = self.previewed_custom_entity.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
79
+ _items = []
80
+ if self.links:
81
+ for _item in self.links:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['links'] = _items
85
+ # set to None if as_at_version_number (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
88
+ _dict['asAtVersionNumber'] = None
89
+
90
+ # set to None if as_at_deleted (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
93
+ _dict['asAtDeleted'] = None
94
+
95
+ # set to None if user_id_deleted (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
98
+ _dict['userIdDeleted'] = None
99
+
100
+ # set to None if request_id_deleted (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
103
+ _dict['requestIdDeleted'] = None
104
+
105
+ # set to None if effective_at_created (nullable) is None
106
+ # and __fields_set__ contains the field
107
+ if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
108
+ _dict['effectiveAtCreated'] = None
109
+
110
+ # set to None if previewed_status (nullable) is None
111
+ # and __fields_set__ contains the field
112
+ if self.previewed_status is None and "previewed_status" in self.__fields_set__:
113
+ _dict['previewedStatus'] = None
114
+
115
+ # set to None if links (nullable) is None
116
+ # and __fields_set__ contains the field
117
+ if self.links is None and "links" in self.__fields_set__:
118
+ _dict['links'] = None
119
+
120
+ return _dict
121
+
122
+ @classmethod
123
+ def from_dict(cls, obj: dict) -> CustomEntityEntity:
124
+ """Create an instance of CustomEntityEntity from a dict"""
125
+ if obj is None:
126
+ return None
127
+
128
+ if not isinstance(obj, dict):
129
+ return CustomEntityEntity.parse_obj(obj)
130
+
131
+ _obj = CustomEntityEntity.parse_obj({
132
+ "href": obj.get("href"),
133
+ "entity_unique_id": obj.get("entityUniqueId"),
134
+ "as_at_version_number": obj.get("asAtVersionNumber"),
135
+ "status": obj.get("status"),
136
+ "as_at_deleted": obj.get("asAtDeleted"),
137
+ "user_id_deleted": obj.get("userIdDeleted"),
138
+ "request_id_deleted": obj.get("requestIdDeleted"),
139
+ "effective_at_created": obj.get("effectiveAtCreated"),
140
+ "prevailing_custom_entity": CustomEntityResponse.from_dict(obj.get("prevailingCustomEntity")) if obj.get("prevailingCustomEntity") is not None else None,
141
+ "deleted_custom_entity": CustomEntityResponse.from_dict(obj.get("deletedCustomEntity")) if obj.get("deletedCustomEntity") is not None else None,
142
+ "previewed_status": obj.get("previewedStatus"),
143
+ "previewed_custom_entity": CustomEntityResponse.from_dict(obj.get("previewedCustomEntity")) if obj.get("previewedCustomEntity") is not None else None,
144
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
145
+ })
146
+ return _obj
@@ -27,15 +27,15 @@ class DecimalList(ReferenceList):
27
27
  DecimalList
28
28
  """
29
29
  values: conlist(Union[StrictFloat, StrictInt], max_items=100, min_items=0) = Field(...)
30
- reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList")
30
+ reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["referenceListType", "values"]
33
33
 
34
34
  @validator('reference_list_type')
35
35
  def reference_list_type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList'):
38
- raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList')")
37
+ if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
38
+ raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
39
39
  return value
40
40
 
41
41
  class Config:
@@ -26,12 +26,20 @@ class DiaryEntryRequest(BaseModel):
26
26
  """
27
27
  The request to add a diary entry # noqa: E501
28
28
  """
29
+ diary_entry_code: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="diaryEntryCode", description="The code of the diary entry.")
29
30
  name: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The name of the diary entry.")
30
31
  status: Optional[StrictStr] = Field(None, description="The status of a Diary Entry of Type 'Other'. Defaults to 'Undefined' and supports 'Undefined', 'Estimate', 'Candidate', and 'Final'.")
31
32
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective time of the diary entry.")
32
33
  query_as_at: Optional[datetime] = Field(None, alias="queryAsAt", description="The query time of the diary entry. Defaults to latest.")
33
34
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the diary entry.")
34
- __properties = ["name", "status", "effectiveAt", "queryAsAt", "properties"]
35
+ __properties = ["diaryEntryCode", "name", "status", "effectiveAt", "queryAsAt", "properties"]
36
+
37
+ @validator('diary_entry_code')
38
+ def diary_entry_code_validate_regular_expression(cls, value):
39
+ """Validates the regular expression"""
40
+ if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
41
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
42
+ return value
35
43
 
36
44
  @validator('name')
37
45
  def name_validate_regular_expression(cls, value):
@@ -106,6 +114,7 @@ class DiaryEntryRequest(BaseModel):
106
114
  return DiaryEntryRequest.parse_obj(obj)
107
115
 
108
116
  _obj = DiaryEntryRequest.parse_obj({
117
+ "diary_entry_code": obj.get("diaryEntryCode"),
109
118
  "name": obj.get("name"),
110
119
  "status": obj.get("status"),
111
120
  "effective_at": obj.get("effectiveAt"),
@@ -29,15 +29,15 @@ class FixedSchedule(Schedule):
29
29
  """
30
30
  Schedule for fixed coupon payments # noqa: E501
31
31
  """
32
- start_date: datetime = Field(..., alias="startDate", description="Date to start generate from")
33
- maturity_date: datetime = Field(..., alias="maturityDate", description="Date to generate to")
32
+ start_date: datetime = Field(..., alias="startDate", description="Date from which LUSID starts generating the payment schedule.")
33
+ maturity_date: datetime = Field(..., alias="maturityDate", description="Last date of the payment generation schedule. May not necessarily be the maturity date of the underlying instrument (e.g. in case the instrument has multiple payment schedules).")
34
34
  flow_conventions: Optional[FlowConventions] = Field(None, alias="flowConventions")
35
35
  coupon_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="couponRate", description="Coupon rate given as a fraction.")
36
36
  convention_name: Optional[FlowConventionName] = Field(None, alias="conventionName")
37
37
  ex_dividend_days: Optional[StrictInt] = Field(None, alias="exDividendDays", description="Optional. Number of calendar days in the ex-dividend period. If the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. If set, this must be a non-negative number. If not set, or set to 0, then there is no ex-dividend period. NOTE: This field is deprecated. If you wish to set the ExDividendDays on a bond, please use the ExDividendConfiguration.")
38
38
  notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Scaling factor, the quantity outstanding on which the rate will be paid.")
39
39
  payment_currency: StrictStr = Field(..., alias="paymentCurrency", description="Payment currency. This does not have to be the same as the nominal bond or observation/reset currency.")
40
- stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="StubType required of the schedule Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both].")
40
+ stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="When a payment schedule doesn't have regular payment intervals just because of the first and/or last coupons of the schedule, we call those irregular coupons stubs. This configuration specifies what type of stub is used when building the schedule Supported values are: None = this is a regular payment schedule with no stubs. DO NOT use it with irregular schedules or you will get incorrect and unexpected behaviour. ShortFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is shorter than the regular payment period. ShortBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is shorter than the regular payment period. LongFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is longer than the regular payment period. LongBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is longer than the regular payment period. Both = this is an irregular payment schedule where both the first and the last coupons are irregular, and the length of these periods is calculated based on the first coupon payment date that should have been explicitly set.")
41
41
  ex_dividend_configuration: Optional[ExDividendConfiguration] = Field(None, alias="exDividendConfiguration")
42
42
  schedule_type: StrictStr = Field(..., alias="scheduleType", description="The available values are: FixedSchedule, FloatSchedule, OptionalitySchedule, StepSchedule, Exercise, FxRateSchedule, FxLinkedNotionalSchedule, BondConversionSchedule, Invalid")
43
43
  additional_properties: Dict[str, Any] = {}
@@ -29,10 +29,10 @@ from lusid.models.schedule import Schedule
29
29
 
30
30
  class FloatSchedule(Schedule):
31
31
  """
32
- Schedule for fixed coupon payments # noqa: E501
32
+ Schedule for floating rate coupon payments. # noqa: E501
33
33
  """
34
- start_date: Optional[datetime] = Field(None, alias="startDate", description="Date to start generate from")
35
- maturity_date: Optional[datetime] = Field(None, alias="maturityDate", description="Date to generate to")
34
+ start_date: Optional[datetime] = Field(None, alias="startDate", description="Date from which LUSID starts generating the payment schedule.")
35
+ maturity_date: Optional[datetime] = Field(None, alias="maturityDate", description="Last date of the payment generation schedule. May not necessarily be the maturity date of the underlying instrument (e.g. in case the instrument has multiple payment schedules).")
36
36
  flow_conventions: Optional[FlowConventions] = Field(None, alias="flowConventions")
37
37
  convention_name: Optional[FlowConventionName] = Field(None, alias="conventionName")
38
38
  ex_dividend_days: Optional[StrictInt] = Field(None, alias="exDividendDays", description="Optional. Number of calendar days in the ex-dividend period. If the settlement date falls in the ex-dividend period then the coupon paid is zero and the accrued interest is negative. If set, this must be a non-negative number. If not set, or set to 0, then there is no ex-dividend period. NOTE: This field is deprecated. If you wish to set the ExDividendDays on a bond, please use the ExDividendConfiguration.")
@@ -41,7 +41,7 @@ class FloatSchedule(Schedule):
41
41
  notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Scaling factor, the quantity outstanding on which the rate will be paid.")
42
42
  payment_currency: StrictStr = Field(..., alias="paymentCurrency", description="Payment currency. This does not have to be the same as the nominal bond or observation/reset currency.")
43
43
  spread: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Spread over floating rate given as a fraction.")
44
- stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="StubType required of the schedule Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both].")
44
+ stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="When a payment schedule doesn't have regular payment intervals just because of the first and/or last coupons of the schedule, we call those irregular coupons stubs. This configuration specifies what type of stub is used when building the schedule Supported values are: None = this is a regular payment schedule with no stubs. DO NOT use it with irregular schedules or you will get incorrect and unexpected behaviour. ShortFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is shorter than the regular payment period. ShortBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is shorter than the regular payment period. LongFront = this is an irregular payment schedule where only the first coupon is irregular, and covers a payment period that is longer than the regular payment period. LongBack = this is an irregular payment schedule where only the last coupon is irregular, and covers a payment period that is longer than the regular payment period. Both = this is an irregular payment schedule where both the first and the last coupons are irregular, and the length of these periods is calculated based on the first coupon payment date that should have been explicitly set.")
45
45
  ex_dividend_configuration: Optional[ExDividendConfiguration] = Field(None, alias="exDividendConfiguration")
46
46
  compounding: Optional[Compounding] = None
47
47
  reset_convention: Optional[constr(strict=True, max_length=16, min_length=0)] = Field(None, alias="resetConvention", description="Control how resets are generated relative to payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears].")
@@ -20,6 +20,7 @@ import json
20
20
 
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, constr, validator
23
+ from lusid.models.relative_date_offset import RelativeDateOffset
23
24
 
24
25
  class FlowConventions(BaseModel):
25
26
  """
@@ -37,9 +38,10 @@ class FlowConventions(BaseModel):
37
38
  accrual_date_adjustment: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDateAdjustment", description="Indicates if the accrual dates are adjusted using the business day convention. The default value is 'Adjusted'. Supported string (enumeration) values are: [Adjusted, Unadjusted].")
38
39
  business_day_convention: Optional[StrictStr] = Field(None, alias="businessDayConvention", description="When generating a set of dates, what convention should be used for adjusting dates that coincide with a non-business day. Supported string (enumeration) values are: [NoAdjustment, None, Previous, P, Following, F, ModifiedPrevious, MP, ModifiedFollowing, MF, HalfMonthModifiedFollowing, Nearest].")
39
40
  accrual_day_count_convention: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="accrualDayCountConvention", description="Optional, if not set the main DayCountConvention is used for all accrual calculations. This only needs to be set when accrual uses a different day count to the coupon calculation.")
41
+ coupon_payment_lag: Optional[RelativeDateOffset] = Field(None, alias="couponPaymentLag")
40
42
  scope: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The scope used when updating or inserting the convention.")
41
43
  code: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, description="The code of the convention.")
42
- __properties = ["currency", "paymentFrequency", "dayCountConvention", "rollConvention", "paymentCalendars", "resetCalendars", "settleDays", "resetDays", "leapDaysIncluded", "accrualDateAdjustment", "businessDayConvention", "accrualDayCountConvention", "scope", "code"]
44
+ __properties = ["currency", "paymentFrequency", "dayCountConvention", "rollConvention", "paymentCalendars", "resetCalendars", "settleDays", "resetDays", "leapDaysIncluded", "accrualDateAdjustment", "businessDayConvention", "accrualDayCountConvention", "couponPaymentLag", "scope", "code"]
43
45
 
44
46
  @validator('scope')
45
47
  def scope_validate_regular_expression(cls, value):
@@ -85,6 +87,9 @@ class FlowConventions(BaseModel):
85
87
  exclude={
86
88
  },
87
89
  exclude_none=True)
90
+ # override the default output from pydantic by calling `to_dict()` of coupon_payment_lag
91
+ if self.coupon_payment_lag:
92
+ _dict['couponPaymentLag'] = self.coupon_payment_lag.to_dict()
88
93
  # set to None if leap_days_included (nullable) is None
89
94
  # and __fields_set__ contains the field
90
95
  if self.leap_days_included is None and "leap_days_included" in self.__fields_set__:
@@ -139,6 +144,7 @@ class FlowConventions(BaseModel):
139
144
  "accrual_date_adjustment": obj.get("accrualDateAdjustment"),
140
145
  "business_day_convention": obj.get("businessDayConvention"),
141
146
  "accrual_day_count_convention": obj.get("accrualDayCountConvention"),
147
+ "coupon_payment_lag": RelativeDateOffset.from_dict(obj.get("couponPaymentLag")) if obj.get("couponPaymentLag") is not None else None,
142
148
  "scope": obj.get("scope"),
143
149
  "code": obj.get("code")
144
150
  })
@@ -20,7 +20,7 @@ import json
20
20
 
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
- from lusid.models.component_rule import ComponentRule
23
+ from lusid.models.component_filter import ComponentFilter
24
24
  from lusid.models.link import Link
25
25
  from lusid.models.model_property import ModelProperty
26
26
  from lusid.models.resource_id import ResourceId
@@ -34,13 +34,13 @@ class FundConfiguration(BaseModel):
34
34
  id: ResourceId = Field(...)
35
35
  display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
36
36
  description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
37
- dealing_rule: Optional[ComponentRule] = Field(None, alias="dealingRule")
38
- pnl_rule: Optional[ComponentRule] = Field(None, alias="pnlRule")
39
- back_out_rule: Optional[ComponentRule] = Field(None, alias="backOutRule")
37
+ dealing_filters: Optional[conlist(ComponentFilter)] = Field(None, alias="dealingFilters", description="The set of filters used to decide which JE lines are included in the dealing.")
38
+ pnl_filters: Optional[conlist(ComponentFilter)] = Field(None, alias="pnlFilters", description="The set of filters used to decide which JE lines are included in the PnL.")
39
+ back_out_filters: Optional[conlist(ComponentFilter)] = Field(None, alias="backOutFilters", description="The set of filters used to decide which JE lines are included in the back outs.")
40
40
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
41
41
  version: Optional[Version] = None
42
42
  links: Optional[conlist(Link)] = None
43
- __properties = ["href", "id", "displayName", "description", "dealingRule", "pnlRule", "backOutRule", "properties", "version", "links"]
43
+ __properties = ["href", "id", "displayName", "description", "dealingFilters", "pnlFilters", "backOutFilters", "properties", "version", "links"]
44
44
 
45
45
  class Config:
46
46
  """Pydantic configuration"""
@@ -69,15 +69,27 @@ class FundConfiguration(BaseModel):
69
69
  # override the default output from pydantic by calling `to_dict()` of id
70
70
  if self.id:
71
71
  _dict['id'] = self.id.to_dict()
72
- # override the default output from pydantic by calling `to_dict()` of dealing_rule
73
- if self.dealing_rule:
74
- _dict['dealingRule'] = self.dealing_rule.to_dict()
75
- # override the default output from pydantic by calling `to_dict()` of pnl_rule
76
- if self.pnl_rule:
77
- _dict['pnlRule'] = self.pnl_rule.to_dict()
78
- # override the default output from pydantic by calling `to_dict()` of back_out_rule
79
- if self.back_out_rule:
80
- _dict['backOutRule'] = self.back_out_rule.to_dict()
72
+ # override the default output from pydantic by calling `to_dict()` of each item in dealing_filters (list)
73
+ _items = []
74
+ if self.dealing_filters:
75
+ for _item in self.dealing_filters:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['dealingFilters'] = _items
79
+ # override the default output from pydantic by calling `to_dict()` of each item in pnl_filters (list)
80
+ _items = []
81
+ if self.pnl_filters:
82
+ for _item in self.pnl_filters:
83
+ if _item:
84
+ _items.append(_item.to_dict())
85
+ _dict['pnlFilters'] = _items
86
+ # override the default output from pydantic by calling `to_dict()` of each item in back_out_filters (list)
87
+ _items = []
88
+ if self.back_out_filters:
89
+ for _item in self.back_out_filters:
90
+ if _item:
91
+ _items.append(_item.to_dict())
92
+ _dict['backOutFilters'] = _items
81
93
  # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
82
94
  _field_dict = {}
83
95
  if self.properties:
@@ -110,6 +122,21 @@ class FundConfiguration(BaseModel):
110
122
  if self.description is None and "description" in self.__fields_set__:
111
123
  _dict['description'] = None
112
124
 
125
+ # set to None if dealing_filters (nullable) is None
126
+ # and __fields_set__ contains the field
127
+ if self.dealing_filters is None and "dealing_filters" in self.__fields_set__:
128
+ _dict['dealingFilters'] = None
129
+
130
+ # set to None if pnl_filters (nullable) is None
131
+ # and __fields_set__ contains the field
132
+ if self.pnl_filters is None and "pnl_filters" in self.__fields_set__:
133
+ _dict['pnlFilters'] = None
134
+
135
+ # set to None if back_out_filters (nullable) is None
136
+ # and __fields_set__ contains the field
137
+ if self.back_out_filters is None and "back_out_filters" in self.__fields_set__:
138
+ _dict['backOutFilters'] = None
139
+
113
140
  # set to None if properties (nullable) is None
114
141
  # and __fields_set__ contains the field
115
142
  if self.properties is None and "properties" in self.__fields_set__:
@@ -136,9 +163,9 @@ class FundConfiguration(BaseModel):
136
163
  "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
137
164
  "display_name": obj.get("displayName"),
138
165
  "description": obj.get("description"),
139
- "dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
140
- "pnl_rule": ComponentRule.from_dict(obj.get("pnlRule")) if obj.get("pnlRule") is not None else None,
141
- "back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
166
+ "dealing_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("dealingFilters")] if obj.get("dealingFilters") is not None else None,
167
+ "pnl_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("pnlFilters")] if obj.get("pnlFilters") is not None else None,
168
+ "back_out_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("backOutFilters")] if obj.get("backOutFilters") is not None else None,
142
169
  "properties": dict(
143
170
  (_k, ModelProperty.from_dict(_v))
144
171
  for _k, _v in obj.get("properties").items()
@@ -18,9 +18,9 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict, Optional
22
- from pydantic.v1 import BaseModel, Field, constr, validator
23
- from lusid.models.component_rule import ComponentRule
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, conlist, constr, validator
23
+ from lusid.models.component_filter import ComponentFilter
24
24
  from lusid.models.model_property import ModelProperty
25
25
 
26
26
  class FundConfigurationRequest(BaseModel):
@@ -30,11 +30,11 @@ class FundConfigurationRequest(BaseModel):
30
30
  code: constr(strict=True, max_length=64, min_length=1) = Field(...)
31
31
  display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
32
32
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
33
- dealing_rule: ComponentRule = Field(..., alias="dealingRule")
34
- pnl_rule: ComponentRule = Field(..., alias="pnlRule")
35
- back_out_rule: ComponentRule = Field(..., alias="backOutRule")
33
+ dealing_filters: conlist(ComponentFilter) = Field(..., alias="dealingFilters", description="The set of filters used to decide which JE lines are included in the dealing.")
34
+ pnl_filters: conlist(ComponentFilter) = Field(..., alias="pnlFilters", description="The set of filters used to decide which JE lines are included in the PnL.")
35
+ back_out_filters: conlist(ComponentFilter) = Field(..., alias="backOutFilters", description="The set of filters used to decide which JE lines are included in the back outs.")
36
36
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
37
- __properties = ["code", "displayName", "description", "dealingRule", "pnlRule", "backOutRule", "properties"]
37
+ __properties = ["code", "displayName", "description", "dealingFilters", "pnlFilters", "backOutFilters", "properties"]
38
38
 
39
39
  @validator('code')
40
40
  def code_validate_regular_expression(cls, value):
@@ -77,15 +77,27 @@ class FundConfigurationRequest(BaseModel):
77
77
  exclude={
78
78
  },
79
79
  exclude_none=True)
80
- # override the default output from pydantic by calling `to_dict()` of dealing_rule
81
- if self.dealing_rule:
82
- _dict['dealingRule'] = self.dealing_rule.to_dict()
83
- # override the default output from pydantic by calling `to_dict()` of pnl_rule
84
- if self.pnl_rule:
85
- _dict['pnlRule'] = self.pnl_rule.to_dict()
86
- # override the default output from pydantic by calling `to_dict()` of back_out_rule
87
- if self.back_out_rule:
88
- _dict['backOutRule'] = self.back_out_rule.to_dict()
80
+ # override the default output from pydantic by calling `to_dict()` of each item in dealing_filters (list)
81
+ _items = []
82
+ if self.dealing_filters:
83
+ for _item in self.dealing_filters:
84
+ if _item:
85
+ _items.append(_item.to_dict())
86
+ _dict['dealingFilters'] = _items
87
+ # override the default output from pydantic by calling `to_dict()` of each item in pnl_filters (list)
88
+ _items = []
89
+ if self.pnl_filters:
90
+ for _item in self.pnl_filters:
91
+ if _item:
92
+ _items.append(_item.to_dict())
93
+ _dict['pnlFilters'] = _items
94
+ # override the default output from pydantic by calling `to_dict()` of each item in back_out_filters (list)
95
+ _items = []
96
+ if self.back_out_filters:
97
+ for _item in self.back_out_filters:
98
+ if _item:
99
+ _items.append(_item.to_dict())
100
+ _dict['backOutFilters'] = _items
89
101
  # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
90
102
  _field_dict = {}
91
103
  if self.properties:
@@ -123,9 +135,9 @@ class FundConfigurationRequest(BaseModel):
123
135
  "code": obj.get("code"),
124
136
  "display_name": obj.get("displayName"),
125
137
  "description": obj.get("description"),
126
- "dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
127
- "pnl_rule": ComponentRule.from_dict(obj.get("pnlRule")) if obj.get("pnlRule") is not None else None,
128
- "back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
138
+ "dealing_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("dealingFilters")] if obj.get("dealingFilters") is not None else None,
139
+ "pnl_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("pnlFilters")] if obj.get("pnlFilters") is not None else None,
140
+ "back_out_filters": [ComponentFilter.from_dict(_item) for _item in obj.get("backOutFilters")] if obj.get("backOutFilters") is not None else None,
129
141
  "properties": dict(
130
142
  (_k, ModelProperty.from_dict(_v))
131
143
  for _k, _v in obj.get("properties").items()
@@ -0,0 +1,99 @@
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 Field, StrictStr, conlist, validator
23
+ from lusid.models.reference_list import ReferenceList
24
+ from lusid.models.resource_id import ResourceId
25
+
26
+ class FundIdList(ReferenceList):
27
+ """
28
+ FundIdList
29
+ """
30
+ values: conlist(ResourceId, max_items=100) = Field(...)
31
+ reference_list_type: StrictStr = Field(..., alias="referenceListType", description="The reference list values. The available values are: PortfolioGroupIdList, PortfolioIdList, AddressKeyList, StringList, InstrumentList, DecimalList, PropertyList, FundIdList")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties = ["referenceListType", "values"]
34
+
35
+ @validator('reference_list_type')
36
+ def reference_list_type_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList'):
39
+ raise ValueError("must be one of enum values ('PortfolioGroupIdList', 'PortfolioIdList', 'AddressKeyList', 'StringList', 'InstrumentList', 'DecimalList', 'PropertyList', 'FundIdList')")
40
+ return value
41
+
42
+ class Config:
43
+ """Pydantic configuration"""
44
+ allow_population_by_field_name = True
45
+ validate_assignment = True
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.dict(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> FundIdList:
57
+ """Create an instance of FundIdList from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self):
61
+ """Returns the dictionary representation of the model using alias"""
62
+ _dict = self.dict(by_alias=True,
63
+ exclude={
64
+ "additional_properties"
65
+ },
66
+ exclude_none=True)
67
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
68
+ _items = []
69
+ if self.values:
70
+ for _item in self.values:
71
+ if _item:
72
+ _items.append(_item.to_dict())
73
+ _dict['values'] = _items
74
+ # puts key-value pairs in additional_properties in the top level
75
+ if self.additional_properties is not None:
76
+ for _key, _value in self.additional_properties.items():
77
+ _dict[_key] = _value
78
+
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: dict) -> FundIdList:
83
+ """Create an instance of FundIdList from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return FundIdList.parse_obj(obj)
89
+
90
+ _obj = FundIdList.parse_obj({
91
+ "reference_list_type": obj.get("referenceListType"),
92
+ "values": [ResourceId.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None
93
+ })
94
+ # store additional fields in additional_properties
95
+ for _key in obj.keys():
96
+ if _key not in cls.__properties:
97
+ _obj.additional_properties[_key] = obj.get(_key)
98
+
99
+ return _obj
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict
21
+ from typing import Any, Dict, Optional
22
22
  from pydantic.v1 import BaseModel, Field
23
23
  from lusid.models.group_reconciliation_aggregate_comparison_rule_operand import GroupReconciliationAggregateComparisonRuleOperand
24
24
  from lusid.models.group_reconciliation_comparison_rule_tolerance import GroupReconciliationComparisonRuleTolerance
@@ -29,7 +29,7 @@ class GroupReconciliationAggregateAttributeRule(BaseModel):
29
29
  """
30
30
  left: GroupReconciliationAggregateComparisonRuleOperand = Field(...)
31
31
  right: GroupReconciliationAggregateComparisonRuleOperand = Field(...)
32
- tolerance: GroupReconciliationComparisonRuleTolerance = Field(...)
32
+ tolerance: Optional[GroupReconciliationComparisonRuleTolerance] = None
33
33
  __properties = ["left", "right", "tolerance"]
34
34
 
35
35
  class Config:
@@ -25,7 +25,7 @@ class GroupReconciliationAggregateComparisonRuleOperand(BaseModel):
25
25
  """
26
26
  GroupReconciliationAggregateComparisonRuleOperand
27
27
  """
28
- key: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The key of the value to compare")
28
+ key: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The key of the value to compare")
29
29
  operation: constr(strict=True, min_length=1) = Field(..., description="What to do with the value pointed to by the key, e.g. Sum. Only \"Value is allowed for core rules\"")
30
30
  __properties = ["key", "operation"]
31
31
 
@@ -25,7 +25,7 @@ class GroupReconciliationCoreComparisonRuleOperand(BaseModel):
25
25
  """
26
26
  GroupReconciliationCoreComparisonRuleOperand
27
27
  """
28
- key: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The key of the value to compare")
28
+ key: constr(strict=True, max_length=1024, min_length=0) = Field(..., description="The key of the value to compare")
29
29
  operation: constr(strict=True, min_length=1) = Field(..., description="What to do with the value pointed to by the key, e.g. Sum. Only \"Value is allowed for core rules\"")
30
30
  __properties = ["key", "operation"]
31
31