lusid-sdk 2.1.254__py3-none-any.whl → 2.1.259__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (53) hide show
  1. lusid/__init__.py +18 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/fund_configurations_api.py +944 -0
  4. lusid/api/order_management_api.py +161 -2
  5. lusid/configuration.py +1 -1
  6. lusid/models/__init__.py +16 -0
  7. lusid/models/accounting_method.py +3 -0
  8. lusid/models/accumulation_event.py +3 -3
  9. lusid/models/amortisation_event.py +3 -3
  10. lusid/models/bond_coupon_event.py +3 -3
  11. lusid/models/bond_default_event.py +3 -3
  12. lusid/models/bond_principal_event.py +3 -3
  13. lusid/models/cancel_placements_response.py +153 -0
  14. lusid/models/cancelled_placement_result.py +83 -0
  15. lusid/models/capital_distribution_event.py +3 -3
  16. lusid/models/cash_dividend_event.py +3 -3
  17. lusid/models/cash_flow_event.py +3 -3
  18. lusid/models/close_event.py +3 -3
  19. lusid/models/component_rule.py +83 -0
  20. lusid/models/create_derived_transaction_portfolio_request.py +3 -3
  21. lusid/models/create_transaction_portfolio_request.py +3 -3
  22. lusid/models/dividend_option_event.py +3 -3
  23. lusid/models/dividend_reinvestment_event.py +3 -3
  24. lusid/models/exercise_event.py +3 -3
  25. lusid/models/expiry_event.py +3 -3
  26. lusid/models/fund_configuration.py +150 -0
  27. lusid/models/fund_configuration_properties.py +115 -0
  28. lusid/models/fund_configuration_request.py +130 -0
  29. lusid/models/future_expiry_event.py +100 -0
  30. lusid/models/fx_forward_settlement_event.py +3 -3
  31. lusid/models/informational_error_event.py +3 -3
  32. lusid/models/informational_event.py +3 -3
  33. lusid/models/instrument_event.py +6 -5
  34. lusid/models/instrument_event_type.py +1 -0
  35. lusid/models/maturity_event.py +3 -3
  36. lusid/models/merger_event.py +3 -3
  37. lusid/models/open_event.py +3 -3
  38. lusid/models/paged_resource_list_of_fund_configuration.py +113 -0
  39. lusid/models/portfolio.py +3 -3
  40. lusid/models/portfolio_details.py +3 -3
  41. lusid/models/portfolio_without_href.py +3 -3
  42. lusid/models/raw_vendor_event.py +3 -3
  43. lusid/models/reset_event.py +3 -3
  44. lusid/models/reverse_stock_split_event.py +3 -3
  45. lusid/models/scrip_dividend_event.py +3 -3
  46. lusid/models/spin_off_event.py +3 -3
  47. lusid/models/stock_dividend_event.py +3 -3
  48. lusid/models/stock_split_event.py +3 -3
  49. lusid/models/transition_event.py +3 -3
  50. lusid/models/trigger_event.py +3 -3
  51. {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.259.dist-info}/METADATA +17 -3
  52. {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.259.dist-info}/RECORD +53 -44
  53. {lusid_sdk-2.1.254.dist-info → lusid_sdk-2.1.259.dist-info}/WHEEL +0 -0
@@ -28,6 +28,7 @@ from lusid.models.allocation_service_run_response import AllocationServiceRunRes
28
28
  from lusid.models.block_and_orders_create_request import BlockAndOrdersCreateRequest
29
29
  from lusid.models.book_transactions_request import BookTransactionsRequest
30
30
  from lusid.models.book_transactions_response import BookTransactionsResponse
31
+ from lusid.models.cancel_placements_response import CancelPlacementsResponse
31
32
  from lusid.models.move_orders_to_different_blocks_request import MoveOrdersToDifferentBlocksRequest
32
33
  from lusid.models.place_blocks_request import PlaceBlocksRequest
33
34
  from lusid.models.placement_update_request import PlacementUpdateRequest
@@ -223,6 +224,164 @@ class OrderManagementApi:
223
224
  collection_formats=_collection_formats,
224
225
  _request_auth=_params.get('_request_auth'))
225
226
 
227
+ @overload
228
+ async def cancel_placements(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], **kwargs) -> CancelPlacementsResponse: # noqa: E501
229
+ ...
230
+
231
+ @overload
232
+ def cancel_placements(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], async_req: Optional[bool]=True, **kwargs) -> CancelPlacementsResponse: # noqa: E501
233
+ ...
234
+
235
+ @validate_arguments
236
+ def cancel_placements(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], async_req: Optional[bool]=None, **kwargs) -> Union[CancelPlacementsResponse, Awaitable[CancelPlacementsResponse]]: # noqa: E501
237
+ """[EARLY ACCESS] CancelPlacements: Cancel existing placements # noqa: E501
238
+
239
+ The response returns both the collection of successfully canceled placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
240
+ This method makes a synchronous HTTP request by default. To make an
241
+ asynchronous HTTP request, please pass async_req=True
242
+
243
+ >>> thread = api.cancel_placements(request_body, async_req=True)
244
+ >>> result = thread.get()
245
+
246
+ :param request_body: The request containing the ids of the placements to be cancelled. (required)
247
+ :type request_body: Dict[str, ResourceId]
248
+ :param async_req: Whether to execute the request asynchronously.
249
+ :type async_req: bool, optional
250
+ :param _request_timeout: timeout setting for this request.
251
+ If one number provided, it will be total request
252
+ timeout. It can also be a pair (tuple) of
253
+ (connection, read) timeouts.
254
+ :return: Returns the result object.
255
+ If the method is called asynchronously,
256
+ returns the request thread.
257
+ :rtype: CancelPlacementsResponse
258
+ """
259
+ kwargs['_return_http_data_only'] = True
260
+ if '_preload_content' in kwargs:
261
+ message = "Error! Please call the cancel_placements_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
262
+ raise ValueError(message)
263
+ if async_req is not None:
264
+ kwargs['async_req'] = async_req
265
+ return self.cancel_placements_with_http_info(request_body, **kwargs) # noqa: E501
266
+
267
+ @validate_arguments
268
+ def cancel_placements_with_http_info(self, request_body : Annotated[Dict[str, ResourceId], Field(..., description="The request containing the ids of the placements to be cancelled.")], **kwargs) -> ApiResponse: # noqa: E501
269
+ """[EARLY ACCESS] CancelPlacements: Cancel existing placements # noqa: E501
270
+
271
+ The response returns both the collection of successfully canceled placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
272
+ This method makes a synchronous HTTP request by default. To make an
273
+ asynchronous HTTP request, please pass async_req=True
274
+
275
+ >>> thread = api.cancel_placements_with_http_info(request_body, async_req=True)
276
+ >>> result = thread.get()
277
+
278
+ :param request_body: The request containing the ids of the placements to be cancelled. (required)
279
+ :type request_body: Dict[str, ResourceId]
280
+ :param async_req: Whether to execute the request asynchronously.
281
+ :type async_req: bool, optional
282
+ :param _preload_content: if False, the ApiResponse.data will
283
+ be set to none and raw_data will store the
284
+ HTTP response body without reading/decoding.
285
+ Default is True.
286
+ :type _preload_content: bool, optional
287
+ :param _return_http_data_only: response data instead of ApiResponse
288
+ object with status code, headers, etc
289
+ :type _return_http_data_only: bool, optional
290
+ :param _request_timeout: timeout setting for this request. If one
291
+ number provided, it will be total request
292
+ timeout. It can also be a pair (tuple) of
293
+ (connection, read) timeouts.
294
+ :param _request_auth: set to override the auth_settings for an a single
295
+ request; this effectively ignores the authentication
296
+ in the spec for a single request.
297
+ :type _request_auth: dict, optional
298
+ :type _content_type: string, optional: force content-type for the request
299
+ :return: Returns the result object.
300
+ If the method is called asynchronously,
301
+ returns the request thread.
302
+ :rtype: tuple(CancelPlacementsResponse, status_code(int), headers(HTTPHeaderDict))
303
+ """
304
+
305
+ _params = locals()
306
+
307
+ _all_params = [
308
+ 'request_body'
309
+ ]
310
+ _all_params.extend(
311
+ [
312
+ 'async_req',
313
+ '_return_http_data_only',
314
+ '_preload_content',
315
+ '_request_timeout',
316
+ '_request_auth',
317
+ '_content_type',
318
+ '_headers'
319
+ ]
320
+ )
321
+
322
+ # validate the arguments
323
+ for _key, _val in _params['kwargs'].items():
324
+ if _key not in _all_params:
325
+ raise ApiTypeError(
326
+ "Got an unexpected keyword argument '%s'"
327
+ " to method cancel_placements" % _key
328
+ )
329
+ _params[_key] = _val
330
+ del _params['kwargs']
331
+
332
+ _collection_formats = {}
333
+
334
+ # process the path parameters
335
+ _path_params = {}
336
+
337
+ # process the query parameters
338
+ _query_params = []
339
+ # process the header parameters
340
+ _header_params = dict(_params.get('_headers', {}))
341
+ # process the form parameters
342
+ _form_params = []
343
+ _files = {}
344
+ # process the body parameter
345
+ _body_params = None
346
+ if _params['request_body'] is not None:
347
+ _body_params = _params['request_body']
348
+
349
+ # set the HTTP header `Accept`
350
+ _header_params['Accept'] = self.api_client.select_header_accept(
351
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
352
+
353
+ # set the HTTP header `Content-Type`
354
+ _content_types_list = _params.get('_content_type',
355
+ self.api_client.select_header_content_type(
356
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
357
+ if _content_types_list:
358
+ _header_params['Content-Type'] = _content_types_list
359
+
360
+ # authentication setting
361
+ _auth_settings = ['oauth2'] # noqa: E501
362
+
363
+ _response_types_map = {
364
+ '200': "CancelPlacementsResponse",
365
+ '400': "LusidValidationProblemDetails",
366
+ }
367
+
368
+ return self.api_client.call_api(
369
+ '/api/ordermanagement/$cancelplacements', 'POST',
370
+ _path_params,
371
+ _query_params,
372
+ _header_params,
373
+ body=_body_params,
374
+ post_params=_form_params,
375
+ files=_files,
376
+ response_types_map=_response_types_map,
377
+ auth_settings=_auth_settings,
378
+ async_req=_params.get('async_req'),
379
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
380
+ _preload_content=_params.get('_preload_content', True),
381
+ _request_timeout=_params.get('_request_timeout'),
382
+ collection_formats=_collection_formats,
383
+ _request_auth=_params.get('_request_auth'))
384
+
226
385
  @overload
227
386
  async def create_orders(self, block_and_orders_create_request : Annotated[BlockAndOrdersCreateRequest, Field(..., description="The collection of block and orders requests.")], **kwargs) -> ResourceListOfBlockAndOrders: # noqa: E501
228
387
  ...
@@ -875,7 +1034,7 @@ class OrderManagementApi:
875
1034
  def update_placements(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], async_req: Optional[bool]=None, **kwargs) -> Union[UpdatePlacementsResponse, Awaitable[UpdatePlacementsResponse]]: # noqa: E501
876
1035
  """[EARLY ACCESS] UpdatePlacements: Update existing placements # noqa: E501
877
1036
 
878
- The response returns both the collection of successfully created or updated instruments, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
1037
+ The response returns both the collection of successfully updated placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
879
1038
  This method makes a synchronous HTTP request by default. To make an
880
1039
  asynchronous HTTP request, please pass async_req=True
881
1040
 
@@ -907,7 +1066,7 @@ class OrderManagementApi:
907
1066
  def update_placements_with_http_info(self, request_body : Annotated[Dict[str, PlacementUpdateRequest], Field(..., description="The request containing the placements to be updated.")], **kwargs) -> ApiResponse: # noqa: E501
908
1067
  """[EARLY ACCESS] UpdatePlacements: Update existing placements # noqa: E501
909
1068
 
910
- The response returns both the collection of successfully created or updated instruments, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
1069
+ The response returns both the collection of successfully updated placements, as well as those that failed. For each failure, a reason is provided. It is important to check the failed set for unsuccessful results. # noqa: E501
911
1070
  This method makes a synchronous HTTP request by default. To make an
912
1071
  asynchronous HTTP request, please pass async_req=True
913
1072
 
lusid/configuration.py CHANGED
@@ -373,7 +373,7 @@ class Configuration:
373
373
  return "Python SDK Debug Report:\n"\
374
374
  "OS: {env}\n"\
375
375
  "Python Version: {pyversion}\n"\
376
- "Version of the API: 0.11.6687\n"\
376
+ "Version of the API: 0.11.6692\n"\
377
377
  "SDK Package Version: {package_version}".\
378
378
  format(env=sys.platform, pyversion=sys.version, package_version=package_version)
379
379
 
lusid/models/__init__.py CHANGED
@@ -106,6 +106,8 @@ from lusid.models.calculation_info import CalculationInfo
106
106
  from lusid.models.calendar import Calendar
107
107
  from lusid.models.calendar_date import CalendarDate
108
108
  from lusid.models.calendar_dependency import CalendarDependency
109
+ from lusid.models.cancel_placements_response import CancelPlacementsResponse
110
+ from lusid.models.cancelled_placement_result import CancelledPlacementResult
109
111
  from lusid.models.cap_floor import CapFloor
110
112
  from lusid.models.capital_distribution_event import CapitalDistributionEvent
111
113
  from lusid.models.cash_and_security_offer_election import CashAndSecurityOfferElection
@@ -172,6 +174,7 @@ from lusid.models.compliance_template_parameter import ComplianceTemplateParamet
172
174
  from lusid.models.compliance_template_variation import ComplianceTemplateVariation
173
175
  from lusid.models.compliance_template_variation_dto import ComplianceTemplateVariationDto
174
176
  from lusid.models.compliance_template_variation_request import ComplianceTemplateVariationRequest
177
+ from lusid.models.component_rule import ComponentRule
175
178
  from lusid.models.component_transaction import ComponentTransaction
176
179
  from lusid.models.composite_breakdown import CompositeBreakdown
177
180
  from lusid.models.composite_breakdown_request import CompositeBreakdownRequest
@@ -338,12 +341,16 @@ from lusid.models.flow_conventions import FlowConventions
338
341
  from lusid.models.forward_rate_agreement import ForwardRateAgreement
339
342
  from lusid.models.from_recipe import FromRecipe
340
343
  from lusid.models.fund import Fund
344
+ from lusid.models.fund_configuration import FundConfiguration
345
+ from lusid.models.fund_configuration_properties import FundConfigurationProperties
346
+ from lusid.models.fund_configuration_request import FundConfigurationRequest
341
347
  from lusid.models.fund_properties import FundProperties
342
348
  from lusid.models.fund_request import FundRequest
343
349
  from lusid.models.fund_share_class import FundShareClass
344
350
  from lusid.models.funding_leg import FundingLeg
345
351
  from lusid.models.funding_leg_options import FundingLegOptions
346
352
  from lusid.models.future import Future
353
+ from lusid.models.future_expiry_event import FutureExpiryEvent
347
354
  from lusid.models.futures_contract_details import FuturesContractDetails
348
355
  from lusid.models.fx_conventions import FxConventions
349
356
  from lusid.models.fx_dependency import FxDependency
@@ -568,6 +575,7 @@ from lusid.models.paged_resource_list_of_execution import PagedResourceListOfExe
568
575
  from lusid.models.paged_resource_list_of_fee import PagedResourceListOfFee
569
576
  from lusid.models.paged_resource_list_of_fee_type import PagedResourceListOfFeeType
570
577
  from lusid.models.paged_resource_list_of_fund import PagedResourceListOfFund
578
+ from lusid.models.paged_resource_list_of_fund_configuration import PagedResourceListOfFundConfiguration
571
579
  from lusid.models.paged_resource_list_of_general_ledger_profile_response import PagedResourceListOfGeneralLedgerProfileResponse
572
580
  from lusid.models.paged_resource_list_of_instrument import PagedResourceListOfInstrument
573
581
  from lusid.models.paged_resource_list_of_instrument_event_holder import PagedResourceListOfInstrumentEventHolder
@@ -1110,6 +1118,8 @@ __all__ = [
1110
1118
  "Calendar",
1111
1119
  "CalendarDate",
1112
1120
  "CalendarDependency",
1121
+ "CancelPlacementsResponse",
1122
+ "CancelledPlacementResult",
1113
1123
  "CapFloor",
1114
1124
  "CapitalDistributionEvent",
1115
1125
  "CashAndSecurityOfferElection",
@@ -1176,6 +1186,7 @@ __all__ = [
1176
1186
  "ComplianceTemplateVariation",
1177
1187
  "ComplianceTemplateVariationDto",
1178
1188
  "ComplianceTemplateVariationRequest",
1189
+ "ComponentRule",
1179
1190
  "ComponentTransaction",
1180
1191
  "CompositeBreakdown",
1181
1192
  "CompositeBreakdownRequest",
@@ -1342,12 +1353,16 @@ __all__ = [
1342
1353
  "ForwardRateAgreement",
1343
1354
  "FromRecipe",
1344
1355
  "Fund",
1356
+ "FundConfiguration",
1357
+ "FundConfigurationProperties",
1358
+ "FundConfigurationRequest",
1345
1359
  "FundProperties",
1346
1360
  "FundRequest",
1347
1361
  "FundShareClass",
1348
1362
  "FundingLeg",
1349
1363
  "FundingLegOptions",
1350
1364
  "Future",
1365
+ "FutureExpiryEvent",
1351
1366
  "FuturesContractDetails",
1352
1367
  "FxConventions",
1353
1368
  "FxDependency",
@@ -1572,6 +1587,7 @@ __all__ = [
1572
1587
  "PagedResourceListOfFee",
1573
1588
  "PagedResourceListOfFeeType",
1574
1589
  "PagedResourceListOfFund",
1590
+ "PagedResourceListOfFundConfiguration",
1575
1591
  "PagedResourceListOfGeneralLedgerProfileResponse",
1576
1592
  "PagedResourceListOfInstrument",
1577
1593
  "PagedResourceListOfInstrumentEventHolder",
@@ -35,6 +35,9 @@ class AccountingMethod(str, Enum):
35
35
  LASTINFIRSTOUT = 'LastInFirstOut'
36
36
  HIGHESTCOSTFIRST = 'HighestCostFirst'
37
37
  LOWESTCOSTFIRST = 'LowestCostFirst'
38
+ PRORATEBYUNITS = 'ProRateByUnits'
39
+ PRORATEBYCOST = 'ProRateByCost'
40
+ PRORATEBYCOSTPORTFOLIOCURRENCY = 'ProRateByCostPortfolioCurrency'
38
41
 
39
42
  @classmethod
40
43
  def from_json(cls, json_str: str) -> AccountingMethod:
@@ -31,15 +31,15 @@ class AccumulationEvent(InstrumentEvent):
31
31
  dividend_rate: Union[StrictFloat, StrictInt] = Field(..., alias="dividendRate", description="Dividend rate or payment rate as a percentage. i.e. 5% is written as 0.05")
32
32
  ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party. Typically this is T-1 from the RecordDate.")
33
33
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
34
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
34
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
35
35
  additional_properties: Dict[str, Any] = {}
36
36
  __properties = ["instrumentEventType", "announcementDate", "dividendCurrency", "dividendRate", "exDate", "paymentDate"]
37
37
 
38
38
  @validator('instrument_event_type')
39
39
  def instrument_event_type_validate_enum(cls, value):
40
40
  """Validates the enum"""
41
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
42
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
41
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
42
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
43
43
  return value
44
44
 
45
45
  class Config:
@@ -30,15 +30,15 @@ class AmortisationEvent(InstrumentEvent):
30
30
  dom_ccy: StrictStr = Field(..., alias="domCcy", description="Domestic currency of the originating instrument")
31
31
  pay_receive: constr(strict=True, min_length=1) = Field(..., alias="payReceive", description="Is this event in relation to the Pay or Receive leg")
32
32
  payment_date: datetime = Field(..., alias="paymentDate", description="The date the principal payment is to be made.")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "amountReduced", "domCcy", "payReceive", "paymentDate"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -30,15 +30,15 @@ class BondCouponEvent(InstrumentEvent):
30
30
  payment_date: datetime = Field(..., alias="paymentDate", description="Payment date of the coupon payment")
31
31
  currency: StrictStr = Field(..., description="Currency of the coupon payment")
32
32
  coupon_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="couponPerUnit", description="CouponRate*Principal")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "exDate", "paymentDate", "currency", "couponPerUnit"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -27,15 +27,15 @@ class BondDefaultEvent(InstrumentEvent):
27
27
  Indicates when an issuer has defaulted on an obligation due to technical default, missed payments, or bankruptcy filing. # noqa: E501
28
28
  """
29
29
  effective_date: datetime = Field(..., alias="effectiveDate", description="The date the bond default occurred.")
30
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
30
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
31
31
  additional_properties: Dict[str, Any] = {}
32
32
  __properties = ["instrumentEventType", "effectiveDate"]
33
33
 
34
34
  @validator('instrument_event_type')
35
35
  def instrument_event_type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
38
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
37
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
38
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
39
39
  return value
40
40
 
41
41
  class Config:
@@ -30,15 +30,15 @@ class BondPrincipalEvent(InstrumentEvent):
30
30
  ex_date: datetime = Field(..., alias="exDate", description="Ex-Dividend date of the principal payment")
31
31
  payment_date: datetime = Field(..., alias="paymentDate", description="Payment date of the principal payment")
32
32
  principal_per_unit: Union[StrictFloat, StrictInt] = Field(..., alias="principalPerUnit", description="Principal per unit")
33
- instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent")
33
+ instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties = ["instrumentEventType", "currency", "exDate", "paymentDate", "principalPerUnit"]
36
36
 
37
37
  @validator('instrument_event_type')
38
38
  def instrument_event_type_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent'):
41
- raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent')")
40
+ if value not in ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent'):
41
+ raise ValueError("must be one of enum values ('TransitionEvent', 'InformationalEvent', 'OpenEvent', 'CloseEvent', 'StockSplitEvent', 'BondDefaultEvent', 'CashDividendEvent', 'AmortisationEvent', 'CashFlowEvent', 'ExerciseEvent', 'ResetEvent', 'TriggerEvent', 'RawVendorEvent', 'InformationalErrorEvent', 'BondCouponEvent', 'DividendReinvestmentEvent', 'AccumulationEvent', 'BondPrincipalEvent', 'DividendOptionEvent', 'MaturityEvent', 'FxForwardSettlementEvent', 'ExpiryEvent', 'ScripDividendEvent', 'StockDividendEvent', 'ReverseStockSplitEvent', 'CapitalDistributionEvent', 'SpinOffEvent', 'MergerEvent', 'FutureExpiryEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -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.cancelled_placement_result import CancelledPlacementResult
24
+ from lusid.models.error_detail import ErrorDetail
25
+ from lusid.models.link import Link
26
+ from lusid.models.response_meta_data import ResponseMetaData
27
+
28
+ class CancelPlacementsResponse(BaseModel):
29
+ """
30
+ CancelPlacementsResponse
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, CancelledPlacementResult]] = Field(None, description="The placements which have been successfully cancelled.")
34
+ failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The placements that could not be cancelled, along with a reason for their failure.")
35
+ metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Meta data associated with the cancellation 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) -> CancelPlacementsResponse:
54
+ """Create an instance of CancelPlacementsResponse 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) -> CancelPlacementsResponse:
122
+ """Create an instance of CancelPlacementsResponse from a dict"""
123
+ if obj is None:
124
+ return None
125
+
126
+ if not isinstance(obj, dict):
127
+ return CancelPlacementsResponse.parse_obj(obj)
128
+
129
+ _obj = CancelPlacementsResponse.parse_obj({
130
+ "href": obj.get("href"),
131
+ "values": dict(
132
+ (_k, CancelledPlacementResult.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