lusid-sdk 2.1.788__py3-none-any.whl → 2.1.789__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.
- lusid/__init__.py +10 -0
- lusid/api/__init__.py +2 -0
- lusid/api/aggregated_returns_api.py +701 -0
- lusid/api/order_management_api.py +161 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +8 -0
- lusid/models/resource_list_of_returns_entity.py +121 -0
- lusid/models/returns_entity.py +121 -0
- lusid/models/sweep_blocks_request.py +92 -0
- lusid/models/sweep_blocks_response.py +115 -0
- {lusid_sdk-2.1.788.dist-info → lusid_sdk-2.1.789.dist-info}/METADATA +10 -1
- {lusid_sdk-2.1.788.dist-info → lusid_sdk-2.1.789.dist-info}/RECORD +13 -8
- {lusid_sdk-2.1.788.dist-info → lusid_sdk-2.1.789.dist-info}/WHEEL +0 -0
@@ -43,6 +43,8 @@ from lusid.models.resource_list_of_block_and_orders import ResourceListOfBlockAn
|
|
43
43
|
from lusid.models.resource_list_of_change_interval_with_order_management_detail import ResourceListOfChangeIntervalWithOrderManagementDetail
|
44
44
|
from lusid.models.resource_list_of_moved_order_to_different_block_response import ResourceListOfMovedOrderToDifferentBlockResponse
|
45
45
|
from lusid.models.resource_list_of_placement import ResourceListOfPlacement
|
46
|
+
from lusid.models.sweep_blocks_request import SweepBlocksRequest
|
47
|
+
from lusid.models.sweep_blocks_response import SweepBlocksResponse
|
46
48
|
from lusid.models.update_orders_response import UpdateOrdersResponse
|
47
49
|
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
48
50
|
|
@@ -1548,6 +1550,165 @@ class OrderManagementApi:
|
|
1548
1550
|
_request_auth=_params.get('_request_auth'))
|
1549
1551
|
|
1550
1552
|
|
1553
|
+
@overload
|
1554
|
+
async def sweep_blocks(self, sweep_blocks_request : SweepBlocksRequest, **kwargs) -> SweepBlocksResponse: # noqa: E501
|
1555
|
+
...
|
1556
|
+
|
1557
|
+
@overload
|
1558
|
+
def sweep_blocks(self, sweep_blocks_request : SweepBlocksRequest, async_req: Optional[bool]=True, **kwargs) -> SweepBlocksResponse: # noqa: E501
|
1559
|
+
...
|
1560
|
+
|
1561
|
+
@validate_arguments
|
1562
|
+
def sweep_blocks(self, sweep_blocks_request : SweepBlocksRequest, async_req: Optional[bool]=None, **kwargs) -> Union[SweepBlocksResponse, Awaitable[SweepBlocksResponse]]: # noqa: E501
|
1563
|
+
"""[EXPERIMENTAL] SweepBlocks: Sweeps specified blocks, for each block that meets the requirements. The request may be partially successful. # noqa: E501
|
1564
|
+
|
1565
|
+
The requirements are: <list type=\"bullet\"><term>The block exists.</term><term>All orders have state \"Closed\", \"Cancelled\", \"Canceled\" or \"Booked\".</term><term>All placements have state \"Allocated\" or \"Over-allocated\".</term><term>All allocations have state \"Closed\", \"Cancelled\", \"Canceled\" or \"Booked\".</term><term>No execution or allocation has been modified since the passed LatestAllowableModificationTime.</term></list> # noqa: E501
|
1566
|
+
This method makes a synchronous HTTP request by default. To make an
|
1567
|
+
asynchronous HTTP request, please pass async_req=True
|
1568
|
+
|
1569
|
+
>>> thread = api.sweep_blocks(sweep_blocks_request, async_req=True)
|
1570
|
+
>>> result = thread.get()
|
1571
|
+
|
1572
|
+
:param sweep_blocks_request: (required)
|
1573
|
+
:type sweep_blocks_request: SweepBlocksRequest
|
1574
|
+
:param async_req: Whether to execute the request asynchronously.
|
1575
|
+
:type async_req: bool, optional
|
1576
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
1577
|
+
:param opts: Configuration options for this request
|
1578
|
+
:type opts: ConfigurationOptions, optional
|
1579
|
+
:return: Returns the result object.
|
1580
|
+
If the method is called asynchronously,
|
1581
|
+
returns the request thread.
|
1582
|
+
:rtype: SweepBlocksResponse
|
1583
|
+
"""
|
1584
|
+
kwargs['_return_http_data_only'] = True
|
1585
|
+
if '_preload_content' in kwargs:
|
1586
|
+
message = "Error! Please call the sweep_blocks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
1587
|
+
raise ValueError(message)
|
1588
|
+
if async_req is not None:
|
1589
|
+
kwargs['async_req'] = async_req
|
1590
|
+
return self.sweep_blocks_with_http_info(sweep_blocks_request, **kwargs) # noqa: E501
|
1591
|
+
|
1592
|
+
@validate_arguments
|
1593
|
+
def sweep_blocks_with_http_info(self, sweep_blocks_request : SweepBlocksRequest, **kwargs) -> ApiResponse: # noqa: E501
|
1594
|
+
"""[EXPERIMENTAL] SweepBlocks: Sweeps specified blocks, for each block that meets the requirements. The request may be partially successful. # noqa: E501
|
1595
|
+
|
1596
|
+
The requirements are: <list type=\"bullet\"><term>The block exists.</term><term>All orders have state \"Closed\", \"Cancelled\", \"Canceled\" or \"Booked\".</term><term>All placements have state \"Allocated\" or \"Over-allocated\".</term><term>All allocations have state \"Closed\", \"Cancelled\", \"Canceled\" or \"Booked\".</term><term>No execution or allocation has been modified since the passed LatestAllowableModificationTime.</term></list> # noqa: E501
|
1597
|
+
This method makes a synchronous HTTP request by default. To make an
|
1598
|
+
asynchronous HTTP request, please pass async_req=True
|
1599
|
+
|
1600
|
+
>>> thread = api.sweep_blocks_with_http_info(sweep_blocks_request, async_req=True)
|
1601
|
+
>>> result = thread.get()
|
1602
|
+
|
1603
|
+
:param sweep_blocks_request: (required)
|
1604
|
+
:type sweep_blocks_request: SweepBlocksRequest
|
1605
|
+
:param async_req: Whether to execute the request asynchronously.
|
1606
|
+
:type async_req: bool, optional
|
1607
|
+
:param _preload_content: if False, the ApiResponse.data will
|
1608
|
+
be set to none and raw_data will store the
|
1609
|
+
HTTP response body without reading/decoding.
|
1610
|
+
Default is True.
|
1611
|
+
:type _preload_content: bool, optional
|
1612
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
1613
|
+
object with status code, headers, etc
|
1614
|
+
:type _return_http_data_only: bool, optional
|
1615
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
1616
|
+
:param opts: Configuration options for this request
|
1617
|
+
:type opts: ConfigurationOptions, optional
|
1618
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1619
|
+
request; this effectively ignores the authentication
|
1620
|
+
in the spec for a single request.
|
1621
|
+
:type _request_auth: dict, optional
|
1622
|
+
:type _content_type: string, optional: force content-type for the request
|
1623
|
+
:return: Returns the result object.
|
1624
|
+
If the method is called asynchronously,
|
1625
|
+
returns the request thread.
|
1626
|
+
:rtype: tuple(SweepBlocksResponse, status_code(int), headers(HTTPHeaderDict))
|
1627
|
+
"""
|
1628
|
+
|
1629
|
+
_params = locals()
|
1630
|
+
|
1631
|
+
_all_params = [
|
1632
|
+
'sweep_blocks_request'
|
1633
|
+
]
|
1634
|
+
_all_params.extend(
|
1635
|
+
[
|
1636
|
+
'async_req',
|
1637
|
+
'_return_http_data_only',
|
1638
|
+
'_preload_content',
|
1639
|
+
'_request_timeout',
|
1640
|
+
'_request_auth',
|
1641
|
+
'_content_type',
|
1642
|
+
'_headers',
|
1643
|
+
'opts'
|
1644
|
+
]
|
1645
|
+
)
|
1646
|
+
|
1647
|
+
# validate the arguments
|
1648
|
+
for _key, _val in _params['kwargs'].items():
|
1649
|
+
if _key not in _all_params:
|
1650
|
+
raise ApiTypeError(
|
1651
|
+
"Got an unexpected keyword argument '%s'"
|
1652
|
+
" to method sweep_blocks" % _key
|
1653
|
+
)
|
1654
|
+
_params[_key] = _val
|
1655
|
+
del _params['kwargs']
|
1656
|
+
|
1657
|
+
_collection_formats = {}
|
1658
|
+
|
1659
|
+
# process the path parameters
|
1660
|
+
_path_params = {}
|
1661
|
+
|
1662
|
+
# process the query parameters
|
1663
|
+
_query_params = []
|
1664
|
+
# process the header parameters
|
1665
|
+
_header_params = dict(_params.get('_headers', {}))
|
1666
|
+
# process the form parameters
|
1667
|
+
_form_params = []
|
1668
|
+
_files = {}
|
1669
|
+
# process the body parameter
|
1670
|
+
_body_params = None
|
1671
|
+
if _params['sweep_blocks_request'] is not None:
|
1672
|
+
_body_params = _params['sweep_blocks_request']
|
1673
|
+
|
1674
|
+
# set the HTTP header `Accept`
|
1675
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1676
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
1677
|
+
|
1678
|
+
# set the HTTP header `Content-Type`
|
1679
|
+
_content_types_list = _params.get('_content_type',
|
1680
|
+
self.api_client.select_header_content_type(
|
1681
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
1682
|
+
if _content_types_list:
|
1683
|
+
_header_params['Content-Type'] = _content_types_list
|
1684
|
+
|
1685
|
+
# authentication setting
|
1686
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
1687
|
+
|
1688
|
+
_response_types_map = {
|
1689
|
+
'200': "SweepBlocksResponse",
|
1690
|
+
'400': "LusidValidationProblemDetails",
|
1691
|
+
}
|
1692
|
+
|
1693
|
+
return self.api_client.call_api(
|
1694
|
+
'/api/ordermanagement/SweepBlocks', 'POST',
|
1695
|
+
_path_params,
|
1696
|
+
_query_params,
|
1697
|
+
_header_params,
|
1698
|
+
body=_body_params,
|
1699
|
+
post_params=_form_params,
|
1700
|
+
files=_files,
|
1701
|
+
response_types_map=_response_types_map,
|
1702
|
+
auth_settings=_auth_settings,
|
1703
|
+
async_req=_params.get('async_req'),
|
1704
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1705
|
+
_preload_content=_params.get('_preload_content', True),
|
1706
|
+
_request_timeout=_params.get('_request_timeout'),
|
1707
|
+
opts=_params.get('opts'),
|
1708
|
+
collection_formats=_collection_formats,
|
1709
|
+
_request_auth=_params.get('_request_auth'))
|
1710
|
+
|
1711
|
+
|
1551
1712
|
@overload
|
1552
1713
|
async def update_orders(self, request_body : Annotated[Dict[str, OrderUpdateRequest], Field(..., description="The request containing the orders to be updated.")], **kwargs) -> UpdateOrdersResponse: # noqa: E501
|
1553
1714
|
...
|
lusid/configuration.py
CHANGED
@@ -445,7 +445,7 @@ class Configuration:
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
446
446
|
"OS: {env}\n"\
|
447
447
|
"Python Version: {pyversion}\n"\
|
448
|
-
"Version of the API: 0.11.
|
448
|
+
"Version of the API: 0.11.7769\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
lusid/models/__init__.py
CHANGED
@@ -944,6 +944,7 @@ from lusid.models.resource_list_of_quote_access_metadata_rule import ResourceLis
|
|
944
944
|
from lusid.models.resource_list_of_reconciliation_break import ResourceListOfReconciliationBreak
|
945
945
|
from lusid.models.resource_list_of_relation import ResourceListOfRelation
|
946
946
|
from lusid.models.resource_list_of_relationship import ResourceListOfRelationship
|
947
|
+
from lusid.models.resource_list_of_returns_entity import ResourceListOfReturnsEntity
|
947
948
|
from lusid.models.resource_list_of_scope_definition import ResourceListOfScopeDefinition
|
948
949
|
from lusid.models.resource_list_of_side_definition import ResourceListOfSideDefinition
|
949
950
|
from lusid.models.resource_list_of_string import ResourceListOfString
|
@@ -967,6 +968,7 @@ from lusid.models.result_value_int import ResultValueInt
|
|
967
968
|
from lusid.models.result_value_string import ResultValueString
|
968
969
|
from lusid.models.result_value_type import ResultValueType
|
969
970
|
from lusid.models.return_zero_pv_options import ReturnZeroPvOptions
|
971
|
+
from lusid.models.returns_entity import ReturnsEntity
|
970
972
|
from lusid.models.reverse_stock_split_event import ReverseStockSplitEvent
|
971
973
|
from lusid.models.rollover_constituent import RolloverConstituent
|
972
974
|
from lusid.models.rounding_configuration import RoundingConfiguration
|
@@ -1034,6 +1036,8 @@ from lusid.models.structured_result_data_id import StructuredResultDataId
|
|
1034
1036
|
from lusid.models.sub_holding_key_value_equals import SubHoldingKeyValueEquals
|
1035
1037
|
from lusid.models.swap_cash_flow_event import SwapCashFlowEvent
|
1036
1038
|
from lusid.models.swap_principal_event import SwapPrincipalEvent
|
1039
|
+
from lusid.models.sweep_blocks_request import SweepBlocksRequest
|
1040
|
+
from lusid.models.sweep_blocks_response import SweepBlocksResponse
|
1037
1041
|
from lusid.models.target_tax_lot import TargetTaxLot
|
1038
1042
|
from lusid.models.target_tax_lot_request import TargetTaxLotRequest
|
1039
1043
|
from lusid.models.tax_rule import TaxRule
|
@@ -2160,6 +2164,7 @@ __all__ = [
|
|
2160
2164
|
"ResourceListOfReconciliationBreak",
|
2161
2165
|
"ResourceListOfRelation",
|
2162
2166
|
"ResourceListOfRelationship",
|
2167
|
+
"ResourceListOfReturnsEntity",
|
2163
2168
|
"ResourceListOfScopeDefinition",
|
2164
2169
|
"ResourceListOfSideDefinition",
|
2165
2170
|
"ResourceListOfString",
|
@@ -2183,6 +2188,7 @@ __all__ = [
|
|
2183
2188
|
"ResultValueString",
|
2184
2189
|
"ResultValueType",
|
2185
2190
|
"ReturnZeroPvOptions",
|
2191
|
+
"ReturnsEntity",
|
2186
2192
|
"ReverseStockSplitEvent",
|
2187
2193
|
"RolloverConstituent",
|
2188
2194
|
"RoundingConfiguration",
|
@@ -2250,6 +2256,8 @@ __all__ = [
|
|
2250
2256
|
"SubHoldingKeyValueEquals",
|
2251
2257
|
"SwapCashFlowEvent",
|
2252
2258
|
"SwapPrincipalEvent",
|
2259
|
+
"SweepBlocksRequest",
|
2260
|
+
"SweepBlocksResponse",
|
2253
2261
|
"TargetTaxLot",
|
2254
2262
|
"TargetTaxLotRequest",
|
2255
2263
|
"TaxRule",
|
@@ -0,0 +1,121 @@
|
|
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 StrictStr, Field, BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.link import Link
|
24
|
+
from lusid.models.returns_entity import ReturnsEntity
|
25
|
+
|
26
|
+
class ResourceListOfReturnsEntity(BaseModel):
|
27
|
+
"""
|
28
|
+
ResourceListOfReturnsEntity
|
29
|
+
"""
|
30
|
+
values: conlist(ReturnsEntity) = Field(...)
|
31
|
+
href: Optional[StrictStr] = Field(None,alias="href")
|
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 __str__(self):
|
43
|
+
"""For `print` and `pprint`"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=False))
|
45
|
+
|
46
|
+
def __repr__(self):
|
47
|
+
"""For `print` and `pprint`"""
|
48
|
+
return self.to_str()
|
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) -> ResourceListOfReturnsEntity:
|
60
|
+
"""Create an instance of ResourceListOfReturnsEntity 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 each item in values (list)
|
70
|
+
_items = []
|
71
|
+
if self.values:
|
72
|
+
for _item in self.values:
|
73
|
+
if _item:
|
74
|
+
_items.append(_item.to_dict())
|
75
|
+
_dict['values'] = _items
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
77
|
+
_items = []
|
78
|
+
if self.links:
|
79
|
+
for _item in self.links:
|
80
|
+
if _item:
|
81
|
+
_items.append(_item.to_dict())
|
82
|
+
_dict['links'] = _items
|
83
|
+
# set to None if href (nullable) is None
|
84
|
+
# and __fields_set__ contains the field
|
85
|
+
if self.href is None and "href" in self.__fields_set__:
|
86
|
+
_dict['href'] = 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
|
+
# set to None if next_page (nullable) is None
|
94
|
+
# and __fields_set__ contains the field
|
95
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
96
|
+
_dict['nextPage'] = None
|
97
|
+
|
98
|
+
# set to None if previous_page (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
101
|
+
_dict['previousPage'] = None
|
102
|
+
|
103
|
+
return _dict
|
104
|
+
|
105
|
+
@classmethod
|
106
|
+
def from_dict(cls, obj: dict) -> ResourceListOfReturnsEntity:
|
107
|
+
"""Create an instance of ResourceListOfReturnsEntity from a dict"""
|
108
|
+
if obj is None:
|
109
|
+
return None
|
110
|
+
|
111
|
+
if not isinstance(obj, dict):
|
112
|
+
return ResourceListOfReturnsEntity.parse_obj(obj)
|
113
|
+
|
114
|
+
_obj = ResourceListOfReturnsEntity.parse_obj({
|
115
|
+
"values": [ReturnsEntity.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
116
|
+
"href": obj.get("href"),
|
117
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None,
|
118
|
+
"next_page": obj.get("nextPage"),
|
119
|
+
"previous_page": obj.get("previousPage")
|
120
|
+
})
|
121
|
+
return _obj
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, constr
|
23
|
+
from lusid.models.resource_id import ResourceId
|
24
|
+
|
25
|
+
class ReturnsEntity(BaseModel):
|
26
|
+
"""
|
27
|
+
Returns entity, used for configuring the calculation of aggregated returns. # noqa: E501
|
28
|
+
"""
|
29
|
+
id: ResourceId = Field(...)
|
30
|
+
recipe_id: Optional[ResourceId] = Field(None, alias="recipeId")
|
31
|
+
recipe_entity: Optional[StrictStr] = Field(None,alias="recipeEntity", description="Entity a recipe is retrieved from for use in the aggregated returns calculation. Either RecipeId or RecipeEntity must be specified.")
|
32
|
+
fee_handling: Optional[StrictStr] = Field(None,alias="feeHandling", description="Configures how fees are handled in the aggregated returns calculation.")
|
33
|
+
flow_handling: Optional[StrictStr] = Field(None,alias="flowHandling", description="Configures how flows are handled in the aggregated returns calculation.")
|
34
|
+
business_calendar: Optional[StrictStr] = Field(None,alias="businessCalendar", description="Calendar used in the aggregated returns calculation.")
|
35
|
+
handle_flow_discrepancy: Optional[StrictStr] = Field(None,alias="handleFlowDiscrepancy", description="Configures handling for the case where net flows do not match the sum of tagged flows.")
|
36
|
+
__properties = ["id", "recipeId", "recipeEntity", "feeHandling", "flowHandling", "businessCalendar", "handleFlowDiscrepancy"]
|
37
|
+
|
38
|
+
class Config:
|
39
|
+
"""Pydantic configuration"""
|
40
|
+
allow_population_by_field_name = True
|
41
|
+
validate_assignment = True
|
42
|
+
|
43
|
+
def __str__(self):
|
44
|
+
"""For `print` and `pprint`"""
|
45
|
+
return pprint.pformat(self.dict(by_alias=False))
|
46
|
+
|
47
|
+
def __repr__(self):
|
48
|
+
"""For `print` and `pprint`"""
|
49
|
+
return self.to_str()
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> ReturnsEntity:
|
61
|
+
"""Create an instance of ReturnsEntity from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
71
|
+
if self.id:
|
72
|
+
_dict['id'] = self.id.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of recipe_id
|
74
|
+
if self.recipe_id:
|
75
|
+
_dict['recipeId'] = self.recipe_id.to_dict()
|
76
|
+
# set to None if recipe_entity (nullable) is None
|
77
|
+
# and __fields_set__ contains the field
|
78
|
+
if self.recipe_entity is None and "recipe_entity" in self.__fields_set__:
|
79
|
+
_dict['recipeEntity'] = None
|
80
|
+
|
81
|
+
# set to None if fee_handling (nullable) is None
|
82
|
+
# and __fields_set__ contains the field
|
83
|
+
if self.fee_handling is None and "fee_handling" in self.__fields_set__:
|
84
|
+
_dict['feeHandling'] = None
|
85
|
+
|
86
|
+
# set to None if flow_handling (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.flow_handling is None and "flow_handling" in self.__fields_set__:
|
89
|
+
_dict['flowHandling'] = None
|
90
|
+
|
91
|
+
# set to None if business_calendar (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.business_calendar is None and "business_calendar" in self.__fields_set__:
|
94
|
+
_dict['businessCalendar'] = None
|
95
|
+
|
96
|
+
# set to None if handle_flow_discrepancy (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.handle_flow_discrepancy is None and "handle_flow_discrepancy" in self.__fields_set__:
|
99
|
+
_dict['handleFlowDiscrepancy'] = None
|
100
|
+
|
101
|
+
return _dict
|
102
|
+
|
103
|
+
@classmethod
|
104
|
+
def from_dict(cls, obj: dict) -> ReturnsEntity:
|
105
|
+
"""Create an instance of ReturnsEntity from a dict"""
|
106
|
+
if obj is None:
|
107
|
+
return None
|
108
|
+
|
109
|
+
if not isinstance(obj, dict):
|
110
|
+
return ReturnsEntity.parse_obj(obj)
|
111
|
+
|
112
|
+
_obj = ReturnsEntity.parse_obj({
|
113
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
114
|
+
"recipe_id": ResourceId.from_dict(obj.get("recipeId")) if obj.get("recipeId") is not None else None,
|
115
|
+
"recipe_entity": obj.get("recipeEntity"),
|
116
|
+
"fee_handling": obj.get("feeHandling"),
|
117
|
+
"flow_handling": obj.get("flowHandling"),
|
118
|
+
"business_calendar": obj.get("businessCalendar"),
|
119
|
+
"handle_flow_discrepancy": obj.get("handleFlowDiscrepancy")
|
120
|
+
})
|
121
|
+
return _obj
|
@@ -0,0 +1,92 @@
|
|
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
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, constr
|
23
|
+
from lusid.models.resource_id import ResourceId
|
24
|
+
|
25
|
+
class SweepBlocksRequest(BaseModel):
|
26
|
+
"""
|
27
|
+
A request to sweep specified blocks. # noqa: E501
|
28
|
+
"""
|
29
|
+
block_ids: Dict[str, ResourceId] = Field(..., alias="blockIds", description="A dictionary mapping ephemeral identifiers, which live as long as the request, to specific blocks to sweep.")
|
30
|
+
latest_allowable_modification_time: StrictStr = Field(...,alias="latestAllowableModificationTime", description="Timestamp or cut label which the block or related entities must not have been updated after.")
|
31
|
+
__properties = ["blockIds", "latestAllowableModificationTime"]
|
32
|
+
|
33
|
+
class Config:
|
34
|
+
"""Pydantic configuration"""
|
35
|
+
allow_population_by_field_name = True
|
36
|
+
validate_assignment = True
|
37
|
+
|
38
|
+
def __str__(self):
|
39
|
+
"""For `print` and `pprint`"""
|
40
|
+
return pprint.pformat(self.dict(by_alias=False))
|
41
|
+
|
42
|
+
def __repr__(self):
|
43
|
+
"""For `print` and `pprint`"""
|
44
|
+
return self.to_str()
|
45
|
+
|
46
|
+
def to_str(self) -> str:
|
47
|
+
"""Returns the string representation of the model using alias"""
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
49
|
+
|
50
|
+
def to_json(self) -> str:
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
52
|
+
return json.dumps(self.to_dict())
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def from_json(cls, json_str: str) -> SweepBlocksRequest:
|
56
|
+
"""Create an instance of SweepBlocksRequest from a JSON string"""
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
58
|
+
|
59
|
+
def to_dict(self):
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
61
|
+
_dict = self.dict(by_alias=True,
|
62
|
+
exclude={
|
63
|
+
},
|
64
|
+
exclude_none=True)
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each value in block_ids (dict)
|
66
|
+
_field_dict = {}
|
67
|
+
if self.block_ids:
|
68
|
+
for _key in self.block_ids:
|
69
|
+
if self.block_ids[_key]:
|
70
|
+
_field_dict[_key] = self.block_ids[_key].to_dict()
|
71
|
+
_dict['blockIds'] = _field_dict
|
72
|
+
return _dict
|
73
|
+
|
74
|
+
@classmethod
|
75
|
+
def from_dict(cls, obj: dict) -> SweepBlocksRequest:
|
76
|
+
"""Create an instance of SweepBlocksRequest from a dict"""
|
77
|
+
if obj is None:
|
78
|
+
return None
|
79
|
+
|
80
|
+
if not isinstance(obj, dict):
|
81
|
+
return SweepBlocksRequest.parse_obj(obj)
|
82
|
+
|
83
|
+
_obj = SweepBlocksRequest.parse_obj({
|
84
|
+
"block_ids": dict(
|
85
|
+
(_k, ResourceId.from_dict(_v))
|
86
|
+
for _k, _v in obj.get("blockIds").items()
|
87
|
+
)
|
88
|
+
if obj.get("blockIds") is not None
|
89
|
+
else None,
|
90
|
+
"latest_allowable_modification_time": obj.get("latestAllowableModificationTime")
|
91
|
+
})
|
92
|
+
return _obj
|