lusid-sdk 2.1.351__py3-none-any.whl → 2.1.405__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 (94) hide show
  1. lusid/__init__.py +52 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/funds_api.py +9 -8
  4. lusid/api/group_reconciliations_api.py +378 -0
  5. lusid/api/order_management_api.py +174 -0
  6. lusid/api/persons_api.py +4 -4
  7. lusid/api/portfolios_api.py +179 -0
  8. lusid/api/workspace_api.py +40 -40
  9. lusid/configuration.py +1 -1
  10. lusid/models/__init__.py +50 -0
  11. lusid/models/accept_estimate_valuation_point_response.py +100 -0
  12. lusid/models/accumulation_event.py +3 -3
  13. lusid/models/action_id.py +1 -1
  14. lusid/models/amortisation_event.py +3 -3
  15. lusid/models/applicable_instrument_event.py +14 -2
  16. lusid/models/batch_upsert_portfolio_access_metadata_request.py +82 -0
  17. lusid/models/batch_upsert_portfolio_access_metadata_response.py +82 -0
  18. lusid/models/bond_coupon_event.py +3 -3
  19. lusid/models/bond_default_event.py +3 -3
  20. lusid/models/bond_principal_event.py +3 -3
  21. lusid/models/calendar.py +17 -2
  22. lusid/models/capital_distribution_event.py +3 -3
  23. lusid/models/cash_dividend_event.py +3 -3
  24. lusid/models/cash_flow_event.py +3 -3
  25. lusid/models/cds_credit_event.py +105 -0
  26. lusid/models/cdx_credit_event.py +114 -0
  27. lusid/models/change_interval_with_order_management_detail.py +137 -0
  28. lusid/models/close_event.py +3 -3
  29. lusid/models/create_group_reconciliation_comparison_ruleset_request.py +97 -0
  30. lusid/models/credit_premium_cash_flow_event.py +102 -0
  31. lusid/models/custom_entity_definition.py +17 -2
  32. lusid/models/custom_entity_type.py +17 -2
  33. lusid/models/data_type.py +7 -1
  34. lusid/models/dividend_option_event.py +3 -3
  35. lusid/models/dividend_reinvestment_event.py +3 -3
  36. lusid/models/exercise_event.py +3 -3
  37. lusid/models/expiry_event.py +3 -3
  38. lusid/models/fee.py +1 -1
  39. lusid/models/fee_request.py +1 -1
  40. lusid/models/flow_conventions.py +1 -1
  41. lusid/models/fund_amount.py +1 -1
  42. lusid/models/fund_details.py +74 -0
  43. lusid/models/future_expiry_event.py +3 -3
  44. lusid/models/futures_contract_details.py +6 -1
  45. lusid/models/fx_forward_settlement_event.py +13 -5
  46. lusid/models/generated_event_diagnostics.py +75 -0
  47. lusid/models/group_reconciliation_aggregate_attribute_rule.py +84 -0
  48. lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +71 -0
  49. lusid/models/group_reconciliation_comparison_rule_string_value_map.py +73 -0
  50. lusid/models/group_reconciliation_comparison_rule_tolerance.py +71 -0
  51. lusid/models/group_reconciliation_comparison_ruleset.py +125 -0
  52. lusid/models/group_reconciliation_core_attribute_rule.py +95 -0
  53. lusid/models/group_reconciliation_core_comparison_rule_operand.py +71 -0
  54. lusid/models/holding_pricing_info.py +110 -0
  55. lusid/models/index_convention.py +1 -1
  56. lusid/models/informational_error_event.py +3 -3
  57. lusid/models/informational_event.py +3 -3
  58. lusid/models/instrument_event.py +10 -5
  59. lusid/models/instrument_event_instruction.py +19 -4
  60. lusid/models/instrument_event_type.py +5 -0
  61. lusid/models/maturity_event.py +3 -3
  62. lusid/models/merger_event.py +3 -3
  63. lusid/models/metadata_key_value.py +86 -0
  64. lusid/models/metadata_key_value_response.py +86 -0
  65. lusid/models/new_instrument.py +10 -2
  66. lusid/models/open_event.py +3 -3
  67. lusid/models/order_graph_block_order_detail.py +1 -1
  68. lusid/models/order_update_request.py +5 -0
  69. lusid/models/person.py +17 -2
  70. lusid/models/placement_update_request.py +6 -1
  71. lusid/models/previous_nav.py +3 -3
  72. lusid/models/pricing_context.py +8 -2
  73. lusid/models/raw_vendor_event.py +3 -3
  74. lusid/models/reset_event.py +3 -3
  75. lusid/models/resource_list_of_change_interval_with_order_management_detail.py +113 -0
  76. lusid/models/reverse_stock_split_event.py +3 -3
  77. lusid/models/scrip_dividend_event.py +3 -3
  78. lusid/models/share_class_amount.py +7 -9
  79. lusid/models/share_class_breakdown.py +4 -5
  80. lusid/models/specific_holding_pricing_info.py +75 -0
  81. lusid/models/spin_off_event.py +3 -3
  82. lusid/models/staged_modification.py +8 -1
  83. lusid/models/stock_dividend_event.py +3 -3
  84. lusid/models/stock_split_event.py +3 -3
  85. lusid/models/swap_cash_flow_event.py +97 -0
  86. lusid/models/swap_principal_event.py +97 -0
  87. lusid/models/transaction_diagnostics.py +71 -0
  88. lusid/models/transition_event.py +3 -3
  89. lusid/models/trigger_event.py +3 -3
  90. lusid/models/valuation_point_data_response.py +21 -1
  91. lusid/models/weighted_instrument.py +9 -2
  92. {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/METADATA +52 -23
  93. {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/RECORD +94 -68
  94. {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/WHEEL +0 -0
@@ -0,0 +1,86 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List
22
+ from pydantic.v1 import BaseModel, Field, conlist
23
+ from lusid.models.access_metadata_value import AccessMetadataValue
24
+
25
+ class MetadataKeyValueResponse(BaseModel):
26
+ """
27
+ MetadataKeyValueResponse
28
+ """
29
+ metadata: Dict[str, conlist(AccessMetadataValue)] = Field(...)
30
+ __properties = ["metadata"]
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) -> MetadataKeyValueResponse:
47
+ """Create an instance of MetadataKeyValueResponse 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
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
57
+ _field_dict_of_array = {}
58
+ if self.metadata:
59
+ for _key in self.metadata:
60
+ if self.metadata[_key]:
61
+ _field_dict_of_array[_key] = [
62
+ _item.to_dict() for _item in self.metadata[_key]
63
+ ]
64
+ _dict['metadata'] = _field_dict_of_array
65
+ return _dict
66
+
67
+ @classmethod
68
+ def from_dict(cls, obj: dict) -> MetadataKeyValueResponse:
69
+ """Create an instance of MetadataKeyValueResponse from a dict"""
70
+ if obj is None:
71
+ return None
72
+
73
+ if not isinstance(obj, dict):
74
+ return MetadataKeyValueResponse.parse_obj(obj)
75
+
76
+ _obj = MetadataKeyValueResponse.parse_obj({
77
+ "metadata": dict(
78
+ (_k,
79
+ [AccessMetadataValue.from_dict(_item) for _item in _v]
80
+ if _v is not None
81
+ else None
82
+ )
83
+ for _k, _v in obj.get("metadata").items()
84
+ )
85
+ })
86
+ return _obj
@@ -28,7 +28,8 @@ class NewInstrument(BaseModel):
28
28
  instrument_identifiers: Dict[str, StrictStr] = Field(..., alias="instrumentIdentifiers", description="Unique instrument identifiers.")
29
29
  lusid_instrument_id: Optional[StrictStr] = Field(None, alias="lusidInstrumentId", description="LUSID's internal unique instrument identifier, resolved from the instrument identifiers.")
30
30
  instrument_scope: Optional[StrictStr] = Field(None, alias="instrumentScope", description="The scope in which the instrument lies, resolved from the instrument identifiers.")
31
- __properties = ["instrumentIdentifiers", "lusidInstrumentId", "instrumentScope"]
31
+ dom_ccy: Optional[StrictStr] = Field(None, alias="domCcy", description="The domestic currency of the instrument, resolved from the instrument identifiers.")
32
+ __properties = ["instrumentIdentifiers", "lusidInstrumentId", "instrumentScope", "domCcy"]
32
33
 
33
34
  class Config:
34
35
  """Pydantic configuration"""
@@ -54,6 +55,7 @@ class NewInstrument(BaseModel):
54
55
  exclude={
55
56
  "lusid_instrument_id",
56
57
  "instrument_scope",
58
+ "dom_ccy",
57
59
  },
58
60
  exclude_none=True)
59
61
  # set to None if lusid_instrument_id (nullable) is None
@@ -66,6 +68,11 @@ class NewInstrument(BaseModel):
66
68
  if self.instrument_scope is None and "instrument_scope" in self.__fields_set__:
67
69
  _dict['instrumentScope'] = None
68
70
 
71
+ # set to None if dom_ccy (nullable) is None
72
+ # and __fields_set__ contains the field
73
+ if self.dom_ccy is None and "dom_ccy" in self.__fields_set__:
74
+ _dict['domCcy'] = None
75
+
69
76
  return _dict
70
77
 
71
78
  @classmethod
@@ -80,6 +87,7 @@ class NewInstrument(BaseModel):
80
87
  _obj = NewInstrument.parse_obj({
81
88
  "instrument_identifiers": obj.get("instrumentIdentifiers"),
82
89
  "lusid_instrument_id": obj.get("lusidInstrumentId"),
83
- "instrument_scope": obj.get("instrumentScope")
90
+ "instrument_scope": obj.get("instrumentScope"),
91
+ "dom_ccy": obj.get("domCcy")
84
92
  })
85
93
  return _obj
@@ -27,15 +27,15 @@ class OpenEvent(InstrumentEvent):
27
27
  The opening of an instrument. # noqa: E501
28
28
  """
29
29
  anchor_date: Optional[datetime] = Field(None, alias="anchorDate", description="The date on the which the instrument was opened.")
30
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
30
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["instrumentEventType", "anchorDate"]
33
33
 
34
34
  @validator('instrument_event_type')
35
35
  def instrument_event_type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
38
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
37
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
38
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
39
39
  return value
40
40
 
41
41
  class Config:
@@ -27,7 +27,7 @@ class OrderGraphBlockOrderDetail(BaseModel):
27
27
  OrderGraphBlockOrderDetail
28
28
  """
29
29
  id: ResourceId = Field(...)
30
- compliance_state: constr(strict=True, min_length=1) = Field(..., alias="complianceState", description="The compliance state of this order. Possible values are 'Pending', 'Failed', 'Manually approved' and 'Passed'.")
30
+ compliance_state: constr(strict=True, min_length=1) = Field(..., alias="complianceState", description="The compliance state of this order. Possible values are 'Pending', 'Failed', 'Manually approved', 'Passed' and 'Warning'.")
31
31
  approval_state: constr(strict=True, min_length=1) = Field(..., alias="approvalState", description="The approval state of this order. Possible values are 'Pending', 'Rejected' and 'Approved'.")
32
32
  portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
33
33
  portfolio_name: Optional[StrictStr] = Field(None, alias="portfolioName", description="The name of the order's referenced Portfolio.")
@@ -83,6 +83,11 @@ class OrderUpdateRequest(BaseModel):
83
83
  # override the default output from pydantic by calling `to_dict()` of stop_price
84
84
  if self.stop_price:
85
85
  _dict['stopPrice'] = self.stop_price.to_dict()
86
+ # set to None if quantity (nullable) is None
87
+ # and __fields_set__ contains the field
88
+ if self.quantity is None and "quantity" in self.__fields_set__:
89
+ _dict['quantity'] = None
90
+
86
91
  # set to None if properties (nullable) is None
87
92
  # and __fields_set__ contains the field
88
93
  if self.properties is None and "properties" in self.__fields_set__:
lusid/models/person.py CHANGED
@@ -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, StrictStr, conlist
23
+ from lusid.models.link import Link
23
24
  from lusid.models.model_property import ModelProperty
24
25
  from lusid.models.relationship import Relationship
25
26
  from lusid.models.version import Version
@@ -36,7 +37,8 @@ class Person(BaseModel):
36
37
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties associated to the Person. There can be multiple properties associated with a property key.")
37
38
  relationships: Optional[conlist(Relationship)] = Field(None, description="A set of relationships associated to the Person.")
38
39
  version: Optional[Version] = None
39
- __properties = ["displayName", "description", "href", "lusidPersonId", "identifiers", "properties", "relationships", "version"]
40
+ links: Optional[conlist(Link)] = None
41
+ __properties = ["displayName", "description", "href", "lusidPersonId", "identifiers", "properties", "relationships", "version", "links"]
40
42
 
41
43
  class Config:
42
44
  """Pydantic configuration"""
@@ -86,6 +88,13 @@ class Person(BaseModel):
86
88
  # override the default output from pydantic by calling `to_dict()` of version
87
89
  if self.version:
88
90
  _dict['version'] = self.version.to_dict()
91
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
92
+ _items = []
93
+ if self.links:
94
+ for _item in self.links:
95
+ if _item:
96
+ _items.append(_item.to_dict())
97
+ _dict['links'] = _items
89
98
  # set to None if display_name (nullable) is None
90
99
  # and __fields_set__ contains the field
91
100
  if self.display_name is None and "display_name" in self.__fields_set__:
@@ -121,6 +130,11 @@ class Person(BaseModel):
121
130
  if self.relationships is None and "relationships" in self.__fields_set__:
122
131
  _dict['relationships'] = None
123
132
 
133
+ # set to None if links (nullable) is None
134
+ # and __fields_set__ contains the field
135
+ if self.links is None and "links" in self.__fields_set__:
136
+ _dict['links'] = None
137
+
124
138
  return _dict
125
139
 
126
140
  @classmethod
@@ -150,6 +164,7 @@ class Person(BaseModel):
150
164
  if obj.get("properties") is not None
151
165
  else None,
152
166
  "relationships": [Relationship.from_dict(_item) for _item in obj.get("relationships")] if obj.get("relationships") is not None else None,
153
- "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
167
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
168
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
154
169
  })
155
170
  return _obj
@@ -28,7 +28,7 @@ class PlacementUpdateRequest(BaseModel):
28
28
  A request to create or update a Placement. # noqa: E501
29
29
  """
30
30
  id: ResourceId = Field(...)
31
- quantity: Union[StrictFloat, StrictInt] = Field(..., description="The quantity of given instrument ordered.")
31
+ quantity: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The quantity of given instrument ordered.")
32
32
  properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="Client-defined properties associated with this placement.")
33
33
  counterparty: Optional[StrictStr] = Field(None, description="Optionally specifies the market entity this placement is placed with.")
34
34
  execution_system: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="executionSystem", description="Optionally specifies the execution system in use.")
