lusid-sdk 2.1.242__py3-none-any.whl → 2.1.261__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lusid-sdk might be problematic. Click here for more details.

Files changed (63) hide show
  1. lusid/__init__.py +28 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/entities_api.py +360 -0
  4. lusid/api/fee_types_api.py +143 -0
  5. lusid/api/fund_configurations_api.py +944 -0
  6. lusid/api/order_management_api.py +320 -1
  7. lusid/configuration.py +1 -1
  8. lusid/models/__init__.py +26 -0
  9. lusid/models/accounting_method.py +3 -0
  10. lusid/models/accumulation_event.py +3 -3
  11. lusid/models/amortisation_event.py +3 -3
  12. lusid/models/bond_coupon_event.py +3 -3
  13. lusid/models/bond_default_event.py +3 -3
  14. lusid/models/bond_principal_event.py +3 -3
  15. lusid/models/cancel_placements_response.py +153 -0
  16. lusid/models/cancelled_placement_result.py +83 -0
  17. lusid/models/capital_distribution_event.py +3 -3
  18. lusid/models/cash_dividend_event.py +3 -3
  19. lusid/models/cash_flow_event.py +3 -3
  20. lusid/models/close_event.py +3 -3
  21. lusid/models/component_rule.py +83 -0
  22. lusid/models/create_derived_transaction_portfolio_request.py +3 -3
  23. lusid/models/create_transaction_portfolio_request.py +3 -3
  24. lusid/models/dependency_source_filter.py +9 -2
  25. lusid/models/dividend_option_event.py +3 -3
  26. lusid/models/dividend_reinvestment_event.py +3 -3
  27. lusid/models/exercise_event.py +3 -3
  28. lusid/models/expiry_event.py +3 -3
  29. lusid/models/fee_transaction_template_specification.py +79 -0
  30. lusid/models/fund_configuration.py +150 -0
  31. lusid/models/fund_configuration_properties.py +115 -0
  32. lusid/models/fund_configuration_request.py +130 -0
  33. lusid/models/future_expiry_event.py +100 -0
  34. lusid/models/fx_forward_settlement_event.py +3 -3
  35. lusid/models/informational_error_event.py +3 -3
  36. lusid/models/informational_event.py +3 -3
  37. lusid/models/instrument_entity.py +146 -0
  38. lusid/models/instrument_event.py +6 -5
  39. lusid/models/instrument_event_type.py +1 -0
  40. lusid/models/maturity_event.py +3 -3
  41. lusid/models/merger_event.py +3 -3
  42. lusid/models/open_event.py +3 -3
  43. lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
  44. lusid/models/placement_update_request.py +116 -0
  45. lusid/models/portfolio.py +3 -3
  46. lusid/models/portfolio_details.py +3 -3
  47. lusid/models/portfolio_without_href.py +3 -3
  48. lusid/models/property_definition.py +7 -1
  49. lusid/models/property_definition_entity.py +146 -0
  50. lusid/models/raw_vendor_event.py +3 -3
  51. lusid/models/reset_event.py +3 -3
  52. lusid/models/reverse_stock_split_event.py +3 -3
  53. lusid/models/scrip_dividend_event.py +3 -3
  54. lusid/models/spin_off_event.py +3 -3
  55. lusid/models/stock_dividend_event.py +3 -3
  56. lusid/models/stock_split_event.py +3 -3
  57. lusid/models/transaction_field_map.py +7 -2
  58. lusid/models/transition_event.py +3 -3
  59. lusid/models/trigger_event.py +3 -3
  60. lusid/models/update_placements_response.py +153 -0
  61. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.261.dist-info}/METADATA +26 -3
  62. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.261.dist-info}/RECORD +63 -49
  63. {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.261.dist-info}/WHEEL +0 -0
@@ -27,15 +27,15 @@ class ExpiryEvent(InstrumentEvent):
27
27
  Definition of an Expiry Event This is an event that describes the expiry of the instrument. # noqa: E501
