lusid-sdk 2.1.876__py3-none-any.whl → 2.1.877__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 CHANGED
@@ -181,6 +181,7 @@ from lusid.models.barrier import Barrier
181
181
  from lusid.models.basket import Basket
182
182
  from lusid.models.basket_identifier import BasketIdentifier
183
183
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
184
+ from lusid.models.batch_amend_custom_data_model_membership_response import BatchAmendCustomDataModelMembershipResponse
184
185
  from lusid.models.batch_update_user_review_for_comparison_result_request import BatchUpdateUserReviewForComparisonResultRequest
185
186
  from lusid.models.batch_update_user_review_for_comparison_result_response import BatchUpdateUserReviewForComparisonResultResponse
186
187
  from lusid.models.batch_upsert_dates_for_calendar_response import BatchUpsertDatesForCalendarResponse
@@ -728,6 +729,8 @@ from lusid.models.mbs_interest_shortfall_event import MbsInterestShortfallEvent
728
729
  from lusid.models.mbs_principal_event import MbsPrincipalEvent
729
730
  from lusid.models.mbs_principal_write_off_event import MbsPrincipalWriteOffEvent
730
731
  from lusid.models.membership import Membership
732
+ from lusid.models.membership_amendment_request import MembershipAmendmentRequest
733
+ from lusid.models.membership_amendment_response import MembershipAmendmentResponse
731
734
  from lusid.models.membership_and_status import MembershipAndStatus
732
735
  from lusid.models.merger_event import MergerEvent
733
736
  from lusid.models.metric_value import MetricValue