@@ -69,6 +69,11 @@ class PlacementUpdateRequest(BaseModel):
69
69
  if self.properties[_key]:
70
70
  _field_dict[_key] = self.properties[_key].to_dict()
71
71
  _dict['properties'] = _field_dict
72
+ # set to None if quantity (nullable) is None
73
+ # and __fields_set__ contains the field
74
+ if self.quantity is None and "quantity" in self.__fields_set__:
75
+ _dict['quantity'] = None
76
+
72
77
  # set to None if properties (nullable) is None
73
78
  # and __fields_set__ contains the field
74
79
  if self.properties is None and "properties" in self.__fields_set__:
@@ -20,13 +20,13 @@ import json
20
20
 
21
21
  from typing import Any, Dict, Optional
22
22
  from pydantic.v1 import BaseModel
23
- from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
23
+ from lusid.models.share_class_amount import ShareClassAmount
24
24
 
25
25
  class PreviousNAV(BaseModel):
26
26
  """
27
27
  PreviousNAV
28
28
  """
29
- amount: Optional[MultiCurrencyAmounts] = None
29
+ amount: Optional[ShareClassAmount] = None
30
30
  __properties = ["amount"]
31
31
 
32
32
  class Config:
@@ -68,6 +68,6 @@ class PreviousNAV(BaseModel):
68
68
  return PreviousNAV.parse_obj(obj)
69
69
 
70
70
  _obj = PreviousNAV.parse_obj({
71
- "amount": MultiCurrencyAmounts.from_dict(obj.get("amount")) if obj.get("amount") is not None else None
71
+ "amount": ShareClassAmount.from_dict(obj.get("amount")) if obj.get("amount") is not None else None
72
72
  })
73
73
  return _obj
@@ -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, conlist
23
+ from lusid.models.holding_pricing_info import HoldingPricingInfo
23
24
  from lusid.models.model_selection import ModelSelection
24
25
  from lusid.models.pricing_options import PricingOptions
25
26
  from lusid.models.result_key_rule import ResultKeyRule
@@ -33,7 +34,8 @@ class PricingContext(BaseModel):
33
34
  model_choice: Optional[Dict[str, ModelSelection]] = Field(None, alias="modelChoice", description="The choice of which model selection (vendor library, pricing model) to use in evaluation of a given instrument type.")
34
35
  options: Optional[PricingOptions] = None
35
36
  result_data_rules: Optional[conlist(ResultKeyRule)] = Field(None, alias="resultDataRules", description="Set of rules that control querying of unit results either for direct queries into aggregation or for overriding intermediate calculations. For example, a dirty price is made up from a clean price and the accrued interest. One might consider overriding the accrued interest calculated by a model (perhaps one wants to match an external value or simply disagrees with the calculated result) and use that in calculation of the dirty price.")
36
- __properties = ["modelRules", "modelChoice", "options", "resultDataRules"]
37
+ holding_pricing_info: Optional[HoldingPricingInfo] = Field(None, alias="holdingPricingInfo")
38
+ __properties = ["modelRules", "modelChoice", "options", "resultDataRules", "holdingPricingInfo"]
37
39
 
38
40
  class Config:
39
41
  """Pydantic configuration"""
@@ -83,6 +85,9 @@ class PricingContext(BaseModel):
83
85
  if _item:
84
86
  _items.append(_item.to_dict())
85
87
  _dict['resultDataRules'] = _items
88
+ # override the default output from pydantic by calling `to_dict()` of holding_pricing_info
89
+ if self.holding_pricing_info:
90
+ _dict['holdingPricingInfo'] = self.holding_pricing_info.to_dict()
86
91
  # set to None if model_rules (nullable) is None
87
92
  # and __fields_set__ contains the field
88
93
  if self.model_rules is None and "model_rules" in self.__fields_set__:
@@ -118,6 +123,7 @@ class PricingContext(BaseModel):
118
123
  if obj.get("modelChoice") is not None
119
124
  else None,
120
125
  "options": PricingOptions.from_dict(obj.get("options")) if obj.get("options") is not None else None,
121
- "result_data_rules": [ResultKeyRule.from_dict(_item) for _item in obj.get("resultDataRules")] if obj.get("resultDataRules") is not None else None
126
+ "result_data_rules": [ResultKeyRule.from_dict(_item) for _item in obj.get("resultDataRules")] if obj.get("resultDataRules") is not None else None,
127
+ "holding_pricing_info": HoldingPricingInfo.from_dict(obj.get("holdingPricingInfo")) if obj.get("holdingPricingInfo") is not None else None
122
128
  })
123
129
  return _obj
@@ -30,15 +30,15 @@ class RawVendorEvent(InstrumentEvent):
30
30
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the event")
31
31
  event_value: LifeCycleEventValue = Field(..., alias="eventValue")
32
32
  event_type: constr(strict=True, min_length=1) = Field(..., alias="eventType", description="What type of internal event does this represent; reset, exercise, amortisation etc.")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "effectiveAt", "eventValue", "eventType"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -30,15 +30,15 @@ class ResetEvent(InstrumentEvent):
30
30
  reset_type: constr(strict=True, min_length=1) = Field(..., alias="resetType", description="The type of the reset; e.g. RIC, Currency-pair")
31
31
  fixing_source: Optional[StrictStr] = Field(None, alias="fixingSource", description="Fixing identification source, if available.")
32
32
  fixing_date: datetime = Field(..., alias="fixingDate", description="The date the reset fixes, or is observed upon.")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "value", "resetType", "fixingSource", "fixingDate"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -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.change_interval_with_order_management_detail import ChangeIntervalWithOrderManagementDetail
24
+ from lusid.models.link import Link
25
+
26
+ class ResourceListOfChangeIntervalWithOrderManagementDetail(BaseModel):
27
+ """
28
+ ResourceListOfChangeIntervalWithOrderManagementDetail
29
+ """
30
+ values: conlist(ChangeIntervalWithOrderManagementDetail) = Field(...)
31
+ href: Optional[StrictStr] = None
32
+ links: Optional[conlist(Link)] = None
33
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
34
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
35
+ __properties = ["values", "href", "links", "nextPage", "previousPage"]
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) -> ResourceListOfChangeIntervalWithOrderManagementDetail:
52
+ """Create an instance of ResourceListOfChangeIntervalWithOrderManagementDetail 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 href (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.href is None and "href" in self.__fields_set__:
78
+ _dict['href'] = None
79
+
80
+ # set to None if links (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.links is None and "links" in self.__fields_set__:
83
+ _dict['links'] = None
84
+
85
+ # set to None if next_page (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.next_page is None and "next_page" in self.__fields_set__:
88
+ _dict['nextPage'] = None
89
+
90
+ # set to None if previous_page (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
93
+ _dict['previousPage'] = None
94
+
95
+ return _dict
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: dict) -> ResourceListOfChangeIntervalWithOrderManagementDetail:
99
+ """Create an instance of ResourceListOfChangeIntervalWithOrderManagementDetail from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return ResourceListOfChangeIntervalWithOrderManagementDetail.parse_obj(obj)
105
+
106
+ _obj = ResourceListOfChangeIntervalWithOrderManagementDetail.parse_obj({
107
+ "values": [ChangeIntervalWithOrderManagementDetail.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
108
+ "href": obj.get("href"),
109
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None,
110
+ "next_page": obj.get("nextPage"),
111
+ "previous_page": obj.get("previousPage")
112
+ })
113
+ return _obj
@@ -32,15 +32,15 @@ class ReverseStockSplitEvent(InstrumentEvent):
32
32
  units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
33
33
  record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to have their shares merged.")
34
34
  announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the reverse stock split was announced.")
35
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
35
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
36
36
  additional_properties: Dict[str, Any] = {}
37
37
  __properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate"]
38
38
 
39
39
  @validator('instrument_event_type')
40
40
  def instrument_event_type_validate_enum(cls, value):
41
41
  """Validates the enum"""
42
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
43
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
42
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
43
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
44
44
  return value
45
45
 
46
46
  class Config:
@@ -34,15 +34,15 @@ class ScripDividendEvent(InstrumentEvent):
34
34
  fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="The cash price per unit paid in lieu when fractional units can not be distributed.")
35
35
  fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="The currency of the cash paid in lieu of fractional units.")
36
36
  units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
37
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
37
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
38
38
  additional_properties: Dict[str, Any] = {}
39
39
  __properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "fractionalUnitsCashPrice", "fractionalUnitsCashCurrency", "unitsRatio"]
40
40
 
41
41
  @validator('instrument_event_type')
42
42
  def instrument_event_type_validate_enum(cls, value):
43
43
  """Validates the enum"""
44
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
45
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
44
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
45
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
46
46
  return value
47
47
 
48
48
  class Config:
@@ -18,16 +18,16 @@ 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
23
- from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
21
+ from typing import Any, Dict, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
24
23
 
25
24
  class ShareClassAmount(BaseModel):
26
25
  """
27
26
  ShareClassAmount
28
27
  """
29
- value: Optional[MultiCurrencyAmounts] = None
30
- __properties = ["value"]
28
+ fund_currency_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fundCurrencyAmount", description="The value of the amount in the fund currency.")
29
+ share_class_currency_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="shareClassCurrencyAmount", description="The value of the amount in the share class currency.")
30
+ __properties = ["fundCurrencyAmount", "shareClassCurrencyAmount"]
31
31
 
32
32
  class Config:
33
33
  """Pydantic configuration"""
@@ -53,9 +53,6 @@ class ShareClassAmount(BaseModel):
53
53
  exclude={
54
54
  },
55
55
  exclude_none=True)
56
- # override the default output from pydantic by calling `to_dict()` of value
57
- if self.value:
58
- _dict['value'] = self.value.to_dict()
59
56
  return _dict
60
57
 
61
58
  @classmethod
@@ -68,6 +65,7 @@ class ShareClassAmount(BaseModel):
68
65
  return ShareClassAmount.parse_obj(obj)
69
66
 
70
67
  _obj = ShareClassAmount.parse_obj({
71
- "value": MultiCurrencyAmounts.from_dict(obj.get("value")) if obj.get("value") is not None else None
68
+ "fund_currency_amount": obj.get("fundCurrencyAmount"),
69
+ "share_class_currency_amount": obj.get("shareClassCurrencyAmount")
72
70
  })
73
71
  return _obj
@@ -21,7 +21,6 @@ import json
21
21
  from typing import Any, Dict, Optional, Union
22
22
  from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
23
  from lusid.models.fee_accrual import FeeAccrual
24
- from lusid.models.multi_currency_amounts import MultiCurrencyAmounts
25
24
  from lusid.models.previous_share_class_breakdown import PreviousShareClassBreakdown
26
25
  from lusid.models.share_class_amount import ShareClassAmount
27
26
  from lusid.models.share_class_dealing_breakdown import ShareClassDealingBreakdown
@@ -35,9 +34,9 @@ class ShareClassBreakdown(BaseModel):
35
34
  back_out: Dict[str, ShareClassAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
36
35
  dealing: ShareClassDealingBreakdown = Field(...)
37
36
  pn_l: ShareClassPnlBreakdown = Field(..., alias="pnL")
38
- gav: MultiCurrencyAmounts = Field(...)
37
+ gav: ShareClassAmount = Field(...)
39
38
  fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
40
- nav: MultiCurrencyAmounts = Field(...)
39
+ nav: ShareClassAmount = Field(...)
41
40
  unitisation: Optional[UnitisationData] = None
42
41
  miscellaneous: Optional[Dict[str, ShareClassAmount]] = Field(None, description="Not used directly by the LUSID engines but serves as a holding area for any custom derived data points that may be useful in, for example, fee calculations).")
43
42
  share_class_to_fund_fx_rate: Union[StrictFloat, StrictInt] = Field(..., alias="shareClassToFundFxRate", description="The fx rate from the Share Class currency to the fund currency at this valuation point.")
@@ -133,14 +132,14 @@ class ShareClassBreakdown(BaseModel):
133
132
  else None,
134
133
  "dealing": ShareClassDealingBreakdown.from_dict(obj.get("dealing")) if obj.get("dealing") is not None else None,
135
134
  "pn_l": ShareClassPnlBreakdown.from_dict(obj.get("pnL")) if obj.get("pnL") is not None else None,
136
- "gav": MultiCurrencyAmounts.from_dict(obj.get("gav")) if obj.get("gav") is not None else None,
135
+ "gav": ShareClassAmount.from_dict(obj.get("gav")) if obj.get("gav") is not None else None,
137
136
  "fees": dict(
138
137
  (_k, FeeAccrual.from_dict(_v))
139
138
  for _k, _v in obj.get("fees").items()
140
139
  )
141
140
  if obj.get("fees") is not None
142
141
  else None,
143
- "nav": MultiCurrencyAmounts.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
142
+ "nav": ShareClassAmount.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
144
143
  "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
145
144
  "miscellaneous": dict(
146
145
  (_k, ShareClassAmount.from_dict(_v))