28
28
  """
29
29
  expiry_date: datetime = Field(..., alias="expiryDate", description="Expiry date of the instrument")
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")
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")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["instrumentEventType", "expiryDate"]
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'):
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')")
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')")
39
39
  return value
40
40
 
41
41
  class Config:
@@ -0,0 +1,79 @@
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, constr
23
+ from lusid.models.template_field import TemplateField
24
+
25
+ class FeeTransactionTemplateSpecification(BaseModel):
26
+ """
27
+ FeeTransactionTemplateSpecification
28
+ """
29
+ specification_type_name: constr(strict=True, min_length=1) = Field(..., alias="specificationTypeName")
30
+ supported_template_fields: conlist(TemplateField) = Field(..., alias="supportedTemplateFields")
31
+ __properties = ["specificationTypeName", "supportedTemplateFields"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> FeeTransactionTemplateSpecification:
48
+ """Create an instance of FeeTransactionTemplateSpecification from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ # override the default output from pydantic by calling `to_dict()` of each item in supported_template_fields (list)
58
+ _items = []
59
+ if self.supported_template_fields:
60
+ for _item in self.supported_template_fields:
61
+ if _item:
62
+ _items.append(_item.to_dict())
63
+ _dict['supportedTemplateFields'] = _items
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> FeeTransactionTemplateSpecification:
68
+ """Create an instance of FeeTransactionTemplateSpecification from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if not isinstance(obj, dict):
73
+ return FeeTransactionTemplateSpecification.parse_obj(obj)
74
+
75
+ _obj = FeeTransactionTemplateSpecification.parse_obj({
76
+ "specification_type_name": obj.get("specificationTypeName"),
77
+ "supported_template_fields": [TemplateField.from_dict(_item) for _item in obj.get("supportedTemplateFields")] if obj.get("supportedTemplateFields") is not None else None
78
+ })
79
+ return _obj
@@ -0,0 +1,150 @@
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.component_rule import ComponentRule
24
+ from lusid.models.link import Link
25
+ from lusid.models.model_property import ModelProperty
26
+ from lusid.models.resource_id import ResourceId
27
+ from lusid.models.version import Version
28
+
29
+ class FundConfiguration(BaseModel):
30
+ """
31
+ FundConfiguration
32
+ """
33
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
34
+ id: ResourceId = Field(...)
35
+ display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
36
+ description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
37
+ component_rules: Optional[conlist(ComponentRule)] = Field(None, alias="componentRules", description="The first matching rule decides the set of filters used.")
38
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
39
+ version: Optional[Version] = None
40
+ links: Optional[conlist(Link)] = None
41
+ __properties = ["href", "id", "displayName", "description", "componentRules", "properties", "version", "links"]
42
+
43
+ class Config:
44
+ """Pydantic configuration"""
45
+ allow_population_by_field_name = True
46
+ validate_assignment = True
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.dict(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> FundConfiguration:
58
+ """Create an instance of FundConfiguration from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self):
62
+ """Returns the dictionary representation of the model using alias"""
63
+ _dict = self.dict(by_alias=True,
64
+ exclude={
65
+ },
66
+ exclude_none=True)
67
+ # override the default output from pydantic by calling `to_dict()` of id
68
+ if self.id:
69
+ _dict['id'] = self.id.to_dict()
70
+ # override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
71
+ _items = []
72
+ if self.component_rules:
73
+ for _item in self.component_rules:
74
+ if _item:
75
+ _items.append(_item.to_dict())
76
+ _dict['componentRules'] = _items
77
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
78
+ _field_dict = {}
79
+ if self.properties:
80
+ for _key in self.properties:
81
+ if self.properties[_key]:
82
+ _field_dict[_key] = self.properties[_key].to_dict()
83
+ _dict['properties'] = _field_dict
84
+ # override the default output from pydantic by calling `to_dict()` of version
85
+ if self.version:
86
+ _dict['version'] = self.version.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
88
+ _items = []
89
+ if self.links:
90
+ for _item in self.links:
91
+ if _item:
92
+ _items.append(_item.to_dict())
93
+ _dict['links'] = _items
94
+ # set to None if href (nullable) is None
95
+ # and __fields_set__ contains the field
96
+ if self.href is None and "href" in self.__fields_set__:
97
+ _dict['href'] = None
98
+
99
+ # set to None if display_name (nullable) is None
100
+ # and __fields_set__ contains the field
101
+ if self.display_name is None and "display_name" in self.__fields_set__:
102
+ _dict['displayName'] = None
103
+
104
+ # set to None if description (nullable) is None
105
+ # and __fields_set__ contains the field
106
+ if self.description is None and "description" in self.__fields_set__:
107
+ _dict['description'] = None
108
+
109
+ # set to None if component_rules (nullable) is None
110
+ # and __fields_set__ contains the field
111
+ if self.component_rules is None and "component_rules" in self.__fields_set__:
112
+ _dict['componentRules'] = None
113
+
114
+ # set to None if properties (nullable) is None
115
+ # and __fields_set__ contains the field
116
+ if self.properties is None and "properties" in self.__fields_set__:
117
+ _dict['properties'] = None
118
+
119
+ # set to None if links (nullable) is None
120
+ # and __fields_set__ contains the field
121
+ if self.links is None and "links" in self.__fields_set__:
122
+ _dict['links'] = None
123
+
124
+ return _dict
125
+
126
+ @classmethod
127
+ def from_dict(cls, obj: dict) -> FundConfiguration:
128
+ """Create an instance of FundConfiguration from a dict"""
129
+ if obj is None:
130
+ return None
131
+
132
+ if not isinstance(obj, dict):
133
+ return FundConfiguration.parse_obj(obj)
134
+
135
+ _obj = FundConfiguration.parse_obj({
136
+ "href": obj.get("href"),
137
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
138
+ "display_name": obj.get("displayName"),
139
+ "description": obj.get("description"),
140
+ "component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
141
+ "properties": dict(
142
+ (_k, ModelProperty.from_dict(_v))
143
+ for _k, _v in obj.get("properties").items()
144
+ )
145
+ if obj.get("properties") is not None
146
+ else None,
147
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
148
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
149
+ })
150
+ return _obj
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.link import Link
24
+ from lusid.models.model_property import ModelProperty
25
+ from lusid.models.version import Version
26
+
27
+ class FundConfigurationProperties(BaseModel):
28
+ """
29
+ FundConfigurationProperties
30
+ """
31
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
32
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fund Configuration properties. These will be from the 'FundConfiguration' domain.")
33
+ version: Optional[Version] = None
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["href", "properties", "version", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> FundConfigurationProperties:
52
+ """Create an instance of FundConfigurationProperties 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 value in properties (dict)
62
+ _field_dict = {}
63
+ if self.properties:
64
+ for _key in self.properties:
65
+ if self.properties[_key]:
66
+ _field_dict[_key] = self.properties[_key].to_dict()
67
+ _dict['properties'] = _field_dict
68
+ # override the default output from pydantic by calling `to_dict()` of version
69
+ if self.version:
70
+ _dict['version'] = self.version.to_dict()
71
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
72
+ _items = []
73
+ if self.links:
74
+ for _item in self.links:
75
+ if _item:
76
+ _items.append(_item.to_dict())
77
+ _dict['links'] = _items
78
+ # set to None if href (nullable) is None
79
+ # and __fields_set__ contains the field
80
+ if self.href is None and "href" in self.__fields_set__:
81
+ _dict['href'] = None
82
+
83
+ # set to None if properties (nullable) is None
84
+ # and __fields_set__ contains the field
85
+ if self.properties is None and "properties" in self.__fields_set__:
86
+ _dict['properties'] = None
87
+
88
+ # set to None if links (nullable) is None
89
+ # and __fields_set__ contains the field
90
+ if self.links is None and "links" in self.__fields_set__:
91
+ _dict['links'] = None
92
+
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: dict) -> FundConfigurationProperties:
97
+ """Create an instance of FundConfigurationProperties from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return FundConfigurationProperties.parse_obj(obj)
103
+
104
+ _obj = FundConfigurationProperties.parse_obj({
105
+ "href": obj.get("href"),
106
+ "properties": dict(
107
+ (_k, ModelProperty.from_dict(_v))
108
+ for _k, _v in obj.get("properties").items()
109
+ )
110
+ if obj.get("properties") is not None
111
+ else None,
112
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
113
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
114
+ })
115
+ return _obj
@@ -0,0 +1,130 @@
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, conlist, constr, validator
23
+ from lusid.models.component_rule import ComponentRule
24
+ from lusid.models.model_property import ModelProperty
25
+
26
+ class FundConfigurationRequest(BaseModel):
27
+ """
28
+ FundConfigurationRequest
29
+ """
30
+ code: constr(strict=True, max_length=64, min_length=1) = Field(...)
31
+ display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
32
+ description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
33
+ component_rules: conlist(ComponentRule) = Field(..., alias="componentRules")
34
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
35
+ __properties = ["code", "displayName", "description", "componentRules", "properties"]
36
+
37
+ @validator('code')
38
+ def 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
43
+
44
+ @validator('description')
45
+ def description_validate_regular_expression(cls, value):
46
+ """Validates the regular expression"""
47
+ if value is None:
48
+ return value
49
+
50
+ if not re.match(r"^[\s\S]*$", value):
51
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
52
+ return value
53
+
54
+ class Config:
55
+ """Pydantic configuration"""
56
+ allow_population_by_field_name = True
57
+ validate_assignment = True
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.dict(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ return json.dumps(self.to_dict())
66
+
67
+ @classmethod
68
+ def from_json(cls, json_str: str) -> FundConfigurationRequest:
69
+ """Create an instance of FundConfigurationRequest from a JSON string"""
70
+ return cls.from_dict(json.loads(json_str))
71
+
72
+ def to_dict(self):
73
+ """Returns the dictionary representation of the model using alias"""
74
+ _dict = self.dict(by_alias=True,
75
+ exclude={
76
+ },
77
+ exclude_none=True)
78
+ # override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
79
+ _items = []
80
+ if self.component_rules:
81
+ for _item in self.component_rules:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['componentRules'] = _items
85
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
86
+ _field_dict = {}
87
+ if self.properties:
88
+ for _key in self.properties:
89
+ if self.properties[_key]:
90
+ _field_dict[_key] = self.properties[_key].to_dict()
91
+ _dict['properties'] = _field_dict
92
+ # set to None if display_name (nullable) is None
93
+ # and __fields_set__ contains the field
94
+ if self.display_name is None and "display_name" in self.__fields_set__:
95
+ _dict['displayName'] = None
96
+
97
+ # set to None if description (nullable) is None
98
+ # and __fields_set__ contains the field
99
+ if self.description is None and "description" in self.__fields_set__:
100
+ _dict['description'] = None
101
+
102
+ # set to None if properties (nullable) is None
103
+ # and __fields_set__ contains the field
104
+ if self.properties is None and "properties" in self.__fields_set__:
105
+ _dict['properties'] = None
106
+
107
+ return _dict
108
+
109
+ @classmethod
110
+ def from_dict(cls, obj: dict) -> FundConfigurationRequest:
111
+ """Create an instance of FundConfigurationRequest from a dict"""
112
+ if obj is None:
113
+ return None
114
+
115
+ if not isinstance(obj, dict):
116
+ return FundConfigurationRequest.parse_obj(obj)
117
+
118
+ _obj = FundConfigurationRequest.parse_obj({
119
+ "code": obj.get("code"),
120
+ "display_name": obj.get("displayName"),
121
+ "description": obj.get("description"),
122
+ "component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
123
+ "properties": dict(
124
+ (_k, ModelProperty.from_dict(_v))
125
+ for _k, _v in obj.get("properties").items()
126
+ )
127
+ if obj.get("properties") is not None
128
+ else None
129
+ })
130
+ return _obj
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Any, Dict, Optional, Union
22
+ from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
23
+ from lusid.models.instrument_event import InstrumentEvent
24
+
25
+ class FutureExpiryEvent(InstrumentEvent):
26
+ """
27
+ Definition of a Future Expiry Event. This is an event that describes the expiry of a Future instrument. # noqa: E501
28
+ """
29
+ expiry_date: datetime = Field(..., alias="expiryDate", description="Expiry date of the Future instrument.")
30
+ settlement_currency: StrictStr = Field(..., alias="settlementCurrency", description="Settlement currency of the Future instrument.")
31
+ notional_amount_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="notionalAmountPerUnit", description="The notional amount of each unit in the Future instrument.")
32
+ 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
+ additional_properties: Dict[str, Any] = {}
34
+ __properties = ["instrumentEventType", "expiryDate", "settlementCurrency", "notionalAmountPerUnit"]
35
+
36
+ @validator('instrument_event_type')
37
+ def instrument_event_type_validate_enum(cls, value):
38
+ """Validates the enum"""
39
+ 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'):
40
+ 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')")
41
+ return value
42
+
43
+ class Config:
44
+ """Pydantic configuration"""
45
+ allow_population_by_field_name = True
46
+ validate_assignment = True
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.dict(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> FutureExpiryEvent:
58
+ """Create an instance of FutureExpiryEvent from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self):
62
+ """Returns the dictionary representation of the model using alias"""
63
+ _dict = self.dict(by_alias=True,
64
+ exclude={
65
+ "additional_properties"
66
+ },
67
+ exclude_none=True)
68
+ # puts key-value pairs in additional_properties in the top level
69
+ if self.additional_properties is not None:
70
+ for _key, _value in self.additional_properties.items():
71
+ _dict[_key] = _value
72
+
73
+ # set to None if notional_amount_per_unit (nullable) is None
74
+ # and __fields_set__ contains the field
75
+ if self.notional_amount_per_unit is None and "notional_amount_per_unit" in self.__fields_set__:
76
+ _dict['notionalAmountPerUnit'] = None
77
+
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: dict) -> FutureExpiryEvent:
82
+ """Create an instance of FutureExpiryEvent from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return FutureExpiryEvent.parse_obj(obj)
88
+
89
+ _obj = FutureExpiryEvent.parse_obj({
90
+ "instrument_event_type": obj.get("instrumentEventType"),
91
+ "expiry_date": obj.get("expiryDate"),
92
+ "settlement_currency": obj.get("settlementCurrency"),
93
+ "notional_amount_per_unit": obj.get("notionalAmountPerUnit")
94
+ })
95
+ # store additional fields in additional_properties
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ _obj.additional_properties[_key] = obj.get(_key)
99
+
100
+ return _obj
@@ -37,15 +37,15 @@ class FxForwardSettlementEvent(InstrumentEvent):
37
37
  cash_flow_per_unit: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cashFlowPerUnit", description="Optional. Required if the event is an NDF (i.e. if IsNdf = true). CashFlow per unit. Paid in the SettlementCcy.")
38
38
  domestic_to_foreign_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="domesticToForeignRate", description="Domestic currency to foreign currency FX rate. Not required, only used to override quotes.")
39
39
  domestic_to_settlement_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="domesticToSettlementRate", description="Domestic currency to settlement currency FX rate Not required, only used to override quotes.")