@@ -1531,6 +1534,7 @@ __all__ = [
1531
1534
  "Basket",
1532
1535
  "BasketIdentifier",
1533
1536
  "BatchAdjustHoldingsResponse",
1537
+ "BatchAmendCustomDataModelMembershipResponse",
1534
1538
  "BatchUpdateUserReviewForComparisonResultRequest",
1535
1539
  "BatchUpdateUserReviewForComparisonResultResponse",
1536
1540
  "BatchUpsertDatesForCalendarResponse",
@@ -2078,6 +2082,8 @@ __all__ = [
2078
2082
  "MbsPrincipalEvent",
2079
2083
  "MbsPrincipalWriteOffEvent",
2080
2084
  "Membership",
2085
+ "MembershipAmendmentRequest",
2086
+ "MembershipAmendmentResponse",
2081
2087
  "MembershipAndStatus",
2082
2088
  "MergerEvent",
2083
2089
  "MetricValue",
@@ -24,11 +24,13 @@ from datetime import datetime
24
24
 
25
25
  from pydantic.v1 import Field, constr, validator
26
26
 
27
- from typing import Optional
27
+ from typing import Dict, Optional
28
28
 
29
+ from lusid.models.batch_amend_custom_data_model_membership_response import BatchAmendCustomDataModelMembershipResponse
29
30
  from lusid.models.create_custom_data_model_request import CreateCustomDataModelRequest
30
31
  from lusid.models.custom_data_model import CustomDataModel
31
32
  from lusid.models.deleted_entity_response import DeletedEntityResponse
33
+ from lusid.models.membership_amendment_request import MembershipAmendmentRequest
32
34
  from lusid.models.resource_list_of_data_model_summary import ResourceListOfDataModelSummary
33
35
  from lusid.models.resource_list_of_string import ResourceListOfString
34
36
  from lusid.models.update_custom_data_model_request import UpdateCustomDataModelRequest
@@ -59,6 +61,173 @@ class CustomDataModelsApi:
59
61
  self.api_client = api_client
60
62
 
61
63
 
64
+ @overload
65
+ async def batch_amend(self, success_mode : Annotated[StrictStr, Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, MembershipAmendmentRequest], Field(..., description="The payload describing the amendments to make for the given Custom Data Model.")], **kwargs) -> BatchAmendCustomDataModelMembershipResponse: # noqa: E501
66
+ ...
67
+
68
+ @overload
69
+ def batch_amend(self, success_mode : Annotated[StrictStr, Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, MembershipAmendmentRequest], Field(..., description="The payload describing the amendments to make for the given Custom Data Model.")], async_req: Optional[bool]=True, **kwargs) -> BatchAmendCustomDataModelMembershipResponse: # noqa: E501
70
+ ...
71
+
72
+ @validate_arguments
73
+ def batch_amend(self, success_mode : Annotated[StrictStr, Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, MembershipAmendmentRequest], Field(..., description="The payload describing the amendments to make for the given Custom Data Model.")], async_req: Optional[bool]=None, **kwargs) -> Union[BatchAmendCustomDataModelMembershipResponse, Awaitable[BatchAmendCustomDataModelMembershipResponse]]: # noqa: E501
74
+ """[INTERNAL] BatchAmend: Batch amend Custom Data Models # noqa: E501
75
+
76
+ Add/Remove entities to/from a Custom Data Model in a single operation. Each amendment request must be keyed by a unique correlation ID. This id is ephemeral and is not stored by LUSID. It serves only as a way to easily identify each amendment in the response. Note: If using partial failure modes, then it is important to check the response body for failures as any failures will still return a 200 status code. # noqa: E501
77
+ This method makes a synchronous HTTP request by default. To make an
78
+ asynchronous HTTP request, please pass async_req=True
79
+
80
+ >>> thread = api.batch_amend(success_mode, request_body, async_req=True)
81
+ >>> result = thread.get()
82
+
83
+ :param success_mode: Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial. (required)
84
+ :type success_mode: str
85
+ :param request_body: The payload describing the amendments to make for the given Custom Data Model. (required)
86
+ :type request_body: Dict[str, MembershipAmendmentRequest]
87
+ :param async_req: Whether to execute the request asynchronously.
88
+ :type async_req: bool, optional
89
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
90
+ :param opts: Configuration options for this request
91
+ :type opts: ConfigurationOptions, optional
92
+ :return: Returns the result object.
93
+ If the method is called asynchronously,
94
+ returns the request thread.
95
+ :rtype: BatchAmendCustomDataModelMembershipResponse
96
+ """
97
+ kwargs['_return_http_data_only'] = True
98
+ if '_preload_content' in kwargs:
99
+ message = "Error! Please call the batch_amend_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
100
+ raise ValueError(message)
101
+ if async_req is not None:
102
+ kwargs['async_req'] = async_req
103
+ return self.batch_amend_with_http_info(success_mode, request_body, **kwargs) # noqa: E501
104
+
105
+ @validate_arguments
106
+ def batch_amend_with_http_info(self, success_mode : Annotated[StrictStr, Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial.")], request_body : Annotated[Dict[str, MembershipAmendmentRequest], Field(..., description="The payload describing the amendments to make for the given Custom Data Model.")], **kwargs) -> ApiResponse: # noqa: E501
107
+ """[INTERNAL] BatchAmend: Batch amend Custom Data Models # noqa: E501
108
+
109
+ Add/Remove entities to/from a Custom Data Model in a single operation. Each amendment request must be keyed by a unique correlation ID. This id is ephemeral and is not stored by LUSID. It serves only as a way to easily identify each amendment in the response. Note: If using partial failure modes, then it is important to check the response body for failures as any failures will still return a 200 status code. # noqa: E501
110
+ This method makes a synchronous HTTP request by default. To make an
111
+ asynchronous HTTP request, please pass async_req=True
112
+
113
+ >>> thread = api.batch_amend_with_http_info(success_mode, request_body, async_req=True)
114
+ >>> result = thread.get()
115
+
116
+ :param success_mode: Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial. (required)
117
+ :type success_mode: str
118
+ :param request_body: The payload describing the amendments to make for the given Custom Data Model. (required)
119
+ :type request_body: Dict[str, MembershipAmendmentRequest]
120
+ :param async_req: Whether to execute the request asynchronously.
121
+ :type async_req: bool, optional
122
+ :param _preload_content: if False, the ApiResponse.data will
123
+ be set to none and raw_data will store the
124
+ HTTP response body without reading/decoding.
125
+ Default is True.
126
+ :type _preload_content: bool, optional
127
+ :param _return_http_data_only: response data instead of ApiResponse
128
+ object with status code, headers, etc
129
+ :type _return_http_data_only: bool, optional
130
+ :param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
131
+ :param opts: Configuration options for this request
132
+ :type opts: ConfigurationOptions, optional
133
+ :param _request_auth: set to override the auth_settings for an a single
134
+ request; this effectively ignores the authentication
135
+ in the spec for a single request.
136
+ :type _request_auth: dict, optional
137
+ :type _content_type: string, optional: force content-type for the request
138
+ :return: Returns the result object.
139
+ If the method is called asynchronously,
140
+ returns the request thread.
141
+ :rtype: tuple(BatchAmendCustomDataModelMembershipResponse, status_code(int), headers(HTTPHeaderDict))
142
+ """
143
+
144
+ _params = locals()
145
+
146
+ _all_params = [
147
+ 'success_mode',
148
+ 'request_body'
149
+ ]
150
+ _all_params.extend(
151
+ [
152
+ 'async_req',
153
+ '_return_http_data_only',
154
+ '_preload_content',
155
+ '_request_timeout',
156
+ '_request_auth',
157
+ '_content_type',
158
+ '_headers',
159
+ 'opts'
160
+ ]
161
+ )
162
+
163
+ # validate the arguments
164
+ for _key, _val in _params['kwargs'].items():
165
+ if _key not in _all_params:
166
+ raise ApiTypeError(
167
+ "Got an unexpected keyword argument '%s'"
168
+ " to method batch_amend" % _key
169
+ )
170
+ _params[_key] = _val
171
+ del _params['kwargs']
172
+
173
+ _collection_formats = {}
174
+
175
+ # process the path parameters
176
+ _path_params = {}
177
+
178
+ # process the query parameters
179
+ _query_params = []
180
+ if _params.get('success_mode') is not None: # noqa: E501
181
+ _query_params.append(('successMode', _params['success_mode']))
182
+
183
+ # process the header parameters
184
+ _header_params = dict(_params.get('_headers', {}))
185
+ # process the form parameters
186
+ _form_params = []
187
+ _files = {}
188
+ # process the body parameter
189
+ _body_params = None
190
+ if _params['request_body'] is not None:
191
+ _body_params = _params['request_body']
192
+
193
+ # set the HTTP header `Accept`
194
+ _header_params['Accept'] = self.api_client.select_header_accept(
195
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
196
+
197
+ # set the HTTP header `Content-Type`
198
+ _content_types_list = _params.get('_content_type',
199
+ self.api_client.select_header_content_type(
200
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
201
+ if _content_types_list:
202
+ _header_params['Content-Type'] = _content_types_list
203
+
204
+ # authentication setting
205
+ _auth_settings = ['oauth2'] # noqa: E501
206
+
207
+ _response_types_map = {
208
+ '200': "BatchAmendCustomDataModelMembershipResponse",
209
+ '400': "LusidValidationProblemDetails",
210
+ }
211
+
212
+ return self.api_client.call_api(
213
+ '/api/datamodel/$batchamend', 'POST',
214
+ _path_params,
215
+ _query_params,
216
+ _header_params,
217
+ body=_body_params,
218
+ post_params=_form_params,
219
+ files=_files,
220
+ response_types_map=_response_types_map,
221
+ auth_settings=_auth_settings,
222
+ async_req=_params.get('async_req'),
223
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
224
+ _preload_content=_params.get('_preload_content', True),
225
+ _request_timeout=_params.get('_request_timeout'),
226
+ opts=_params.get('opts'),
227
+ collection_formats=_collection_formats,
228
+ _request_auth=_params.get('_request_auth'))
229
+
230
+
62
231
  @overload
63
232
  async def create_custom_data_model(self, entity_type : Annotated[StrictStr, Field(..., description="The entity type of the Data Model.")], create_custom_data_model_request : Annotated[Optional[CreateCustomDataModelRequest], Field(description="The request containing the details of the Data Model.")] = None, **kwargs) -> CustomDataModel: # noqa: E501
64
233
  ...
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.8058\n"\
448
+ "Version of the API: 0.11.8059\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
@@ -91,6 +91,7 @@ from lusid.models.barrier import Barrier
91
91
  from lusid.models.basket import Basket
92
92
  from lusid.models.basket_identifier import BasketIdentifier
93
93
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
94
+ from lusid.models.batch_amend_custom_data_model_membership_response import BatchAmendCustomDataModelMembershipResponse
94
95
  from lusid.models.batch_update_user_review_for_comparison_result_request import BatchUpdateUserReviewForComparisonResultRequest
95
96
  from lusid.models.batch_update_user_review_for_comparison_result_response import BatchUpdateUserReviewForComparisonResultResponse
96
97
  from lusid.models.batch_upsert_dates_for_calendar_response import BatchUpsertDatesForCalendarResponse
@@ -638,6 +639,8 @@ from lusid.models.mbs_interest_shortfall_event import MbsInterestShortfallEvent
638
639
  from lusid.models.mbs_principal_event import MbsPrincipalEvent
639
640
  from lusid.models.mbs_principal_write_off_event import MbsPrincipalWriteOffEvent
640
641
  from lusid.models.membership import Membership
642
+ from lusid.models.membership_amendment_request import MembershipAmendmentRequest
643
+ from lusid.models.membership_amendment_response import MembershipAmendmentResponse
641
644
  from lusid.models.membership_and_status import MembershipAndStatus
642
645
  from lusid.models.merger_event import MergerEvent
643
646
  from lusid.models.metric_value import MetricValue
@@ -1352,6 +1355,7 @@ __all__ = [
1352
1355
  "Basket",
1353
1356
  "BasketIdentifier",
1354
1357
  "BatchAdjustHoldingsResponse",
1358
+ "BatchAmendCustomDataModelMembershipResponse",
1355
1359
  "BatchUpdateUserReviewForComparisonResultRequest",
1356
1360
  "BatchUpdateUserReviewForComparisonResultResponse",
1357
1361
  "BatchUpsertDatesForCalendarResponse",
@@ -1899,6 +1903,8 @@ __all__ = [
1899
1903
  "MbsPrincipalEvent",
1900
1904
  "MbsPrincipalWriteOffEvent",
1901
1905
  "Membership",
1906
+ "MembershipAmendmentRequest",
1907
+ "MembershipAmendmentResponse",
1902
1908
  "MembershipAndStatus",
1903
1909
  "MergerEvent",
1904
1910
  "MetricValue",
@@ -0,0 +1,158 @@
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, conlist
23
+ from lusid.models.error_detail import ErrorDetail
24
+ from lusid.models.membership_amendment_response import MembershipAmendmentResponse
25
+ from lusid.models.response_meta_data import ResponseMetaData
26
+
27
+ class BatchAmendCustomDataModelMembershipResponse(BaseModel):
28
+ """
29
+ BatchAmendCustomDataModelMembershipResponse
30
+ """
31
+ values: Optional[Dict[str, MembershipAmendmentResponse]] = None
32
+ staged: Optional[Dict[str, MembershipAmendmentResponse]] = None
33
+ failed: Optional[Dict[str, ErrorDetail]] = None
34
+ metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = None
35
+ __properties = ["values", "staged", "failed", "metadata"]
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) -> BatchAmendCustomDataModelMembershipResponse:
60
+ """Create an instance of BatchAmendCustomDataModelMembershipResponse 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 value in values (dict)
70
+ _field_dict = {}
71
+ if self.values:
72
+ for _key in self.values:
73
+ if self.values[_key]:
74
+ _field_dict[_key] = self.values[_key].to_dict()
75
+ _dict['values'] = _field_dict
76
+ # override the default output from pydantic by calling `to_dict()` of each value in staged (dict)
77
+ _field_dict = {}
78
+ if self.staged:
79
+ for _key in self.staged:
80
+ if self.staged[_key]:
81
+ _field_dict[_key] = self.staged[_key].to_dict()
82
+ _dict['staged'] = _field_dict
83
+ # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
84
+ _field_dict = {}
85
+ if self.failed:
86
+ for _key in self.failed:
87
+ if self.failed[_key]:
88
+ _field_dict[_key] = self.failed[_key].to_dict()
89
+ _dict['failed'] = _field_dict
90
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
91
+ _field_dict_of_array = {}
92
+ if self.metadata:
93
+ for _key in self.metadata:
94
+ if self.metadata[_key]:
95
+ _field_dict_of_array[_key] = [
96
+ _item.to_dict() for _item in self.metadata[_key]
97
+ ]
98
+ _dict['metadata'] = _field_dict_of_array
99
+ # set to None if values (nullable) is None
100
+ # and __fields_set__ contains the field
101
+ if self.values is None and "values" in self.__fields_set__:
102
+ _dict['values'] = None
103
+
104
+ # set to None if staged (nullable) is None
105
+ # and __fields_set__ contains the field
106
+ if self.staged is None and "staged" in self.__fields_set__:
107
+ _dict['staged'] = None
108
+
109
+ # set to None if failed (nullable) is None
110
+ # and __fields_set__ contains the field
111
+ if self.failed is None and "failed" in self.__fields_set__:
112
+ _dict['failed'] = None
113
+
114
+ # set to None if metadata (nullable) is None
115
+ # and __fields_set__ contains the field
116
+ if self.metadata is None and "metadata" in self.__fields_set__:
117
+ _dict['metadata'] = None
118
+
119
+ return _dict
120
+
121
+ @classmethod
122
+ def from_dict(cls, obj: dict) -> BatchAmendCustomDataModelMembershipResponse:
123
+ """Create an instance of BatchAmendCustomDataModelMembershipResponse from a dict"""
124
+ if obj is None:
125
+ return None
126
+
127
+ if not isinstance(obj, dict):
128
+ return BatchAmendCustomDataModelMembershipResponse.parse_obj(obj)
129
+
130
+ _obj = BatchAmendCustomDataModelMembershipResponse.parse_obj({
131
+ "values": dict(
132
+ (_k, MembershipAmendmentResponse.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
+ "staged": dict(
138
+ (_k, MembershipAmendmentResponse.from_dict(_v))
139
+ for _k, _v in obj.get("staged").items()
140
+ )
141
+ if obj.get("staged") is not None
142
+ else None,
143
+ "failed": dict(
144
+ (_k, ErrorDetail.from_dict(_v))
145
+ for _k, _v in obj.get("failed").items()
146
+ )
147
+ if obj.get("failed") is not None
148
+ else None,
149
+ "metadata": dict(
150
+ (_k,
151
+ [ResponseMetaData.from_dict(_item) for _item in _v]
152
+ if _v is not None
153
+ else None
154
+ )
155
+ for _k, _v in obj.get("metadata").items()
156
+ )
157
+ })
158
+ return _obj
@@ -0,0 +1,87 @@
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, validator
23
+ from lusid.models.resource_id import ResourceId
24
+
25
+ class MembershipAmendmentRequest(BaseModel):
26
+ """
27
+ MembershipAmendmentRequest
28
+ """
29
+ custom_data_model_id: ResourceId = Field(..., alias="customDataModelId")
30
+ entity_type: StrictStr = Field(...,alias="entityType", description="The type of the entity that is being added or removed from the Custom Data Model.")
31
+ entity_unique_id: StrictStr = Field(...,alias="entityUniqueId", description="The entity unique identifier of the entity that is being added or removed from the Custom Data Model.")
32
+ operation: StrictStr = Field(...,alias="operation", description="The operation to be performed on the entity's membership in the Custom Data Model. Either 'Add' or 'Remove'.")
33
+ __properties = ["customDataModelId", "entityType", "entityUniqueId", "operation"]
34
+
35
+ class Config:
36
+ """Pydantic configuration"""
37
+ allow_population_by_field_name = True
38
+ validate_assignment = True
39
+
40
+ def __str__(self):
41
+ """For `print` and `pprint`"""
42
+ return pprint.pformat(self.dict(by_alias=False))
43
+
44
+ def __repr__(self):
45
+ """For `print` and `pprint`"""
46
+ return self.to_str()
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) -> MembershipAmendmentRequest:
58
+ """Create an instance of MembershipAmendmentRequest 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 custom_data_model_id
68
+ if self.custom_data_model_id:
69
+ _dict['customDataModelId'] = self.custom_data_model_id.to_dict()
70
+ return _dict
71
+
72
+ @classmethod
73
+ def from_dict(cls, obj: dict) -> MembershipAmendmentRequest:
74
+ """Create an instance of MembershipAmendmentRequest from a dict"""
75
+ if obj is None:
76
+ return None
77
+
78
+ if not isinstance(obj, dict):
79
+ return MembershipAmendmentRequest.parse_obj(obj)
80
+
81
+ _obj = MembershipAmendmentRequest.parse_obj({
82
+ "custom_data_model_id": ResourceId.from_dict(obj.get("customDataModelId")) if obj.get("customDataModelId") is not None else None,
83
+ "entity_type": obj.get("entityType"),
84
+ "entity_unique_id": obj.get("entityUniqueId"),
85
+ "operation": obj.get("operation")
86
+ })
87
+ return _obj
@@ -0,0 +1,107 @@
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, constr
23
+ from lusid.models.data_model_membership import DataModelMembership
24
+ from lusid.models.resource_id import ResourceId
25
+ from lusid.models.staged_modifications_info import StagedModificationsInfo
26
+ from lusid.models.version import Version
27
+
28
+ class MembershipAmendmentResponse(BaseModel):
29
+ """
30
+ MembershipAmendmentResponse
31
+ """
32
+ custom_data_model_id: ResourceId = Field(..., alias="customDataModelId")
33
+ entity_type: StrictStr = Field(...,alias="entityType", description="The type of the entity that was added or removed from the Custom Data Model.")
34
+ entity_unique_id: StrictStr = Field(...,alias="entityUniqueId", description="The entity unique identifier of the entity that was added or removed from the Custom Data Model.")
35
+ operation: StrictStr = Field(...,alias="operation", description="The operation that was performed on the entity's membership in the Custom Data Model. Either 'Add' or 'Remove'.")
36
+ entity_display_name: StrictStr = Field(...,alias="entityDisplayName", description="The display name of the entity that was added or removed from the Custom Data Model.")
37
+ data_model_membership: Optional[DataModelMembership] = Field(None, alias="dataModelMembership")
38
+ version: Optional[Version] = None
39
+ staged_modifications: Optional[StagedModificationsInfo] = Field(None, alias="stagedModifications")
40
+ __properties = ["customDataModelId", "entityType", "entityUniqueId", "operation", "entityDisplayName", "dataModelMembership", "version", "stagedModifications"]
41
+
42
+ class Config:
43
+ """Pydantic configuration"""
44
+ allow_population_by_field_name = True
45
+ validate_assignment = True
46
+
47
+ def __str__(self):
48
+ """For `print` and `pprint`"""
49
+ return pprint.pformat(self.dict(by_alias=False))
50
+
51
+ def __repr__(self):
52
+ """For `print` and `pprint`"""
53
+ return self.to_str()
54
+
55
+ def to_str(self) -> str:
56
+ """Returns the string representation of the model using alias"""
57
+ return pprint.pformat(self.dict(by_alias=True))
58
+
59
+ def to_json(self) -> str:
60
+ """Returns the JSON representation of the model using alias"""
61
+ return json.dumps(self.to_dict())
62
+
63
+ @classmethod
64
+ def from_json(cls, json_str: str) -> MembershipAmendmentResponse:
65
+ """Create an instance of MembershipAmendmentResponse from a JSON string"""
66
+ return cls.from_dict(json.loads(json_str))
67
+
68
+ def to_dict(self):
69
+ """Returns the dictionary representation of the model using alias"""
70
+ _dict = self.dict(by_alias=True,
71
+ exclude={
72
+ },
73
+ exclude_none=True)
74
+ # override the default output from pydantic by calling `to_dict()` of custom_data_model_id
75
+ if self.custom_data_model_id:
76
+ _dict['customDataModelId'] = self.custom_data_model_id.to_dict()
77
+ # override the default output from pydantic by calling `to_dict()` of data_model_membership
78
+ if self.data_model_membership:
79
+ _dict['dataModelMembership'] = self.data_model_membership.to_dict()
80
+ # override the default output from pydantic by calling `to_dict()` of version
81
+ if self.version:
82
+ _dict['version'] = self.version.to_dict()
83
+ # override the default output from pydantic by calling `to_dict()` of staged_modifications
84
+ if self.staged_modifications:
85
+ _dict['stagedModifications'] = self.staged_modifications.to_dict()
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: dict) -> MembershipAmendmentResponse:
90
+ """Create an instance of MembershipAmendmentResponse from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return MembershipAmendmentResponse.parse_obj(obj)
96
+
97
+ _obj = MembershipAmendmentResponse.parse_obj({
98
+ "custom_data_model_id": ResourceId.from_dict(obj.get("customDataModelId")) if obj.get("customDataModelId") is not None else None,
99
+ "entity_type": obj.get("entityType"),
100
+ "entity_unique_id": obj.get("entityUniqueId"),
101
+ "operation": obj.get("operation"),
102
+ "entity_display_name": obj.get("entityDisplayName"),
103
+ "data_model_membership": DataModelMembership.from_dict(obj.get("dataModelMembership")) if obj.get("dataModelMembership") is not None else None,
104
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
105
+ "staged_modifications": StagedModificationsInfo.from_dict(obj.get("stagedModifications")) if obj.get("stagedModifications") is not None else None
106
+ })
107
+ return _obj
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lusid-sdk
3
- Version: 2.1.876
3
+ Version: 2.1.877
4
4
  Summary: LUSID API
5
5
  Home-page: https://github.com/finbourne/lusid-sdk-python
6
6
  License: MIT
@@ -205,6 +205,7 @@ Class | Method | HTTP request | Description
205
205
  *CustomEntityDefinitionsApi* | [**get_definition**](docs/CustomEntityDefinitionsApi.md#get_definition) | **GET** /api/customentities/entitytypes/{entityType} | [EARLY ACCESS] GetDefinition: Get a Custom Entity type definition.
206
206
  *CustomEntityDefinitionsApi* | [**list_custom_entity_definitions**](docs/CustomEntityDefinitionsApi.md#list_custom_entity_definitions) | **GET** /api/customentities/entitytypes | [EARLY ACCESS] ListCustomEntityDefinitions: List the Custom Entity type definitions
207
207
  *CustomEntityDefinitionsApi* | [**update_custom_entity_definition**](docs/CustomEntityDefinitionsApi.md#update_custom_entity_definition) | **PUT** /api/customentities/entitytypes/{entityType} | [EARLY ACCESS] UpdateCustomEntityDefinition: Modify an existing Custom Entity type.
208
+ *CustomDataModelsApi* | [**batch_amend**](docs/CustomDataModelsApi.md#batch_amend) | **POST** /api/datamodel/$batchamend | [INTERNAL] BatchAmend: Batch amend Custom Data Models
208
209
  *CustomDataModelsApi* | [**create_custom_data_model**](docs/CustomDataModelsApi.md#create_custom_data_model) | **POST** /api/datamodel/{entityType} | [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model
209
210
  *CustomDataModelsApi* | [**delete_custom_data_model**](docs/CustomDataModelsApi.md#delete_custom_data_model) | **DELETE** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model
210
211
  *CustomDataModelsApi* | [**get_custom_data_model**](docs/CustomDataModelsApi.md#get_custom_data_model) | **GET** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model
@@ -751,6 +752,7 @@ Class | Method | HTTP request | Description
751
752
  - [Basket](docs/Basket.md)
752
753
  - [BasketIdentifier](docs/BasketIdentifier.md)
753
754
  - [BatchAdjustHoldingsResponse](docs/BatchAdjustHoldingsResponse.md)
755
+ - [BatchAmendCustomDataModelMembershipResponse](docs/BatchAmendCustomDataModelMembershipResponse.md)
754
756
  - [BatchUpdateUserReviewForComparisonResultRequest](docs/BatchUpdateUserReviewForComparisonResultRequest.md)
755
757
  - [BatchUpdateUserReviewForComparisonResultResponse](docs/BatchUpdateUserReviewForComparisonResultResponse.md)
756
758
  - [BatchUpsertDatesForCalendarResponse](docs/BatchUpsertDatesForCalendarResponse.md)
@@ -1298,6 +1300,8 @@ Class | Method | HTTP request | Description
1298
1300
  - [MbsPrincipalEvent](docs/MbsPrincipalEvent.md)
1299
1301
  - [MbsPrincipalWriteOffEvent](docs/MbsPrincipalWriteOffEvent.md)
1300
1302
  - [Membership](docs/Membership.md)
1303
+ - [MembershipAmendmentRequest](docs/MembershipAmendmentRequest.md)
1304
+ - [MembershipAmendmentResponse](docs/MembershipAmendmentResponse.md)
1301
1305
  - [MembershipAndStatus](docs/MembershipAndStatus.md)
1302
1306
  - [MergerEvent](docs/MergerEvent.md)
1303
1307
  - [MetricValue](docs/MetricValue.md)
@@ -1,4 +1,4 @@
1
- lusid/__init__.py,sha256=d7pDUWDUHPyhcCQZC-piubiHm6nLz58IOUS4LNKbpXg,142406
1
+ lusid/__init__.py,sha256=8LaCFupUXYWDQbhsYqdb9Ha5qEr-UX5hMrN4F37GHV0,142809
2
2
  lusid/api/__init__.py,sha256=B3B2NQMECuvDVNmD4qSFLd79vdoCFcwMeA91EfgIvDg,6693
3
3
  lusid/api/abor_api.py,sha256=N7Wsh0395mXOvpJI8z0Nrx5OY4nCP5FN9RkbtdHaZbM,165987
4
4
  lusid/api/abor_configuration_api.py,sha256=xQ9HcXm02eDFhCdWUHjqFRWl1oQMxm2LNObJ9kcLauU,84216
@@ -17,7 +17,7 @@ lusid/api/configuration_recipe_api.py,sha256=1hdNB1imRjVzf8KAmqnNJE10jv883s1SCza
17
17
  lusid/api/conventions_api.py,sha256=dsvB_lAcR5oVQLTqVJj9_zruF7Tyn8aGzD9EmEKvfWY,104288
18
18
  lusid/api/corporate_action_sources_api.py,sha256=7Js9dAFi_HOsYjZvYQew8SjK8x45x-Bi3VJxY-dhDKU,98350
19
19
  lusid/api/counterparties_api.py,sha256=dvRW05miC9_DBYAvJavmNucbNY4ZDwFjqLNXSoP-05A,71156
20
- lusid/api/custom_data_models_api.py,sha256=PaxGnE0UGabjXfg6pp1LQp580mY4SPfLSg-STDGBFvk,53848
20
+ lusid/api/custom_data_models_api.py,sha256=SfUCIuYz1891A3EA1QM6m31OPNHwvgsP2DLscneobuQ,63897
21
21
  lusid/api/custom_entities_api.py,sha256=2R9I0th-pYAK69R3UdWntfd8EhYTYf0e1vbB8JvZ5OU,158464
22
22
  lusid/api/custom_entity_definitions_api.py,sha256=Hcuv2Au9oMpg1E5aMyveiq3dxcwldvZrvRzVdI-T_mo,40202
23
23
  lusid/api/custom_entity_types_api.py,sha256=Ldk2f5BDjzmnFUDR-Rw71tCpNoEnNeHZ5bptJUrV1EQ,40856
@@ -79,7 +79,7 @@ lusid/api/translation_api.py,sha256=xpRuTfwQvYBlWe6r_L2EI_uVpXqHFnEOim-i-kVQ85E,
79
79
  lusid/api/workspace_api.py,sha256=0pCNi3ZCRbIo0NXKa85XE7vtq0WV5YOKcQKvFlcLUaY,120708
80
80
  lusid/api_client.py,sha256=ewMTmf9SRurY8pYnUx9jy24RdldPCOa4US38pnrVxjA,31140
81
81
  lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
82
- lusid/configuration.py,sha256=7CD6MYlUkKWkxp28C96FvQNpJu5sIIFiKHyvRxITkBw,17972
82
+ lusid/configuration.py,sha256=ktG9lXMq6MPStlkaG3_l_HZskF-MiTTBcOdeqhfHwXU,17972
83
83
  lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
84
84
  lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
85
85
  lusid/extensions/api_client.py,sha256=GzygWg_h603QK1QS2HvAijuE2R1TnvoF6-Yg0CeM3ug,30943
@@ -94,7 +94,7 @@ lusid/extensions/rest.py,sha256=dp-bD_LMR2zAL1tmC3-urhWKLomXx7r5iGN1VteMBVQ,1601
94
94
  lusid/extensions/retry.py,sha256=EhW9OKJmGHipxN3H7eROH5DiMlAnfBVl95NQrttcsdg,14834
95
95
  lusid/extensions/socket_keep_alive.py,sha256=eX5ICvGfVzUCGIm80Q2RknfFZrBQAdnrcpY61M29V_k,1997
96
96
  lusid/extensions/tcp_keep_alive_connector.py,sha256=zaGtUsygRsxB1_4B3x39K3ILwztdhMLDv5bFZV7zmGE,3877
97
- lusid/models/__init__.py,sha256=XpKA2zcsJkqAuGWOFnXaTNT-sI-vkc98t-zU9bRf0K0,134681
97
+ lusid/models/__init__.py,sha256=Sqi7-u6NBvgs1phQQJoC-3Fwg8lOq9iGHUGmrACYCrA,135084
98
98
  lusid/models/a2_b_breakdown.py,sha256=-FXgILrvtZXQDmvS0ARaJVGBq5LJ4AH-o3HjujFVmS4,3198
99
99
  lusid/models/a2_b_category.py,sha256=WunXUgx-dCnApPeLC8Qo5tVCX8Ywxkehib1vmNqNgNs,2957
100
100
  lusid/models/a2_b_data_record.py,sha256=qANTmV1_HUEo4l72-F8qzZjlQxOe0Onc9WPz7h-WWuY,9993
@@ -172,6 +172,7 @@ lusid/models/barrier.py,sha256=jzmNSt5xSeH7rYNvGf9JYP6fZJ8BE36e_IdkiS8vlH8,2985
172
172
  lusid/models/basket.py,sha256=DOl0vUP-uz_AsGHmdECAP-QCsUHBpLOwOwPG49Ci6xk,9390
173
173
  lusid/models/basket_identifier.py,sha256=GFqLW1rar1XqztWuCRPTYN8jQZxzWivYaOuwVHFS_tc,2842
174
174
  lusid/models/batch_adjust_holdings_response.py,sha256=U2wKOF3kdsYHVUmOcJq57uTM_o9uNN2mLUI8-zk3hGI,5919
175
+ lusid/models/batch_amend_custom_data_model_membership_response.py,sha256=QcQZoL3Xncdr5-gXuvn5nuA74c6vFupbDD7-J-k5SUY,5954
175
176
  lusid/models/batch_update_user_review_for_comparison_result_request.py,sha256=XPPUsMkfk0ICuhpZEcs7jW0UzvSOMXRw5-r4jolr9cs,3714
176
177
  lusid/models/batch_update_user_review_for_comparison_result_response.py,sha256=BvU5oDWUVYNUAnpbkqInKbCyWv-f5-hVtDhq-ngTNPg,6224
177
178
  lusid/models/batch_upsert_dates_for_calendar_response.py,sha256=Xh2kcxFQHHhHhjaoVN1gdn5Aa4yI6r46z1JgpM1WJ64,5924
@@ -719,6 +720,8 @@ lusid/models/mbs_interest_shortfall_event.py,sha256=I5hR5owH8mpP3L0SfqYh4i16esq3
719
720
  lusid/models/mbs_principal_event.py,sha256=DU-WVIu_bbCRv5iqv612I9631S0dT6JwOsjQGpxoL70,12008
720
721
  lusid/models/mbs_principal_write_off_event.py,sha256=Xp0KRudBaJ1lx6-sc9BMb7dGNIxMt4Su0xUa9PsAoFs,12126
721
722
  lusid/models/membership.py,sha256=tCmIwzi46QxUF-Ad8llWpqdLQnyjG2xc1p_4Rslduvk,2473
723
+ lusid/models/membership_amendment_request.py,sha256=ZY10yCsX-hnm-9reMpA1WElCaCmlmBGDJRpFe0Wxpxc,3294
724
+ lusid/models/membership_amendment_response.py,sha256=Z8bQBB-e-2pag9QXenMo-EB59aE9LOVI2CbUv3BjJ7I,5058
722
725
  lusid/models/membership_and_status.py,sha256=Ge5mHyXZfdaQ7oCkRCDcdQm5SPjqD2bG1XDn_g-i88M,2735
723
726
  lusid/models/merger_event.py,sha256=WA_hKYIObgLAJrV49Lwgbv6fgNta0OR0NvazmDOlT0I,17191
724
727
  lusid/models/metric_value.py,sha256=VOO9uPCoJ0NeBxUnEuzvi5XfjootT0LfmKmxRTDft20,2441
@@ -1355,6 +1358,6 @@ lusid/models/year_month_day.py,sha256=gwSoxFwlD_wffKdddo1wfvAcLq3Cht3FHQidiaHzAA
1355
1358
  lusid/models/yield_curve_data.py,sha256=I1ZSWxHMgUxj9OQt6i9a4S91KB4_XtmrfFxpN_PV3YQ,9561
1356
1359
  lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1357
1360
  lusid/rest.py,sha256=HQT__5LQEMu6_1sLKvYj-DI4FH1DJXBIPYfZCTTyrY4,13431
1358
- lusid_sdk-2.1.876.dist-info/METADATA,sha256=z-uMr7d1YSy7x_g6MmZkqIyhANKbreIeKKmF2JJfoaU,226251
1359
- lusid_sdk-2.1.876.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
1360
- lusid_sdk-2.1.876.dist-info/RECORD,,
1361
+ lusid_sdk-2.1.877.dist-info/METADATA,sha256=5sUzwjvHUI4H4tyD2qQjiGIEwArkWm2vOxdE9_uuWB4,226668
1362
+ lusid_sdk-2.1.877.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
1363
+ lusid_sdk-2.1.877.dist-info/RECORD,,