lusid-sdk 2.1.242__py3-none-any.whl → 2.1.246__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lusid-sdk might be problematic. Click here for more details.
- lusid/__init__.py +8 -0
- lusid/api/entities_api.py +360 -0
- lusid/api/order_management_api.py +161 -1
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +8 -0
- lusid/models/dependency_source_filter.py +9 -2
- lusid/models/instrument_entity.py +146 -0
- lusid/models/placement_update_request.py +116 -0
- lusid/models/property_definition_entity.py +146 -0
- lusid/models/update_placements_response.py +153 -0
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.246.dist-info}/METADATA +10 -3
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.246.dist-info}/RECORD +13 -9
- {lusid_sdk-2.1.242.dist-info → lusid_sdk-2.1.246.dist-info}/WHEEL +0 -0
lusid/models/__init__.py
CHANGED
|
@@ -417,6 +417,7 @@ from lusid.models.instrument_cash_flow import InstrumentCashFlow
|
|
|
417
417
|
from lusid.models.instrument_definition import InstrumentDefinition
|
|
418
418
|
from lusid.models.instrument_definition_format import InstrumentDefinitionFormat
|
|
419
419
|
from lusid.models.instrument_delete_modes import InstrumentDeleteModes
|
|
420
|
+
from lusid.models.instrument_entity import InstrumentEntity
|
|
420
421
|
from lusid.models.instrument_event import InstrumentEvent
|
|
421
422
|
from lusid.models.instrument_event_configuration import InstrumentEventConfiguration
|
|
422
423
|
from lusid.models.instrument_event_holder import InstrumentEventHolder
|
|
@@ -613,6 +614,7 @@ from lusid.models.place_blocks_request import PlaceBlocksRequest
|
|
|
613
614
|
from lusid.models.placement import Placement
|
|
614
615
|
from lusid.models.placement_request import PlacementRequest
|
|
615
616
|
from lusid.models.placement_set_request import PlacementSetRequest
|
|
617
|
+
from lusid.models.placement_update_request import PlacementUpdateRequest
|
|
616
618
|
from lusid.models.portfolio import Portfolio
|
|
617
619
|
from lusid.models.portfolio_cash_flow import PortfolioCashFlow
|
|
618
620
|
from lusid.models.portfolio_cash_ladder import PortfolioCashLadder
|
|
@@ -649,6 +651,7 @@ from lusid.models.pricing_model import PricingModel
|
|
|
649
651
|
from lusid.models.pricing_options import PricingOptions
|
|
650
652
|
from lusid.models.processed_command import ProcessedCommand
|
|
651
653
|
from lusid.models.property_definition import PropertyDefinition
|
|
654
|
+
from lusid.models.property_definition_entity import PropertyDefinitionEntity
|
|
652
655
|
from lusid.models.property_definition_search_result import PropertyDefinitionSearchResult
|
|
653
656
|
from lusid.models.property_definition_type import PropertyDefinitionType
|
|
654
657
|
from lusid.models.property_domain import PropertyDomain
|
|
@@ -928,6 +931,7 @@ from lusid.models.update_data_type_request import UpdateDataTypeRequest
|
|
|
928
931
|
from lusid.models.update_derived_property_definition_request import UpdateDerivedPropertyDefinitionRequest
|
|
929
932
|
from lusid.models.update_fee_type_request import UpdateFeeTypeRequest
|
|
930
933
|
from lusid.models.update_instrument_identifier_request import UpdateInstrumentIdentifierRequest
|
|
934
|
+
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
|
931
935
|
from lusid.models.update_portfolio_group_request import UpdatePortfolioGroupRequest
|
|
932
936
|
from lusid.models.update_portfolio_request import UpdatePortfolioRequest
|
|
933
937
|
from lusid.models.update_property_definition_request import UpdatePropertyDefinitionRequest
|
|
@@ -1416,6 +1420,7 @@ __all__ = [
|
|
|
1416
1420
|
"InstrumentDefinition",
|
|
1417
1421
|
"InstrumentDefinitionFormat",
|
|
1418
1422
|
"InstrumentDeleteModes",
|
|
1423
|
+
"InstrumentEntity",
|
|
1419
1424
|
"InstrumentEvent",
|
|
1420
1425
|
"InstrumentEventConfiguration",
|
|
1421
1426
|
"InstrumentEventHolder",
|
|
@@ -1612,6 +1617,7 @@ __all__ = [
|
|
|
1612
1617
|
"Placement",
|
|
1613
1618
|
"PlacementRequest",
|
|
1614
1619
|
"PlacementSetRequest",
|
|
1620
|
+
"PlacementUpdateRequest",
|
|
1615
1621
|
"Portfolio",
|
|
1616
1622
|
"PortfolioCashFlow",
|
|
1617
1623
|
"PortfolioCashLadder",
|
|
@@ -1648,6 +1654,7 @@ __all__ = [
|
|
|
1648
1654
|
"PricingOptions",
|
|
1649
1655
|
"ProcessedCommand",
|
|
1650
1656
|
"PropertyDefinition",
|
|
1657
|
+
"PropertyDefinitionEntity",
|
|
1651
1658
|
"PropertyDefinitionSearchResult",
|
|
1652
1659
|
"PropertyDefinitionType",
|
|
1653
1660
|
"PropertyDomain",
|
|
@@ -1927,6 +1934,7 @@ __all__ = [
|
|
|
1927
1934
|
"UpdateDerivedPropertyDefinitionRequest",
|
|
1928
1935
|
"UpdateFeeTypeRequest",
|
|
1929
1936
|
"UpdateInstrumentIdentifierRequest",
|
|
1937
|
+
"UpdatePlacementsResponse",
|
|
1930
1938
|
"UpdatePortfolioGroupRequest",
|
|
1931
1939
|
"UpdatePortfolioRequest",
|
|
1932
1940
|
"UpdatePropertyDefinitionRequest",
|
|
@@ -28,7 +28,8 @@ class DependencySourceFilter(BaseModel):
|
|
|
28
28
|
instrument_type: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="instrumentType", description="Specify that a rule should only apply if the market data is requested by an instrument of a given instrument type. If null, then no filtering on instrument type is applied.")
|
|
29
29
|
asset_class: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, alias="assetClass", description="Specify that a rule should only apply if the market data is requested by an instrument of a given asset class. If null, then no filtering on asset class is applied.")
|
|
30
30
|
dom_ccy: Optional[StrictStr] = Field(None, alias="domCcy", description="Specify that a rule should only apply if the market data is requested by an instrument with a given domestic currency. If null, then no filtering on currency is applied.")
|
|
31
|
-
|
|
31
|
+
long_or_short_indicator: Optional[StrictStr] = Field(None, alias="longOrShortIndicator", description="Specify that a rule should apply if the market data is requested by a model with a given long or short indicator. If none, then no filtering on LongOrShortIndicator is applied.")
|
|
32
|
+
__properties = ["instrumentType", "assetClass", "domCcy", "longOrShortIndicator"]
|
|
32
33
|
|
|
33
34
|
class Config:
|
|
34
35
|
"""Pydantic configuration"""
|
|
@@ -69,6 +70,11 @@ class DependencySourceFilter(BaseModel):
|
|
|
69
70
|
if self.dom_ccy is None and "dom_ccy" in self.__fields_set__:
|
|
70
71
|
_dict['domCcy'] = None
|
|
71
72
|
|
|
73
|
+
# set to None if long_or_short_indicator (nullable) is None
|
|
74
|
+
# and __fields_set__ contains the field
|
|
75
|
+
if self.long_or_short_indicator is None and "long_or_short_indicator" in self.__fields_set__:
|
|
76
|
+
_dict['longOrShortIndicator'] = None
|
|
77
|
+
|
|
72
78
|
return _dict
|
|
73
79
|
|
|
74
80
|
@classmethod
|
|
@@ -83,6 +89,7 @@ class DependencySourceFilter(BaseModel):
|
|
|
83
89
|
_obj = DependencySourceFilter.parse_obj({
|
|
84
90
|
"instrument_type": obj.get("instrumentType"),
|
|
85
91
|
"asset_class": obj.get("assetClass"),
|
|
86
|
-
"dom_ccy": obj.get("domCcy")
|
|
92
|
+
"dom_ccy": obj.get("domCcy"),
|
|
93
|
+
"long_or_short_indicator": obj.get("longOrShortIndicator")
|
|
87
94
|
})
|
|
88
95
|
return _obj
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.instrument import Instrument
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
|
|
26
|
+
class InstrumentEntity(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A list of instruments. # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
31
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
|
32
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
|
33
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
|
34
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
|
35
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
|
36
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
|
37
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
|
38
|
+
prevailing_instrument: Optional[Instrument] = Field(None, alias="prevailingInstrument")
|
|
39
|
+
deleted_instrument: Optional[Instrument] = Field(None, alias="deletedInstrument")
|
|
40
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
|
41
|
+
previewed_instrument: Optional[Instrument] = Field(None, alias="previewedInstrument")
|
|
42
|
+
links: Optional[conlist(Link)] = None
|
|
43
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingInstrument", "deletedInstrument", "previewedStatus", "previewedInstrument", "links"]
|
|
44
|
+
|
|
45
|
+
class Config:
|
|
46
|
+
"""Pydantic configuration"""
|
|
47
|
+
allow_population_by_field_name = True
|
|
48
|
+
validate_assignment = True
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> InstrumentEntity:
|
|
60
|
+
"""Create an instance of InstrumentEntity from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
65
|
+
_dict = self.dict(by_alias=True,
|
|
66
|
+
exclude={
|
|
67
|
+
},
|
|
68
|
+
exclude_none=True)
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of prevailing_instrument
|
|
70
|
+
if self.prevailing_instrument:
|
|
71
|
+
_dict['prevailingInstrument'] = self.prevailing_instrument.to_dict()
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_instrument
|
|
73
|
+
if self.deleted_instrument:
|
|
74
|
+
_dict['deletedInstrument'] = self.deleted_instrument.to_dict()
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_instrument
|
|
76
|
+
if self.previewed_instrument:
|
|
77
|
+
_dict['previewedInstrument'] = self.previewed_instrument.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.links:
|
|
81
|
+
for _item in self.links:
|
|
82
|
+
if _item:
|
|
83
|
+
_items.append(_item.to_dict())
|
|
84
|
+
_dict['links'] = _items
|
|
85
|
+
# set to None if as_at_version_number (nullable) is None
|
|
86
|
+
# and __fields_set__ contains the field
|
|
87
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
|
88
|
+
_dict['asAtVersionNumber'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if as_at_deleted (nullable) is None
|
|
91
|
+
# and __fields_set__ contains the field
|
|
92
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
|
93
|
+
_dict['asAtDeleted'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if user_id_deleted (nullable) is None
|
|
96
|
+
# and __fields_set__ contains the field
|
|
97
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
|
98
|
+
_dict['userIdDeleted'] = None
|
|
99
|
+
|
|
100
|
+
# set to None if request_id_deleted (nullable) is None
|
|
101
|
+
# and __fields_set__ contains the field
|
|
102
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
|
103
|
+
_dict['requestIdDeleted'] = None
|
|
104
|
+
|
|
105
|
+
# set to None if effective_at_created (nullable) is None
|
|
106
|
+
# and __fields_set__ contains the field
|
|
107
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
|
108
|
+
_dict['effectiveAtCreated'] = None
|
|
109
|
+
|
|
110
|
+
# set to None if previewed_status (nullable) is None
|
|
111
|
+
# and __fields_set__ contains the field
|
|
112
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
|
113
|
+
_dict['previewedStatus'] = None
|
|
114
|
+
|
|
115
|
+
# set to None if links (nullable) is None
|
|
116
|
+
# and __fields_set__ contains the field
|
|
117
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
118
|
+
_dict['links'] = None
|
|
119
|
+
|
|
120
|
+
return _dict
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_dict(cls, obj: dict) -> InstrumentEntity:
|
|
124
|
+
"""Create an instance of InstrumentEntity from a dict"""
|
|
125
|
+
if obj is None:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
if not isinstance(obj, dict):
|
|
129
|
+
return InstrumentEntity.parse_obj(obj)
|
|
130
|
+
|
|
131
|
+
_obj = InstrumentEntity.parse_obj({
|
|
132
|
+
"href": obj.get("href"),
|
|
133
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
|
134
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
|
135
|
+
"status": obj.get("status"),
|
|
136
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
|
137
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
|
138
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
|
139
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
|
140
|
+
"prevailing_instrument": Instrument.from_dict(obj.get("prevailingInstrument")) if obj.get("prevailingInstrument") is not None else None,
|
|
141
|
+
"deleted_instrument": Instrument.from_dict(obj.get("deletedInstrument")) if obj.get("deletedInstrument") is not None else None,
|
|
142
|
+
"previewed_status": obj.get("previewedStatus"),
|
|
143
|
+
"previewed_instrument": Instrument.from_dict(obj.get("previewedInstrument")) if obj.get("previewedInstrument") is not None else None,
|
|
144
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
145
|
+
})
|
|
146
|
+
return _obj
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from typing import Any, Dict, Optional, Union
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr
|
|
23
|
+
from lusid.models.perpetual_property import PerpetualProperty
|
|
24
|
+
from lusid.models.resource_id import ResourceId
|
|
25
|
+
|
|
26
|
+
class PlacementUpdateRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A request to create or update a Placement. # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
id: ResourceId = Field(...)
|
|
31
|
+
quantity: Union[StrictFloat, StrictInt] = Field(..., description="The quantity of given instrument ordered.")
|
|
32
|
+
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="Client-defined properties associated with this placement.")
|
|
33
|
+
counterparty: Optional[StrictStr] = Field(None, description="Optionally specifies the market entity this placement is placed with.")
|
|
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.")
|
|
35
|
+
entry_type: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="entryType", description="Optionally specifies the entry type of this placement.")
|
|
36
|
+
__properties = ["id", "quantity", "properties", "counterparty", "executionSystem", "entryType"]
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
"""Pydantic configuration"""
|
|
40
|
+
allow_population_by_field_name = True
|
|
41
|
+
validate_assignment = True
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> PlacementUpdateRequest:
|
|
53
|
+
"""Create an instance of PlacementUpdateRequest from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self):
|
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
58
|
+
_dict = self.dict(by_alias=True,
|
|
59
|
+
exclude={
|
|
60
|
+
},
|
|
61
|
+
exclude_none=True)
|
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
|
63
|
+
if self.id:
|
|
64
|
+
_dict['id'] = self.id.to_dict()
|
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
|
66
|
+
_field_dict = {}
|
|
67
|
+
if self.properties:
|
|
68
|
+
for _key in self.properties:
|
|
69
|
+
if self.properties[_key]:
|
|
70
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
|
71
|
+
_dict['properties'] = _field_dict
|
|
72
|
+
# set to None if properties (nullable) is None
|
|
73
|
+
# and __fields_set__ contains the field
|
|
74
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
|
75
|
+
_dict['properties'] = None
|
|
76
|
+
|
|
77
|
+
# set to None if counterparty (nullable) is None
|
|
78
|
+
# and __fields_set__ contains the field
|
|
79
|
+
if self.counterparty is None and "counterparty" in self.__fields_set__:
|
|
80
|
+
_dict['counterparty'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if execution_system (nullable) is None
|
|
83
|
+
# and __fields_set__ contains the field
|
|
84
|
+
if self.execution_system is None and "execution_system" in self.__fields_set__:
|
|
85
|
+
_dict['executionSystem'] = None
|
|
86
|
+
|
|
87
|
+
# set to None if entry_type (nullable) is None
|
|
88
|
+
# and __fields_set__ contains the field
|
|
89
|
+
if self.entry_type is None and "entry_type" in self.__fields_set__:
|
|
90
|
+
_dict['entryType'] = None
|
|
91
|
+
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: dict) -> PlacementUpdateRequest:
|
|
96
|
+
"""Create an instance of PlacementUpdateRequest from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return PlacementUpdateRequest.parse_obj(obj)
|
|
102
|
+
|
|
103
|
+
_obj = PlacementUpdateRequest.parse_obj({
|
|
104
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
|
105
|
+
"quantity": obj.get("quantity"),
|
|
106
|
+
"properties": dict(
|
|
107
|
+
(_k, PerpetualProperty.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
|
+
"counterparty": obj.get("counterparty"),
|
|
113
|
+
"execution_system": obj.get("executionSystem"),
|
|
114
|
+
"entry_type": obj.get("entryType")
|
|
115
|
+
})
|
|
116
|
+
return _obj
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
LUSID API
|
|
5
|
+
|
|
6
|
+
FINBOURNE Technology # noqa: E501
|
|
7
|
+
|
|
8
|
+
Contact: info@finbourne.com
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.link import Link
|
|
24
|
+
from lusid.models.property_definition import PropertyDefinition
|
|
25
|
+
|
|
26
|
+
class PropertyDefinitionEntity(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PropertyDefinitionEntity
|
|
29
|
+
"""
|
|
30
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
31
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
|
32
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
|
33
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
|
34
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
|
35
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
|
36
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
|
37
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
|
38
|
+
prevailing_property_definition: Optional[PropertyDefinition] = Field(None, alias="prevailingPropertyDefinition")
|
|
39
|
+
deleted_property_definition: Optional[PropertyDefinition] = Field(None, alias="deletedPropertyDefinition")
|
|
40
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
|
41
|
+
previewed_property_definition: Optional[PropertyDefinition] = Field(None, alias="previewedPropertyDefinition")
|
|
42
|
+
links: Optional[conlist(Link)] = None
|
|
43
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingPropertyDefinition", "deletedPropertyDefinition", "previewedStatus", "previewedPropertyDefinition", "links"]
|
|
44
|
+
|
|
45
|
+
class Config:
|
|
46
|
+
"""Pydantic configuration"""
|
|
47
|
+
allow_population_by_field_name = True
|
|
48
|
+
validate_assignment = True
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> PropertyDefinitionEntity:
|
|
60
|
+
"""Create an instance of PropertyDefinitionEntity from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
65
|
+
_dict = self.dict(by_alias=True,
|
|
66
|
+
exclude={
|
|
67
|
+
},
|
|
68
|
+
exclude_none=True)
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of prevailing_property_definition
|
|
70
|
+
if self.prevailing_property_definition:
|
|
71
|
+
_dict['prevailingPropertyDefinition'] = self.prevailing_property_definition.to_dict()
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_property_definition
|
|
73
|
+
if self.deleted_property_definition:
|
|
74
|
+
_dict['deletedPropertyDefinition'] = self.deleted_property_definition.to_dict()
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_property_definition
|
|
76
|
+
if self.previewed_property_definition:
|
|
77
|
+
_dict['previewedPropertyDefinition'] = self.previewed_property_definition.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.links:
|
|
81
|
+
for _item in self.links:
|
|
82
|
+
if _item:
|
|
83
|
+
_items.append(_item.to_dict())
|
|
84
|
+
_dict['links'] = _items
|
|
85
|
+
# set to None if as_at_version_number (nullable) is None
|
|
86
|
+
# and __fields_set__ contains the field
|
|
87
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
|
88
|
+
_dict['asAtVersionNumber'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if as_at_deleted (nullable) is None
|
|
91
|
+
# and __fields_set__ contains the field
|
|
92
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
|
93
|
+
_dict['asAtDeleted'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if user_id_deleted (nullable) is None
|
|
96
|
+
# and __fields_set__ contains the field
|
|
97
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
|
98
|
+
_dict['userIdDeleted'] = None
|
|
99
|
+
|
|
100
|
+
# set to None if request_id_deleted (nullable) is None
|
|
101
|
+
# and __fields_set__ contains the field
|
|
102
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
|
103
|
+
_dict['requestIdDeleted'] = None
|
|
104
|
+
|
|
105
|
+
# set to None if effective_at_created (nullable) is None
|
|
106
|
+
# and __fields_set__ contains the field
|
|
107
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
|
108
|
+
_dict['effectiveAtCreated'] = None
|
|
109
|
+
|
|
110
|
+
# set to None if previewed_status (nullable) is None
|
|
111
|
+
# and __fields_set__ contains the field
|
|
112
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
|
113
|
+
_dict['previewedStatus'] = None
|
|
114
|
+
|
|
115
|
+
# set to None if links (nullable) is None
|
|
116
|
+
# and __fields_set__ contains the field
|
|
117
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
118
|
+
_dict['links'] = None
|
|
119
|
+
|
|
120
|
+
return _dict
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_dict(cls, obj: dict) -> PropertyDefinitionEntity:
|
|
124
|
+
"""Create an instance of PropertyDefinitionEntity from a dict"""
|
|
125
|
+
if obj is None:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
if not isinstance(obj, dict):
|
|
129
|
+
return PropertyDefinitionEntity.parse_obj(obj)
|
|
130
|
+
|
|
131
|
+
_obj = PropertyDefinitionEntity.parse_obj({
|
|
132
|
+
"href": obj.get("href"),
|
|
133
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
|
134
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
|
135
|
+
"status": obj.get("status"),
|
|
136
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
|
137
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
|
138
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
|
139
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
|
140
|
+
"prevailing_property_definition": PropertyDefinition.from_dict(obj.get("prevailingPropertyDefinition")) if obj.get("prevailingPropertyDefinition") is not None else None,
|
|
141
|
+
"deleted_property_definition": PropertyDefinition.from_dict(obj.get("deletedPropertyDefinition")) if obj.get("deletedPropertyDefinition") is not None else None,
|
|
142
|
+
"previewed_status": obj.get("previewedStatus"),
|
|
143
|
+
"previewed_property_definition": PropertyDefinition.from_dict(obj.get("previewedPropertyDefinition")) if obj.get("previewedPropertyDefinition") is not None else None,
|
|
144
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
145
|
+
})
|
|
146
|
+
return _obj
|
|
@@ -0,0 +1,153 @@
|
|
|
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.error_detail import ErrorDetail
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
from lusid.models.placement import Placement
|
|
26
|
+
from lusid.models.response_meta_data import ResponseMetaData
|
|
27
|
+
|
|
28
|
+
class UpdatePlacementsResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
UpdatePlacementsResponse
|
|
31
|
+
"""
|
|
32
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
33
|
+
values: Optional[Dict[str, Placement]] = Field(None, description="The placements which have been successfully updated.")
|
|
34
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The placements that could not be updated, along with a reason for their failure.")
|
|
35
|
+
metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Meta data associated with the update event.")
|
|
36
|
+
links: Optional[conlist(Link)] = None
|
|
37
|
+
__properties = ["href", "values", "failed", "metadata", "links"]
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
"""Pydantic configuration"""
|
|
41
|
+
allow_population_by_field_name = True
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> UpdatePlacementsResponse:
|
|
54
|
+
"""Create an instance of UpdatePlacementsResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self):
|
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
59
|
+
_dict = self.dict(by_alias=True,
|
|
60
|
+
exclude={
|
|
61
|
+
},
|
|
62
|
+
exclude_none=True)
|
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each value in values (dict)
|
|
64
|
+
_field_dict = {}
|
|
65
|
+
if self.values:
|
|
66
|
+
for _key in self.values:
|
|
67
|
+
if self.values[_key]:
|
|
68
|
+
_field_dict[_key] = self.values[_key].to_dict()
|
|
69
|
+
_dict['values'] = _field_dict
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
|
|
71
|
+
_field_dict = {}
|
|
72
|
+
if self.failed:
|
|
73
|
+
for _key in self.failed:
|
|
74
|
+
if self.failed[_key]:
|
|
75
|
+
_field_dict[_key] = self.failed[_key].to_dict()
|
|
76
|
+
_dict['failed'] = _field_dict
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
|
78
|
+
_field_dict_of_array = {}
|
|
79
|
+
if self.metadata:
|
|
80
|
+
for _key in self.metadata:
|
|
81
|
+
if self.metadata[_key]:
|
|
82
|
+
_field_dict_of_array[_key] = [
|
|
83
|
+
_item.to_dict() for _item in self.metadata[_key]
|
|
84
|
+
]
|
|
85
|
+
_dict['metadata'] = _field_dict_of_array
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
87
|
+
_items = []
|
|
88
|
+
if self.links:
|
|
89
|
+
for _item in self.links:
|
|
90
|
+
if _item:
|
|
91
|
+
_items.append(_item.to_dict())
|
|
92
|
+
_dict['links'] = _items
|
|
93
|
+
# set to None if href (nullable) is None
|
|
94
|
+
# and __fields_set__ contains the field
|
|
95
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
96
|
+
_dict['href'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if values (nullable) is None
|
|
99
|
+
# and __fields_set__ contains the field
|
|
100
|
+
if self.values is None and "values" in self.__fields_set__:
|
|
101
|
+
_dict['values'] = None
|
|
102
|
+
|
|
103
|
+
# set to None if failed (nullable) is None
|
|
104
|
+
# and __fields_set__ contains the field
|
|
105
|
+
if self.failed is None and "failed" in self.__fields_set__:
|
|
106
|
+
_dict['failed'] = None
|
|
107
|
+
|
|
108
|
+
# set to None if metadata (nullable) is None
|
|
109
|
+
# and __fields_set__ contains the field
|
|
110
|
+
if self.metadata is None and "metadata" in self.__fields_set__:
|
|
111
|
+
_dict['metadata'] = None
|
|
112
|
+
|
|
113
|
+
# set to None if links (nullable) is None
|
|
114
|
+
# and __fields_set__ contains the field
|
|
115
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
116
|
+
_dict['links'] = None
|
|
117
|
+
|
|
118
|
+
return _dict
|
|
119
|
+
|
|
120
|
+
@classmethod
|
|
121
|
+
def from_dict(cls, obj: dict) -> UpdatePlacementsResponse:
|
|
122
|
+
"""Create an instance of UpdatePlacementsResponse from a dict"""
|
|
123
|
+
if obj is None:
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
if not isinstance(obj, dict):
|
|
127
|
+
return UpdatePlacementsResponse.parse_obj(obj)
|
|
128
|
+
|
|
129
|
+
_obj = UpdatePlacementsResponse.parse_obj({
|
|
130
|
+
"href": obj.get("href"),
|
|
131
|
+
"values": dict(
|
|
132
|
+
(_k, Placement.from_dict(_v))
|
|
133
|
+
for _k, _v in obj.get("values").items()
|
|
134
|
+
)
|
|
135
|
+
if obj.get("values") is not None
|
|
136
|
+
else None,
|
|
137
|
+
"failed": dict(
|
|
138
|
+
(_k, ErrorDetail.from_dict(_v))
|
|
139
|
+
for _k, _v in obj.get("failed").items()
|
|
140
|
+
)
|
|
141
|
+
if obj.get("failed") is not None
|
|
142
|
+
else None,
|
|
143
|
+
"metadata": dict(
|
|
144
|
+
(_k,
|
|
145
|
+
[ResponseMetaData.from_dict(_item) for _item in _v]
|
|
146
|
+
if _v is not None
|
|
147
|
+
else None
|
|
148
|
+
)
|
|
149
|
+
for _k, _v in obj.get("metadata").items()
|
|
150
|
+
),
|
|
151
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
152
|
+
})
|
|
153
|
+
return _obj
|