40
- 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")
40
+ 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")
41
41
  additional_properties: Dict[str, Any] = {}
42
42
  __properties = ["instrumentEventType", "maturityDate", "domAmountPerUnit", "domCcy", "fgnAmountPerUnit", "fgnCcy", "isNdf", "fixingDate", "settlementCcy", "cashFlowPerUnit", "domesticToForeignRate", "domesticToSettlementRate"]
43
43
 
44
44
  @validator('instrument_event_type')
45
45
  def instrument_event_type_validate_enum(cls, value):
46
46
  """Validates the enum"""
47
- 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'):
48
- 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')")
47
+ 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'):
48
+ 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')")
49
49
  return value
50
50
 
51
51
  class Config:
@@ -29,15 +29,15 @@ class InformationalErrorEvent(InstrumentEvent):
29
29
  error_detail: constr(strict=True, min_length=1) = Field(..., alias="errorDetail", description="The details of the error")
30
30
  error_reason: constr(strict=True, min_length=1) = Field(..., alias="errorReason", description="The error reason")
31
31
  effective_at: datetime = Field(..., alias="effectiveAt", description="The effective date of the evaulation")
32
- 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")
32
+ 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
33
  additional_properties: Dict[str, Any] = {}
34
34
  __properties = ["instrumentEventType", "errorDetail", "errorReason", "effectiveAt"]
35
35
 
36
36
  @validator('instrument_event_type')
37
37
  def instrument_event_type_validate_enum(cls, value):
38
38
  """Validates the enum"""
39
- 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'):
40
- 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')")
39
+ 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'):
40
+ 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')")
41
41
  return value
42
42
 
43
43
  class Config: