lusid-sdk 2.1.351__py3-none-any.whl → 2.1.405__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.
Files changed (94) hide show
  1. lusid/__init__.py +52 -0
  2. lusid/api/__init__.py +2 -0
  3. lusid/api/funds_api.py +9 -8
  4. lusid/api/group_reconciliations_api.py +378 -0
  5. lusid/api/order_management_api.py +174 -0
  6. lusid/api/persons_api.py +4 -4
  7. lusid/api/portfolios_api.py +179 -0
  8. lusid/api/workspace_api.py +40 -40
  9. lusid/configuration.py +1 -1
  10. lusid/models/__init__.py +50 -0
  11. lusid/models/accept_estimate_valuation_point_response.py +100 -0
  12. lusid/models/accumulation_event.py +3 -3
  13. lusid/models/action_id.py +1 -1
  14. lusid/models/amortisation_event.py +3 -3
  15. lusid/models/applicable_instrument_event.py +14 -2
  16. lusid/models/batch_upsert_portfolio_access_metadata_request.py +82 -0
  17. lusid/models/batch_upsert_portfolio_access_metadata_response.py +82 -0
  18. lusid/models/bond_coupon_event.py +3 -3
  19. lusid/models/bond_default_event.py +3 -3
  20. lusid/models/bond_principal_event.py +3 -3
  21. lusid/models/calendar.py +17 -2
  22. lusid/models/capital_distribution_event.py +3 -3
  23. lusid/models/cash_dividend_event.py +3 -3
  24. lusid/models/cash_flow_event.py +3 -3
  25. lusid/models/cds_credit_event.py +105 -0
  26. lusid/models/cdx_credit_event.py +114 -0
  27. lusid/models/change_interval_with_order_management_detail.py +137 -0
  28. lusid/models/close_event.py +3 -3
  29. lusid/models/create_group_reconciliation_comparison_ruleset_request.py +97 -0
  30. lusid/models/credit_premium_cash_flow_event.py +102 -0
  31. lusid/models/custom_entity_definition.py +17 -2
  32. lusid/models/custom_entity_type.py +17 -2
  33. lusid/models/data_type.py +7 -1
  34. lusid/models/dividend_option_event.py +3 -3
  35. lusid/models/dividend_reinvestment_event.py +3 -3
  36. lusid/models/exercise_event.py +3 -3
  37. lusid/models/expiry_event.py +3 -3
  38. lusid/models/fee.py +1 -1
  39. lusid/models/fee_request.py +1 -1
  40. lusid/models/flow_conventions.py +1 -1
  41. lusid/models/fund_amount.py +1 -1
  42. lusid/models/fund_details.py +74 -0
  43. lusid/models/future_expiry_event.py +3 -3
  44. lusid/models/futures_contract_details.py +6 -1
  45. lusid/models/fx_forward_settlement_event.py +13 -5
  46. lusid/models/generated_event_diagnostics.py +75 -0
  47. lusid/models/group_reconciliation_aggregate_attribute_rule.py +84 -0
  48. lusid/models/group_reconciliation_aggregate_comparison_rule_operand.py +71 -0
  49. lusid/models/group_reconciliation_comparison_rule_string_value_map.py +73 -0
  50. lusid/models/group_reconciliation_comparison_rule_tolerance.py +71 -0
  51. lusid/models/group_reconciliation_comparison_ruleset.py +125 -0
  52. lusid/models/group_reconciliation_core_attribute_rule.py +95 -0
  53. lusid/models/group_reconciliation_core_comparison_rule_operand.py +71 -0
  54. lusid/models/holding_pricing_info.py +110 -0
  55. lusid/models/index_convention.py +1 -1
  56. lusid/models/informational_error_event.py +3 -3
  57. lusid/models/informational_event.py +3 -3
  58. lusid/models/instrument_event.py +10 -5
  59. lusid/models/instrument_event_instruction.py +19 -4
  60. lusid/models/instrument_event_type.py +5 -0
  61. lusid/models/maturity_event.py +3 -3
  62. lusid/models/merger_event.py +3 -3
  63. lusid/models/metadata_key_value.py +86 -0
  64. lusid/models/metadata_key_value_response.py +86 -0
  65. lusid/models/new_instrument.py +10 -2
  66. lusid/models/open_event.py +3 -3
  67. lusid/models/order_graph_block_order_detail.py +1 -1
  68. lusid/models/order_update_request.py +5 -0
  69. lusid/models/person.py +17 -2
  70. lusid/models/placement_update_request.py +6 -1
  71. lusid/models/previous_nav.py +3 -3
  72. lusid/models/pricing_context.py +8 -2
  73. lusid/models/raw_vendor_event.py +3 -3
  74. lusid/models/reset_event.py +3 -3
  75. lusid/models/resource_list_of_change_interval_with_order_management_detail.py +113 -0
  76. lusid/models/reverse_stock_split_event.py +3 -3
  77. lusid/models/scrip_dividend_event.py +3 -3
  78. lusid/models/share_class_amount.py +7 -9
  79. lusid/models/share_class_breakdown.py +4 -5
  80. lusid/models/specific_holding_pricing_info.py +75 -0
  81. lusid/models/spin_off_event.py +3 -3
  82. lusid/models/staged_modification.py +8 -1
  83. lusid/models/stock_dividend_event.py +3 -3
  84. lusid/models/stock_split_event.py +3 -3
  85. lusid/models/swap_cash_flow_event.py +97 -0
  86. lusid/models/swap_principal_event.py +97 -0
  87. lusid/models/transaction_diagnostics.py +71 -0
  88. lusid/models/transition_event.py +3 -3
  89. lusid/models/trigger_event.py +3 -3
  90. lusid/models/valuation_point_data_response.py +21 -1
  91. lusid/models/weighted_instrument.py +9 -2
  92. {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/METADATA +52 -23
  93. {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/RECORD +94 -68
  94. {lusid_sdk-2.1.351.dist-info → lusid_sdk-2.1.405.dist-info}/WHEEL +0 -0
lusid/models/__init__.py CHANGED
@@ -24,6 +24,7 @@ from lusid.models.abor_configuration_properties import AborConfigurationProperti
24
24
  from lusid.models.abor_configuration_request import AborConfigurationRequest
25
25
  from lusid.models.abor_properties import AborProperties
26
26
  from lusid.models.abor_request import AborRequest
27
+ from lusid.models.accept_estimate_valuation_point_response import AcceptEstimateValuationPointResponse
27
28
  from lusid.models.access_controlled_action import AccessControlledAction
28
29
  from lusid.models.access_controlled_resource import AccessControlledResource
29
30
  from lusid.models.access_metadata_operation import AccessMetadataOperation
@@ -77,6 +78,8 @@ from lusid.models.basket import Basket
77
78
  from lusid.models.basket_identifier import BasketIdentifier
78
79
  from lusid.models.batch_adjust_holdings_response import BatchAdjustHoldingsResponse
79
80
  from lusid.models.batch_upsert_instrument_properties_response import BatchUpsertInstrumentPropertiesResponse
81
+ from lusid.models.batch_upsert_portfolio_access_metadata_request import BatchUpsertPortfolioAccessMetadataRequest
82
+ from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUpsertPortfolioAccessMetadataResponse
80
83
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
81
84
  from lusid.models.batch_upsert_property_definition_properties_response import BatchUpsertPropertyDefinitionPropertiesResponse
82
85
  from lusid.models.block import Block
@@ -124,12 +127,15 @@ from lusid.models.cash_flow_value_set import CashFlowValueSet
124
127
  from lusid.models.cash_ladder_record import CashLadderRecord
125
128
  from lusid.models.cash_offer_election import CashOfferElection
126
129
  from lusid.models.cash_perpetual import CashPerpetual
130
+ from lusid.models.cds_credit_event import CdsCreditEvent
127
131
  from lusid.models.cds_flow_conventions import CdsFlowConventions
128
132
  from lusid.models.cds_index import CdsIndex
129
133
  from lusid.models.cds_protection_detail_specification import CdsProtectionDetailSpecification
134
+ from lusid.models.cdx_credit_event import CdxCreditEvent
130
135
  from lusid.models.change import Change
131
136
  from lusid.models.change_history import ChangeHistory
132
137
  from lusid.models.change_history_action import ChangeHistoryAction
138
+ from lusid.models.change_interval_with_order_management_detail import ChangeIntervalWithOrderManagementDetail
133
139
  from lusid.models.change_item import ChangeItem
134
140
  from lusid.models.chart_of_accounts import ChartOfAccounts
135
141
  from lusid.models.chart_of_accounts_properties import ChartOfAccountsProperties
@@ -212,6 +218,7 @@ from lusid.models.create_data_type_request import CreateDataTypeRequest
212
218
  from lusid.models.create_date_request import CreateDateRequest
213
219
  from lusid.models.create_derived_property_definition_request import CreateDerivedPropertyDefinitionRequest
214
220
  from lusid.models.create_derived_transaction_portfolio_request import CreateDerivedTransactionPortfolioRequest
221
+ from lusid.models.create_group_reconciliation_comparison_ruleset_request import CreateGroupReconciliationComparisonRulesetRequest
215
222
  from lusid.models.create_portfolio_details import CreatePortfolioDetails
216
223
  from lusid.models.create_portfolio_group_request import CreatePortfolioGroupRequest
217
224
  from lusid.models.create_property_definition_request import CreatePropertyDefinitionRequest
@@ -229,6 +236,7 @@ from lusid.models.create_trade_tickets_response import CreateTradeTicketsRespons
229
236
  from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
230
237
  from lusid.models.create_unit_definition import CreateUnitDefinition
231
238
  from lusid.models.credit_default_swap import CreditDefaultSwap
239
+ from lusid.models.credit_premium_cash_flow_event import CreditPremiumCashFlowEvent
232
240
  from lusid.models.credit_rating import CreditRating
233
241
  from lusid.models.credit_spread_curve_data import CreditSpreadCurveData
234
242
  from lusid.models.credit_support_annex import CreditSupportAnnex
@@ -351,6 +359,7 @@ from lusid.models.fund_amount import FundAmount
351
359
  from lusid.models.fund_configuration import FundConfiguration
352
360
  from lusid.models.fund_configuration_properties import FundConfigurationProperties
353
361
  from lusid.models.fund_configuration_request import FundConfigurationRequest
362
+ from lusid.models.fund_details import FundDetails
354
363
  from lusid.models.fund_pnl_breakdown import FundPnlBreakdown
355
364
  from lusid.models.fund_previous_nav import FundPreviousNAV
356
365
  from lusid.models.fund_properties import FundProperties
@@ -383,6 +392,7 @@ from lusid.models.fx_vol_surface_data import FxVolSurfaceData
383
392
  from lusid.models.general_ledger_profile_mapping import GeneralLedgerProfileMapping
384
393
  from lusid.models.general_ledger_profile_request import GeneralLedgerProfileRequest
385
394
  from lusid.models.general_ledger_profile_response import GeneralLedgerProfileResponse
395
+ from lusid.models.generated_event_diagnostics import GeneratedEventDiagnostics
386
396
  from lusid.models.get_cds_flow_conventions_response import GetCdsFlowConventionsResponse
387
397
  from lusid.models.get_complex_market_data_response import GetComplexMarketDataResponse
388
398
  from lusid.models.get_counterparty_agreement_response import GetCounterpartyAgreementResponse
@@ -405,11 +415,19 @@ from lusid.models.group_filter_predicate_compliance_parameter import GroupFilter
405
415
  from lusid.models.group_filter_step import GroupFilterStep
406
416
  from lusid.models.group_filter_step_request import GroupFilterStepRequest
407
417
  from lusid.models.group_of_market_data_key_rules import GroupOfMarketDataKeyRules
418
+ from lusid.models.group_reconciliation_aggregate_attribute_rule import GroupReconciliationAggregateAttributeRule
419
+ from lusid.models.group_reconciliation_aggregate_comparison_rule_operand import GroupReconciliationAggregateComparisonRuleOperand
420
+ from lusid.models.group_reconciliation_comparison_rule_string_value_map import GroupReconciliationComparisonRuleStringValueMap
421
+ from lusid.models.group_reconciliation_comparison_rule_tolerance import GroupReconciliationComparisonRuleTolerance
422
+ from lusid.models.group_reconciliation_comparison_ruleset import GroupReconciliationComparisonRuleset
423
+ from lusid.models.group_reconciliation_core_attribute_rule import GroupReconciliationCoreAttributeRule
424
+ from lusid.models.group_reconciliation_core_comparison_rule_operand import GroupReconciliationCoreComparisonRuleOperand
408
425
  from lusid.models.grouped_result_of_address_key import GroupedResultOfAddressKey
409
426
  from lusid.models.holding_adjustment import HoldingAdjustment
410
427
  from lusid.models.holding_adjustment_with_date import HoldingAdjustmentWithDate
411
428
  from lusid.models.holding_context import HoldingContext
412
429
  from lusid.models.holding_contributor import HoldingContributor
430
+ from lusid.models.holding_pricing_info import HoldingPricingInfo
413
431
  from lusid.models.holdings_adjustment import HoldingsAdjustment
414
432
  from lusid.models.holdings_adjustment_header import HoldingsAdjustmentHeader
415
433
  from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
@@ -501,6 +519,8 @@ from lusid.models.market_quote import MarketQuote
501
519
  from lusid.models.match_criterion import MatchCriterion
502
520
  from lusid.models.maturity_event import MaturityEvent
503
521
  from lusid.models.merger_event import MergerEvent
522
+ from lusid.models.metadata_key_value import MetadataKeyValue
523
+ from lusid.models.metadata_key_value_response import MetadataKeyValueResponse
504
524
  from lusid.models.metric_value import MetricValue
505
525
  from lusid.models.model_options import ModelOptions
506
526
  from lusid.models.model_options_type import ModelOptionsType
@@ -762,6 +782,7 @@ from lusid.models.resource_list_of_block_and_orders import ResourceListOfBlockAn
762
782
  from lusid.models.resource_list_of_calendar_date import ResourceListOfCalendarDate
763
783
  from lusid.models.resource_list_of_change import ResourceListOfChange
764
784
  from lusid.models.resource_list_of_change_history import ResourceListOfChangeHistory
785
+ from lusid.models.resource_list_of_change_interval_with_order_management_detail import ResourceListOfChangeIntervalWithOrderManagementDetail
765
786
  from lusid.models.resource_list_of_compliance_breached_order_info import ResourceListOfComplianceBreachedOrderInfo
766
787
  from lusid.models.resource_list_of_compliance_rule import ResourceListOfComplianceRule
767
788
  from lusid.models.resource_list_of_compliance_rule_result import ResourceListOfComplianceRuleResult
@@ -867,6 +888,7 @@ from lusid.models.sides_definition_request import SidesDefinitionRequest
867
888
  from lusid.models.simple_cash_flow_loan import SimpleCashFlowLoan
868
889
  from lusid.models.simple_instrument import SimpleInstrument
869
890
  from lusid.models.sort_order import SortOrder
891
+ from lusid.models.specific_holding_pricing_info import SpecificHoldingPricingInfo
870
892
  from lusid.models.spin_off_event import SpinOffEvent
871
893
  from lusid.models.staged_modification import StagedModification
872
894
  from lusid.models.staged_modification_decision import StagedModificationDecision
@@ -891,6 +913,8 @@ from lusid.models.string_list_compliance_parameter import StringListCompliancePa
891
913
  from lusid.models.structured_result_data import StructuredResultData
892
914
  from lusid.models.structured_result_data_id import StructuredResultDataId
893
915
  from lusid.models.sub_holding_key_value_equals import SubHoldingKeyValueEquals
916
+ from lusid.models.swap_cash_flow_event import SwapCashFlowEvent
917
+ from lusid.models.swap_principal_event import SwapPrincipalEvent
894
918
  from lusid.models.target_tax_lot import TargetTaxLot
895
919
  from lusid.models.target_tax_lot_request import TargetTaxLotRequest
896
920
  from lusid.models.tax_rule import TaxRule
@@ -908,6 +932,7 @@ from lusid.models.transaction_configuration_movement_data import TransactionConf
908
932
  from lusid.models.transaction_configuration_movement_data_request import TransactionConfigurationMovementDataRequest
909
933
  from lusid.models.transaction_configuration_type_alias import TransactionConfigurationTypeAlias
910
934
  from lusid.models.transaction_currency_and_amount import TransactionCurrencyAndAmount
935
+ from lusid.models.transaction_diagnostics import TransactionDiagnostics
911
936
  from lusid.models.transaction_field_map import TransactionFieldMap
912
937
  from lusid.models.transaction_price import TransactionPrice
913
938
  from lusid.models.transaction_price_and_type import TransactionPriceAndType
@@ -1069,6 +1094,7 @@ __all__ = [
1069
1094
  "AborConfigurationRequest",
1070
1095
  "AborProperties",
1071
1096
  "AborRequest",
1097
+ "AcceptEstimateValuationPointResponse",
1072
1098
  "AccessControlledAction",
1073
1099
  "AccessControlledResource",
1074
1100
  "AccessMetadataOperation",
@@ -1122,6 +1148,8 @@ __all__ = [
1122
1148
  "BasketIdentifier",
1123
1149
  "BatchAdjustHoldingsResponse",
1124
1150
  "BatchUpsertInstrumentPropertiesResponse",
1151
+ "BatchUpsertPortfolioAccessMetadataRequest",
1152
+ "BatchUpsertPortfolioAccessMetadataResponse",
1125
1153
  "BatchUpsertPortfolioTransactionsResponse",
1126
1154
  "BatchUpsertPropertyDefinitionPropertiesResponse",
1127
1155
  "Block",
@@ -1169,12 +1197,15 @@ __all__ = [
1169
1197
  "CashLadderRecord",
1170
1198
  "CashOfferElection",
1171
1199
  "CashPerpetual",
1200
+ "CdsCreditEvent",
1172
1201
  "CdsFlowConventions",
1173
1202
  "CdsIndex",
1174
1203
  "CdsProtectionDetailSpecification",
1204
+ "CdxCreditEvent",
1175
1205
  "Change",
1176
1206
  "ChangeHistory",
1177
1207
  "ChangeHistoryAction",
1208
+ "ChangeIntervalWithOrderManagementDetail",
1178
1209
  "ChangeItem",
1179
1210
  "ChartOfAccounts",
1180
1211
  "ChartOfAccountsProperties",
@@ -1257,6 +1288,7 @@ __all__ = [
1257
1288
  "CreateDateRequest",
1258
1289
  "CreateDerivedPropertyDefinitionRequest",
1259
1290
  "CreateDerivedTransactionPortfolioRequest",
1291
+ "CreateGroupReconciliationComparisonRulesetRequest",
1260
1292
  "CreatePortfolioDetails",
1261
1293
  "CreatePortfolioGroupRequest",
1262
1294
  "CreatePropertyDefinitionRequest",
@@ -1274,6 +1306,7 @@ __all__ = [
1274
1306
  "CreateTransactionPortfolioRequest",
1275
1307
  "CreateUnitDefinition",
1276
1308
  "CreditDefaultSwap",
1309
+ "CreditPremiumCashFlowEvent",
1277
1310
  "CreditRating",
1278
1311
  "CreditSpreadCurveData",
1279
1312
  "CreditSupportAnnex",
@@ -1396,6 +1429,7 @@ __all__ = [
1396
1429
  "FundConfiguration",
1397
1430
  "FundConfigurationProperties",
1398
1431
  "FundConfigurationRequest",
1432
+ "FundDetails",
1399
1433
  "FundPnlBreakdown",
1400
1434
  "FundPreviousNAV",
1401
1435
  "FundProperties",
@@ -1428,6 +1462,7 @@ __all__ = [
1428
1462
  "GeneralLedgerProfileMapping",
1429
1463
  "GeneralLedgerProfileRequest",
1430
1464
  "GeneralLedgerProfileResponse",
1465
+ "GeneratedEventDiagnostics",
1431
1466
  "GetCdsFlowConventionsResponse",
1432
1467
  "GetComplexMarketDataResponse",
1433
1468
  "GetCounterpartyAgreementResponse",
@@ -1450,11 +1485,19 @@ __all__ = [
1450
1485
  "GroupFilterStep",
1451
1486
  "GroupFilterStepRequest",
1452
1487
  "GroupOfMarketDataKeyRules",
1488
+ "GroupReconciliationAggregateAttributeRule",
1489
+ "GroupReconciliationAggregateComparisonRuleOperand",
1490
+ "GroupReconciliationComparisonRuleStringValueMap",
1491
+ "GroupReconciliationComparisonRuleTolerance",
1492
+ "GroupReconciliationComparisonRuleset",
1493
+ "GroupReconciliationCoreAttributeRule",
1494
+ "GroupReconciliationCoreComparisonRuleOperand",
1453
1495
  "GroupedResultOfAddressKey",
1454
1496
  "HoldingAdjustment",
1455
1497
  "HoldingAdjustmentWithDate",
1456
1498
  "HoldingContext",
1457
1499
  "HoldingContributor",
1500
+ "HoldingPricingInfo",
1458
1501
  "HoldingsAdjustment",
1459
1502
  "HoldingsAdjustmentHeader",
1460
1503
  "IUnitDefinitionDto",
@@ -1546,6 +1589,8 @@ __all__ = [
1546
1589
  "MatchCriterion",
1547
1590
  "MaturityEvent",
1548
1591
  "MergerEvent",
1592
+ "MetadataKeyValue",
1593
+ "MetadataKeyValueResponse",
1549
1594
  "MetricValue",
1550
1595
  "ModelOptions",
1551
1596
  "ModelOptionsType",
@@ -1807,6 +1852,7 @@ __all__ = [
1807
1852
  "ResourceListOfCalendarDate",
1808
1853
  "ResourceListOfChange",
1809
1854
  "ResourceListOfChangeHistory",
1855
+ "ResourceListOfChangeIntervalWithOrderManagementDetail",
1810
1856
  "ResourceListOfComplianceBreachedOrderInfo",
1811
1857
  "ResourceListOfComplianceRule",
1812
1858
  "ResourceListOfComplianceRuleResult",
@@ -1912,6 +1958,7 @@ __all__ = [
1912
1958
  "SimpleCashFlowLoan",
1913
1959
  "SimpleInstrument",
1914
1960
  "SortOrder",
1961
+ "SpecificHoldingPricingInfo",
1915
1962
  "SpinOffEvent",
1916
1963
  "StagedModification",
1917
1964
  "StagedModificationDecision",
@@ -1936,6 +1983,8 @@ __all__ = [
1936
1983
  "StructuredResultData",
1937
1984
  "StructuredResultDataId",
1938
1985
  "SubHoldingKeyValueEquals",
1986
+ "SwapCashFlowEvent",
1987
+ "SwapPrincipalEvent",
1939
1988
  "TargetTaxLot",
1940
1989
  "TargetTaxLotRequest",
1941
1990
  "TaxRule",
@@ -1953,6 +2002,7 @@ __all__ = [
1953
2002
  "TransactionConfigurationMovementDataRequest",
1954
2003
  "TransactionConfigurationTypeAlias",
1955
2004
  "TransactionCurrencyAndAmount",
2005
+ "TransactionDiagnostics",
1956
2006
  "TransactionFieldMap",
1957
2007
  "TransactionPrice",
1958
2008
  "TransactionPriceAndType",
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.link import Link
24
+ from lusid.models.valuation_point_data_response import ValuationPointDataResponse
25
+
26
+ class AcceptEstimateValuationPointResponse(BaseModel):
27
+ """
28
+ The Valuation Point Data Response for AcceptEstimate called on the Fund and specified date. # noqa: E501
29
+ """
30
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
31
+ candidate_valuation_point: ValuationPointDataResponse = Field(..., alias="candidateValuationPoint")
32
+ latest_valuation_point: Optional[ValuationPointDataResponse] = Field(None, alias="latestValuationPoint")
33
+ links: Optional[conlist(Link)] = None
34
+ __properties = ["href", "candidateValuationPoint", "latestValuationPoint", "links"]
35
+
36
+ class Config:
37
+ """Pydantic configuration"""
38
+ allow_population_by_field_name = True
39
+ validate_assignment = True
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.dict(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> AcceptEstimateValuationPointResponse:
51
+ """Create an instance of AcceptEstimateValuationPointResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self):
55
+ """Returns the dictionary representation of the model using alias"""
56
+ _dict = self.dict(by_alias=True,
57
+ exclude={
58
+ },
59
+ exclude_none=True)
60
+ # override the default output from pydantic by calling `to_dict()` of candidate_valuation_point
61
+ if self.candidate_valuation_point:
62
+ _dict['candidateValuationPoint'] = self.candidate_valuation_point.to_dict()
63
+ # override the default output from pydantic by calling `to_dict()` of latest_valuation_point
64
+ if self.latest_valuation_point:
65
+ _dict['latestValuationPoint'] = self.latest_valuation_point.to_dict()
66
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
67
+ _items = []
68
+ if self.links:
69
+ for _item in self.links:
70
+ if _item:
71
+ _items.append(_item.to_dict())
72
+ _dict['links'] = _items
73
+ # set to None if href (nullable) is None
74
+ # and __fields_set__ contains the field
75
+ if self.href is None and "href" in self.__fields_set__:
76
+ _dict['href'] = None
77
+
78
+ # set to None if links (nullable) is None
79
+ # and __fields_set__ contains the field
80
+ if self.links is None and "links" in self.__fields_set__:
81
+ _dict['links'] = None
82
+
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: dict) -> AcceptEstimateValuationPointResponse:
87
+ """Create an instance of AcceptEstimateValuationPointResponse from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return AcceptEstimateValuationPointResponse.parse_obj(obj)
93
+
94
+ _obj = AcceptEstimateValuationPointResponse.parse_obj({
95
+ "href": obj.get("href"),
96
+ "candidate_valuation_point": ValuationPointDataResponse.from_dict(obj.get("candidateValuationPoint")) if obj.get("candidateValuationPoint") is not None else None,
97
+ "latest_valuation_point": ValuationPointDataResponse.from_dict(obj.get("latestValuationPoint")) if obj.get("latestValuationPoint") is not None else None,
98
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
99
+ })
100
+ return _obj
@@ -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, FutureExpiryEvent")
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, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
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', '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')")
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', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
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', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
43
43
  return value
44
44
 
45
45
  class Config:
lusid/models/action_id.py CHANGED
@@ -27,7 +27,7 @@ class ActionId(BaseModel):
27
27
  """
28
28
  scope: constr(strict=True, max_length=100, min_length=3) = Field(...)
29
29
  activity: constr(strict=True, max_length=25, min_length=3) = Field(...)
30
- entity: constr(strict=True, max_length=25, min_length=3) = Field(...)
30
+ entity: constr(strict=True, max_length=40, min_length=3) = Field(...)
31
31
  __properties = ["scope", "activity", "entity"]
32
32
 
33
33
  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, FutureExpiryEvent")
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, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent")
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', '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')")
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', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent'):
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', 'SwapCashFlowEvent', 'SwapPrincipalEvent', 'CreditPremiumCashFlowEvent', 'CdsCreditEvent', 'CdxCreditEvent')")
42
42
  return value
43
43
 
44
44
  class Config:
@@ -20,9 +20,11 @@ import json
20
20
 
21
21
  from typing import Any, Dict, List, Optional
22
22
  from pydantic.v1 import BaseModel, Field, StrictInt, conlist, constr
23
+ from lusid.models.generated_event_diagnostics import GeneratedEventDiagnostics
23
24
  from lusid.models.instrument_event_holder import InstrumentEventHolder
24
25
  from lusid.models.resource_id import ResourceId
25
26
  from lusid.models.transaction import Transaction
27
+ from lusid.models.transaction_diagnostics import TransactionDiagnostics
26
28
 
27
29
  class ApplicableInstrumentEvent(BaseModel):
28
30
  """
@@ -36,10 +38,12 @@ class ApplicableInstrumentEvent(BaseModel):
36
38
  instrument_event_type: constr(strict=True, min_length=1) = Field(..., alias="instrumentEventType")
37
39
  instrument_event_id: constr(strict=True, min_length=1) = Field(..., alias="instrumentEventId")
38
40
  generated_event: Optional[InstrumentEventHolder] = Field(None, alias="generatedEvent")
41
+ generated_event_diagnostics: Optional[GeneratedEventDiagnostics] = Field(None, alias="generatedEventDiagnostics")
39
42
  loaded_event: Optional[InstrumentEventHolder] = Field(None, alias="loadedEvent")
40
43
  applied_instrument_event_instruction_id: constr(strict=True, min_length=1) = Field(..., alias="appliedInstrumentEventInstructionId")
41
44
  transactions: Optional[conlist(Transaction)] = None
42
- __properties = ["portfolioId", "holdingId", "lusidInstrumentId", "instrumentScope", "instrumentType", "instrumentEventType", "instrumentEventId", "generatedEvent", "loadedEvent", "appliedInstrumentEventInstructionId", "transactions"]
45
+ transaction_diagnostics: Optional[TransactionDiagnostics] = Field(None, alias="transactionDiagnostics")
46
+ __properties = ["portfolioId", "holdingId", "lusidInstrumentId", "instrumentScope", "instrumentType", "instrumentEventType", "instrumentEventId", "generatedEvent", "generatedEventDiagnostics", "loadedEvent", "appliedInstrumentEventInstructionId", "transactions", "transactionDiagnostics"]
43
47
 
44
48
  class Config:
45
49
  """Pydantic configuration"""
@@ -71,6 +75,9 @@ class ApplicableInstrumentEvent(BaseModel):
71
75
  # override the default output from pydantic by calling `to_dict()` of generated_event
72
76
  if self.generated_event:
73
77
  _dict['generatedEvent'] = self.generated_event.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of generated_event_diagnostics
79
+ if self.generated_event_diagnostics:
80
+ _dict['generatedEventDiagnostics'] = self.generated_event_diagnostics.to_dict()
74
81
  # override the default output from pydantic by calling `to_dict()` of loaded_event
75
82
  if self.loaded_event:
76
83
  _dict['loadedEvent'] = self.loaded_event.to_dict()
@@ -81,6 +88,9 @@ class ApplicableInstrumentEvent(BaseModel):
81
88
  if _item:
82
89
  _items.append(_item.to_dict())
83
90
  _dict['transactions'] = _items
91
+ # override the default output from pydantic by calling `to_dict()` of transaction_diagnostics
92
+ if self.transaction_diagnostics:
93
+ _dict['transactionDiagnostics'] = self.transaction_diagnostics.to_dict()
84
94
  # set to None if transactions (nullable) is None
85
95
  # and __fields_set__ contains the field
86
96
  if self.transactions is None and "transactions" in self.__fields_set__:
@@ -106,8 +116,10 @@ class ApplicableInstrumentEvent(BaseModel):
106
116
  "instrument_event_type": obj.get("instrumentEventType"),
107
117
  "instrument_event_id": obj.get("instrumentEventId"),
108
118
  "generated_event": InstrumentEventHolder.from_dict(obj.get("generatedEvent")) if obj.get("generatedEvent") is not None else None,
119
+ "generated_event_diagnostics": GeneratedEventDiagnostics.from_dict(obj.get("generatedEventDiagnostics")) if obj.get("generatedEventDiagnostics") is not None else None,
109
120
  "loaded_event": InstrumentEventHolder.from_dict(obj.get("loadedEvent")) if obj.get("loadedEvent") is not None else None,
110
121
  "applied_instrument_event_instruction_id": obj.get("appliedInstrumentEventInstructionId"),
111
- "transactions": [Transaction.from_dict(_item) for _item in obj.get("transactions")] if obj.get("transactions") is not None else None
122
+ "transactions": [Transaction.from_dict(_item) for _item in obj.get("transactions")] if obj.get("transactions") is not None else None,
123
+ "transaction_diagnostics": TransactionDiagnostics.from_dict(obj.get("transactionDiagnostics")) if obj.get("transactionDiagnostics") is not None else None
112
124
  })
113
125
  return _obj
@@ -0,0 +1,82 @@
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 BaseModel, Field
23
+ from lusid.models.metadata_key_value import MetadataKeyValue
24
+
25
+ class BatchUpsertPortfolioAccessMetadataRequest(BaseModel):
26
+ """
27
+ BatchUpsertPortfolioAccessMetadataRequest
28
+ """
29
+ portfolios_with_metadata: Dict[str, MetadataKeyValue] = Field(..., alias="portfoliosWithMetadata", description="The set of portfolios with the access control metadata")
30
+ __properties = ["portfoliosWithMetadata"]
31
+
32
+ class Config:
33
+ """Pydantic configuration"""
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> BatchUpsertPortfolioAccessMetadataRequest:
47
+ """Create an instance of BatchUpsertPortfolioAccessMetadataRequest from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True,
53
+ exclude={
54
+ },
55
+ exclude_none=True)
56
+ # override the default output from pydantic by calling `to_dict()` of each value in portfolios_with_metadata (dict)
57
+ _field_dict = {}
58
+ if self.portfolios_with_metadata:
59
+ for _key in self.portfolios_with_metadata:
60
+ if self.portfolios_with_metadata[_key]:
61
+ _field_dict[_key] = self.portfolios_with_metadata[_key].to_dict()
62
+ _dict['portfoliosWithMetadata'] = _field_dict
63
+ return _dict
64
+
65
+ @classmethod
66
+ def from_dict(cls, obj: dict) -> BatchUpsertPortfolioAccessMetadataRequest:
67
+ """Create an instance of BatchUpsertPortfolioAccessMetadataRequest from a dict"""
68
+ if obj is None:
69
+ return None
70
+
71
+ if not isinstance(obj, dict):
72
+ return BatchUpsertPortfolioAccessMetadataRequest.parse_obj(obj)
73
+
74
+ _obj = BatchUpsertPortfolioAccessMetadataRequest.parse_obj({
75
+ "portfolios_with_metadata": dict(
76
+ (_k, MetadataKeyValue.from_dict(_v))
77
+ for _k, _v in obj.get("portfoliosWithMetadata").items()
78
+ )
79
+ if obj.get("portfoliosWithMetadata") is not None
80
+ else None
81
+ })
82
+ return _obj
@@ -0,0 +1,82 @@
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 BaseModel, Field
23
+ from lusid.models.metadata_key_value_response import MetadataKeyValueResponse
24
+
25
+ class BatchUpsertPortfolioAccessMetadataResponse(BaseModel):
26
+ """
27
+ BatchUpsertPortfolioAccessMetadataResponse
28
+ """
29
+ portfolios_with_metadata: Dict[str, MetadataKeyValueResponse] = Field(..., alias="portfoliosWithMetadata", description="The set of portfolios with the access control metadata")
30
+ __properties = ["portfoliosWithMetadata"]
31
+
32
+ class Config:
33
+ """Pydantic configuration"""
34
+ allow_population_by_field_name = True
35
+ validate_assignment = True
36
+
37
+ def to_str(self) -> str:
38
+ """Returns the string representation of the model using alias"""
39
+ return pprint.pformat(self.dict(by_alias=True))
40
+
41
+ def to_json(self) -> str:
42
+ """Returns the JSON representation of the model using alias"""
43
+ return json.dumps(self.to_dict())
44
+
45
+ @classmethod
46
+ def from_json(cls, json_str: str) -> BatchUpsertPortfolioAccessMetadataResponse:
47
+ """Create an instance of BatchUpsertPortfolioAccessMetadataResponse from a JSON string"""
48
+ return cls.from_dict(json.loads(json_str))
49
+
50
+ def to_dict(self):
51
+ """Returns the dictionary representation of the model using alias"""
52
+ _dict = self.dict(by_alias=True,
53
+ exclude={
54
+ },
55
+ exclude_none=True)
56
+ # override the default output from pydantic by calling `to_dict()` of each value in portfolios_with_metadata (dict)
57
+ _field_dict = {}
58
+ if self.portfolios_with_metadata:
59
+ for _key in self.portfolios_with_metadata:
60
+ if self.portfolios_with_metadata[_key]:
61
+ _field_dict[_key] = self.portfolios_with_metadata[_key].to_dict()
62
+ _dict['portfoliosWithMetadata'] = _field_dict
63
+ return _dict
64
+
65
+ @classmethod
66
+ def from_dict(cls, obj: dict) -> BatchUpsertPortfolioAccessMetadataResponse:
67
+ """Create an instance of BatchUpsertPortfolioAccessMetadataResponse from a dict"""
68
+ if obj is None:
69
+ return None
70
+
71
+ if not isinstance(obj, dict):
72
+ return BatchUpsertPortfolioAccessMetadataResponse.parse_obj(obj)
73
+
74
+ _obj = BatchUpsertPortfolioAccessMetadataResponse.parse_obj({
75
+ "portfolios_with_metadata": dict(
76
+ (_k, MetadataKeyValueResponse.from_dict(_v))
77
+ for _k, _v in obj.get("portfoliosWithMetadata").items()
78
+ )
79
+ if obj.get("portfoliosWithMetadata") is not None
80
+ else None
81
+ })
82
+ return _obj