lusid-sdk 2.1.697__py3-none-any.whl → 2.1.698__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lusid/__init__.py +10 -0
- lusid/api/__init__.py +2 -0
- lusid/api/identifier_definitions_api.py +960 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +8 -0
- lusid/models/create_identifier_definition_request.py +189 -0
- lusid/models/identifier_definition.py +192 -0
- lusid/models/paged_resource_list_of_identifier_definition.py +121 -0
- lusid/models/update_identifier_definition_request.py +146 -0
- {lusid_sdk-2.1.697.dist-info → lusid_sdk-2.1.698.dist-info}/METADATA +10 -1
- {lusid_sdk-2.1.697.dist-info → lusid_sdk-2.1.698.dist-info}/RECORD +12 -7
- {lusid_sdk-2.1.697.dist-info → lusid_sdk-2.1.698.dist-info}/WHEEL +0 -0
lusid/configuration.py
CHANGED
@@ -445,7 +445,7 @@ class Configuration:
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
446
446
|
"OS: {env}\n"\
|
447
447
|
"Python Version: {pyversion}\n"\
|
448
|
-
"Version of the API: 0.11.
|
448
|
+
"Version of the API: 0.11.7366\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
lusid/models/__init__.py
CHANGED
@@ -241,6 +241,7 @@ from lusid.models.create_derived_property_definition_request import CreateDerive
|
|
241
241
|
from lusid.models.create_derived_transaction_portfolio_request import CreateDerivedTransactionPortfolioRequest
|
242
242
|
from lusid.models.create_group_reconciliation_comparison_ruleset_request import CreateGroupReconciliationComparisonRulesetRequest
|
243
243
|
from lusid.models.create_group_reconciliation_definition_request import CreateGroupReconciliationDefinitionRequest
|
244
|
+
from lusid.models.create_identifier_definition_request import CreateIdentifierDefinitionRequest
|
244
245
|
from lusid.models.create_portfolio_details import CreatePortfolioDetails
|
245
246
|
from lusid.models.create_portfolio_group_request import CreatePortfolioGroupRequest
|
246
247
|
from lusid.models.create_property_definition_request import CreatePropertyDefinitionRequest
|
@@ -497,6 +498,7 @@ from lusid.models.holdings_adjustment import HoldingsAdjustment
|
|
497
498
|
from lusid.models.holdings_adjustment_header import HoldingsAdjustmentHeader
|
498
499
|
from lusid.models.i_unit_definition_dto import IUnitDefinitionDto
|
499
500
|
from lusid.models.id_selector_definition import IdSelectorDefinition
|
501
|
+
from lusid.models.identifier_definition import IdentifierDefinition
|
500
502
|
from lusid.models.identifier_part_schema import IdentifierPartSchema
|
501
503
|
from lusid.models.index_convention import IndexConvention
|
502
504
|
from lusid.models.index_model_options import IndexModelOptions
|
@@ -689,6 +691,7 @@ from lusid.models.paged_resource_list_of_general_ledger_profile_response import
|
|
689
691
|
from lusid.models.paged_resource_list_of_group_reconciliation_comparison_result import PagedResourceListOfGroupReconciliationComparisonResult
|
690
692
|
from lusid.models.paged_resource_list_of_group_reconciliation_comparison_ruleset import PagedResourceListOfGroupReconciliationComparisonRuleset
|
691
693
|
from lusid.models.paged_resource_list_of_group_reconciliation_definition import PagedResourceListOfGroupReconciliationDefinition
|
694
|
+
from lusid.models.paged_resource_list_of_identifier_definition import PagedResourceListOfIdentifierDefinition
|
692
695
|
from lusid.models.paged_resource_list_of_instrument import PagedResourceListOfInstrument
|
693
696
|
from lusid.models.paged_resource_list_of_instrument_event_holder import PagedResourceListOfInstrumentEventHolder
|
694
697
|
from lusid.models.paged_resource_list_of_instrument_event_instruction import PagedResourceListOfInstrumentEventInstruction
|
@@ -1090,6 +1093,7 @@ from lusid.models.update_derived_property_definition_request import UpdateDerive
|
|
1090
1093
|
from lusid.models.update_fee_type_request import UpdateFeeTypeRequest
|
1091
1094
|
from lusid.models.update_group_reconciliation_comparison_ruleset_request import UpdateGroupReconciliationComparisonRulesetRequest
|
1092
1095
|
from lusid.models.update_group_reconciliation_definition_request import UpdateGroupReconciliationDefinitionRequest
|
1096
|
+
from lusid.models.update_identifier_definition_request import UpdateIdentifierDefinitionRequest
|
1093
1097
|
from lusid.models.update_instrument_identifier_request import UpdateInstrumentIdentifierRequest
|
1094
1098
|
from lusid.models.update_orders_response import UpdateOrdersResponse
|
1095
1099
|
from lusid.models.update_placements_response import UpdatePlacementsResponse
|
@@ -1421,6 +1425,7 @@ __all__ = [
|
|
1421
1425
|
"CreateDerivedTransactionPortfolioRequest",
|
1422
1426
|
"CreateGroupReconciliationComparisonRulesetRequest",
|
1423
1427
|
"CreateGroupReconciliationDefinitionRequest",
|
1428
|
+
"CreateIdentifierDefinitionRequest",
|
1424
1429
|
"CreatePortfolioDetails",
|
1425
1430
|
"CreatePortfolioGroupRequest",
|
1426
1431
|
"CreatePropertyDefinitionRequest",
|
@@ -1677,6 +1682,7 @@ __all__ = [
|
|
1677
1682
|
"HoldingsAdjustmentHeader",
|
1678
1683
|
"IUnitDefinitionDto",
|
1679
1684
|
"IdSelectorDefinition",
|
1685
|
+
"IdentifierDefinition",
|
1680
1686
|
"IdentifierPartSchema",
|
1681
1687
|
"IndexConvention",
|
1682
1688
|
"IndexModelOptions",
|
@@ -1869,6 +1875,7 @@ __all__ = [
|
|
1869
1875
|
"PagedResourceListOfGroupReconciliationComparisonResult",
|
1870
1876
|
"PagedResourceListOfGroupReconciliationComparisonRuleset",
|
1871
1877
|
"PagedResourceListOfGroupReconciliationDefinition",
|
1878
|
+
"PagedResourceListOfIdentifierDefinition",
|
1872
1879
|
"PagedResourceListOfInstrument",
|
1873
1880
|
"PagedResourceListOfInstrumentEventHolder",
|
1874
1881
|
"PagedResourceListOfInstrumentEventInstruction",
|
@@ -2270,6 +2277,7 @@ __all__ = [
|
|
2270
2277
|
"UpdateFeeTypeRequest",
|
2271
2278
|
"UpdateGroupReconciliationComparisonRulesetRequest",
|
2272
2279
|
"UpdateGroupReconciliationDefinitionRequest",
|
2280
|
+
"UpdateIdentifierDefinitionRequest",
|
2273
2281
|
"UpdateInstrumentIdentifierRequest",
|
2274
2282
|
"UpdateOrdersResponse",
|
2275
2283
|
"UpdatePlacementsResponse",
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
23
|
+
from lusid.models.model_property import ModelProperty
|
24
|
+
|
25
|
+
class CreateIdentifierDefinitionRequest(BaseModel):
|
26
|
+
"""
|
27
|
+
CreateIdentifierDefinitionRequest
|
28
|
+
"""
|
29
|
+
domain: StrictStr = Field(..., description="The type of entity to which the identifier can be attached. Supported values are \"Instrument\", \"Person\", \"LegalEntity\"and \"CustomEntity\". The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation, Timeline, ClosedPeriod, AddressKeyDefinition, AmortisationRuleSet, AnalyticsSetInventory, AtomUnitResult, CleardownModule, ComplexMarketData, ComplianceRunSummary, ComplianceRule, ComplianceRunInfo, CorporateActionSource, CounterpartyAgreement, CustomEntityDefinition, DataType, Dialect, EventHandler, GeneralLedgerProfile, PostingModule, Quote, RecipeComposer, ReconciliationRunBreak, ReferenceList, RelationDefinition, ReturnBlockIndex, SRSDocument, SRSIndex, TransactionTemplate, TransactionTemplateScope, TransactionType, TransactionTypeConfig, TranslationScript, TaskDefinition, TaskInstance, Worker, StagingRuleSet, IdentifierDefinition")
|
30
|
+
identifier_scope: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="identifierScope", description="The scope that the identifier definition exists in.")
|
31
|
+
identifier_type: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="identifierType", description="What the identifier represents. Together with \"domain\" and \"identifierScope\" this uniquely identifies the identifier definition.")
|
32
|
+
life_time: StrictStr = Field(..., alias="lifeTime", description="Describes whether an identifier value is associated with an entity for all effective dates (“Perpetual”) or applies within a specified effective date range (“TimeVariant”). The available values are: Perpetual, TimeVariant")
|
33
|
+
hierarchy_usage: Optional[StrictStr] = Field(None, alias="hierarchyUsage", description="Nullable, defaults to \"MasterIdentifier\" if no value provided. \"MasterIdentifier\" (aka unique) An entity can have one value for this identifier definition on a given effective date. A value for this identifier definition can only be associated with one entity (in a given scope) on a given effective date. \"ParentIdentifier\" (aka non-unique) An entity can have one value for this identifier definition on a given effective date. A value for this identifier definition can be associated with many entities (in a given scope) on a given effective date.")
|
34
|
+
hierarchy_level: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, alias="hierarchyLevel", description="Optional metadata associated with the identifier definition.")
|
35
|
+
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="A display name for the identifier. E.g. Figi.")
|
36
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="An optional description for the identifier.")
|
37
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the identifier definition.")
|
38
|
+
__properties = ["domain", "identifierScope", "identifierType", "lifeTime", "hierarchyUsage", "hierarchyLevel", "displayName", "description", "properties"]
|
39
|
+
|
40
|
+
@validator('domain')
|
41
|
+
def domain_validate_enum(cls, value):
|
42
|
+
"""Validates the enum"""
|
43
|
+
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition'):
|
44
|
+
raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition')")
|
45
|
+
return value
|
46
|
+
|
47
|
+
@validator('identifier_scope')
|
48
|
+
def identifier_scope_validate_regular_expression(cls, value):
|
49
|
+
"""Validates the regular expression"""
|
50
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
51
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
52
|
+
return value
|
53
|
+
|
54
|
+
@validator('identifier_type')
|
55
|
+
def identifier_type_validate_regular_expression(cls, value):
|
56
|
+
"""Validates the regular expression"""
|
57
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
58
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
59
|
+
return value
|
60
|
+
|
61
|
+
@validator('life_time')
|
62
|
+
def life_time_validate_enum(cls, value):
|
63
|
+
"""Validates the enum"""
|
64
|
+
if value not in ('Perpetual', 'TimeVariant'):
|
65
|
+
raise ValueError("must be one of enum values ('Perpetual', 'TimeVariant')")
|
66
|
+
return value
|
67
|
+
|
68
|
+
@validator('hierarchy_level')
|
69
|
+
def hierarchy_level_validate_regular_expression(cls, value):
|
70
|
+
"""Validates the regular expression"""
|
71
|
+
if value is None:
|
72
|
+
return value
|
73
|
+
|
74
|
+
if not re.match(r"^[\s\S]*$", value):
|
75
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
76
|
+
return value
|
77
|
+
|
78
|
+
@validator('display_name')
|
79
|
+
def display_name_validate_regular_expression(cls, value):
|
80
|
+
"""Validates the regular expression"""
|
81
|
+
if value is None:
|
82
|
+
return value
|
83
|
+
|
84
|
+
if not re.match(r"^[^\\<>&\"]+$", value):
|
85
|
+
raise ValueError(r"must validate the regular expression /^[^\\<>&\"]+$/")
|
86
|
+
return value
|
87
|
+
|
88
|
+
@validator('description')
|
89
|
+
def description_validate_regular_expression(cls, value):
|
90
|
+
"""Validates the regular expression"""
|
91
|
+
if value is None:
|
92
|
+
return value
|
93
|
+
|
94
|
+
if not re.match(r"^[\s\S]*$", value):
|
95
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
96
|
+
return value
|
97
|
+
|
98
|
+
class Config:
|
99
|
+
"""Pydantic configuration"""
|
100
|
+
allow_population_by_field_name = True
|
101
|
+
validate_assignment = True
|
102
|
+
|
103
|
+
def __str__(self):
|
104
|
+
"""For `print` and `pprint`"""
|
105
|
+
return pprint.pformat(self.dict(by_alias=False))
|
106
|
+
|
107
|
+
def __repr__(self):
|
108
|
+
"""For `print` and `pprint`"""
|
109
|
+
return self.to_str()
|
110
|
+
|
111
|
+
def to_str(self) -> str:
|
112
|
+
"""Returns the string representation of the model using alias"""
|
113
|
+
return pprint.pformat(self.dict(by_alias=True))
|
114
|
+
|
115
|
+
def to_json(self) -> str:
|
116
|
+
"""Returns the JSON representation of the model using alias"""
|
117
|
+
return json.dumps(self.to_dict())
|
118
|
+
|
119
|
+
@classmethod
|
120
|
+
def from_json(cls, json_str: str) -> CreateIdentifierDefinitionRequest:
|
121
|
+
"""Create an instance of CreateIdentifierDefinitionRequest from a JSON string"""
|
122
|
+
return cls.from_dict(json.loads(json_str))
|
123
|
+
|
124
|
+
def to_dict(self):
|
125
|
+
"""Returns the dictionary representation of the model using alias"""
|
126
|
+
_dict = self.dict(by_alias=True,
|
127
|
+
exclude={
|
128
|
+
},
|
129
|
+
exclude_none=True)
|
130
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
131
|
+
_field_dict = {}
|
132
|
+
if self.properties:
|
133
|
+
for _key in self.properties:
|
134
|
+
if self.properties[_key]:
|
135
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
136
|
+
_dict['properties'] = _field_dict
|
137
|
+
# set to None if hierarchy_usage (nullable) is None
|
138
|
+
# and __fields_set__ contains the field
|
139
|
+
if self.hierarchy_usage is None and "hierarchy_usage" in self.__fields_set__:
|
140
|
+
_dict['hierarchyUsage'] = None
|
141
|
+
|
142
|
+
# set to None if hierarchy_level (nullable) is None
|
143
|
+
# and __fields_set__ contains the field
|
144
|
+
if self.hierarchy_level is None and "hierarchy_level" in self.__fields_set__:
|
145
|
+
_dict['hierarchyLevel'] = None
|
146
|
+
|
147
|
+
# set to None if display_name (nullable) is None
|
148
|
+
# and __fields_set__ contains the field
|
149
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
150
|
+
_dict['displayName'] = None
|
151
|
+
|
152
|
+
# set to None if description (nullable) is None
|
153
|
+
# and __fields_set__ contains the field
|
154
|
+
if self.description is None and "description" in self.__fields_set__:
|
155
|
+
_dict['description'] = None
|
156
|
+
|
157
|
+
# set to None if properties (nullable) is None
|
158
|
+
# and __fields_set__ contains the field
|
159
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
160
|
+
_dict['properties'] = None
|
161
|
+
|
162
|
+
return _dict
|
163
|
+
|
164
|
+
@classmethod
|
165
|
+
def from_dict(cls, obj: dict) -> CreateIdentifierDefinitionRequest:
|
166
|
+
"""Create an instance of CreateIdentifierDefinitionRequest from a dict"""
|
167
|
+
if obj is None:
|
168
|
+
return None
|
169
|
+
|
170
|
+
if not isinstance(obj, dict):
|
171
|
+
return CreateIdentifierDefinitionRequest.parse_obj(obj)
|
172
|
+
|
173
|
+
_obj = CreateIdentifierDefinitionRequest.parse_obj({
|
174
|
+
"domain": obj.get("domain"),
|
175
|
+
"identifier_scope": obj.get("identifierScope"),
|
176
|
+
"identifier_type": obj.get("identifierType"),
|
177
|
+
"life_time": obj.get("lifeTime"),
|
178
|
+
"hierarchy_usage": obj.get("hierarchyUsage"),
|
179
|
+
"hierarchy_level": obj.get("hierarchyLevel"),
|
180
|
+
"display_name": obj.get("displayName"),
|
181
|
+
"description": obj.get("description"),
|
182
|
+
"properties": dict(
|
183
|
+
(_k, ModelProperty.from_dict(_v))
|
184
|
+
for _k, _v in obj.get("properties").items()
|
185
|
+
)
|
186
|
+
if obj.get("properties") is not None
|
187
|
+
else None
|
188
|
+
})
|
189
|
+
return _obj
|
@@ -0,0 +1,192 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
23
|
+
from lusid.models.model_property import ModelProperty
|
24
|
+
from lusid.models.version import Version
|
25
|
+
|
26
|
+
class IdentifierDefinition(BaseModel):
|
27
|
+
"""
|
28
|
+
IdentifierDefinition
|
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
|
+
domain: StrictStr = Field(..., description="The type of entity to which the identifier can be attached. Supported values are \"Instrument\", \"Person\", \"LegalEntity\"and \"CustomEntity\". The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, FundConfiguration, Fee, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation, Timeline, ClosedPeriod, AddressKeyDefinition, AmortisationRuleSet, AnalyticsSetInventory, AtomUnitResult, CleardownModule, ComplexMarketData, ComplianceRunSummary, ComplianceRule, ComplianceRunInfo, CorporateActionSource, CounterpartyAgreement, CustomEntityDefinition, DataType, Dialect, EventHandler, GeneralLedgerProfile, PostingModule, Quote, RecipeComposer, ReconciliationRunBreak, ReferenceList, RelationDefinition, ReturnBlockIndex, SRSDocument, SRSIndex, TransactionTemplate, TransactionTemplateScope, TransactionType, TransactionTypeConfig, TranslationScript, TaskDefinition, TaskInstance, Worker, StagingRuleSet, IdentifierDefinition")
|
32
|
+
identifier_scope: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="identifierScope", description="The scope that the identifier definition exists in.")
|
33
|
+
identifier_type: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="identifierType", description="What the identifier represents. Together with \"domain\" and \"identifierScope\" this uniquely identifies the identifier definition.")
|
34
|
+
life_time: StrictStr = Field(..., alias="lifeTime", description="Describes whether an identifier value is associated with an entity for all effective dates (“Perpetual”) or applies within a specified effective date range (“TimeVariant”). The available values are: Perpetual, TimeVariant")
|
35
|
+
hierarchy_usage: Optional[StrictStr] = Field(None, alias="hierarchyUsage", description="Nullable, defaults to \"MasterIdentifier\" if no value provided. \"MasterIdentifier\" (aka unique) An entity can have one value for this identifier definition on a given effective date. A value for this identifier definition can only be associated with one entity (in a given scope) on a given effective date. \"ParentIdentifier\" (aka non-unique) An entity can have one value for this identifier definition on a given effective date. A value for this identifier definition can be associated with many entities (in a given scope) on a given effective date.")
|
36
|
+
hierarchy_level: Optional[StrictStr] = Field(None, alias="hierarchyLevel", description="Optional metadata associated with the identifier definition.")
|
37
|
+
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="A display name for the identifier. E.g. Figi.")
|
38
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="An optional description for the identifier.")
|
39
|
+
properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the identifier definition.")
|
40
|
+
version: Optional[Version] = None
|
41
|
+
__properties = ["href", "domain", "identifierScope", "identifierType", "lifeTime", "hierarchyUsage", "hierarchyLevel", "displayName", "description", "properties", "version"]
|
42
|
+
|
43
|
+
@validator('domain')
|
44
|
+
def domain_validate_enum(cls, value):
|
45
|
+
"""Validates the enum"""
|
46
|
+
if value not in ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition'):
|
47
|
+
raise ValueError("must be one of enum values ('NotDefined', 'Transaction', 'Portfolio', 'Holding', 'ReferenceHolding', 'TransactionConfiguration', 'Instrument', 'CutLabelDefinition', 'Analytic', 'PortfolioGroup', 'Person', 'AccessMetadata', 'Order', 'UnitResult', 'MarketData', 'ConfigurationRecipe', 'Allocation', 'Calendar', 'LegalEntity', 'Placement', 'Execution', 'Block', 'Participation', 'Package', 'OrderInstruction', 'NextBestAction', 'CustomEntity', 'InstrumentEvent', 'Account', 'ChartOfAccounts', 'CustodianAccount', 'Abor', 'AborConfiguration', 'Fund', 'FundConfiguration', 'Fee', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation', 'Timeline', 'ClosedPeriod', 'AddressKeyDefinition', 'AmortisationRuleSet', 'AnalyticsSetInventory', 'AtomUnitResult', 'CleardownModule', 'ComplexMarketData', 'ComplianceRunSummary', 'ComplianceRule', 'ComplianceRunInfo', 'CorporateActionSource', 'CounterpartyAgreement', 'CustomEntityDefinition', 'DataType', 'Dialect', 'EventHandler', 'GeneralLedgerProfile', 'PostingModule', 'Quote', 'RecipeComposer', 'ReconciliationRunBreak', 'ReferenceList', 'RelationDefinition', 'ReturnBlockIndex', 'SRSDocument', 'SRSIndex', 'TransactionTemplate', 'TransactionTemplateScope', 'TransactionType', 'TransactionTypeConfig', 'TranslationScript', 'TaskDefinition', 'TaskInstance', 'Worker', 'StagingRuleSet', 'IdentifierDefinition')")
|
48
|
+
return value
|
49
|
+
|
50
|
+
@validator('identifier_scope')
|
51
|
+
def identifier_scope_validate_regular_expression(cls, value):
|
52
|
+
"""Validates the regular expression"""
|
53
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
54
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
55
|
+
return value
|
56
|
+
|
57
|
+
@validator('identifier_type')
|
58
|
+
def identifier_type_validate_regular_expression(cls, value):
|
59
|
+
"""Validates the regular expression"""
|
60
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
61
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
62
|
+
return value
|
63
|
+
|
64
|
+
@validator('life_time')
|
65
|
+
def life_time_validate_enum(cls, value):
|
66
|
+
"""Validates the enum"""
|
67
|
+
if value not in ('Perpetual', 'TimeVariant'):
|
68
|
+
raise ValueError("must be one of enum values ('Perpetual', 'TimeVariant')")
|
69
|
+
return value
|
70
|
+
|
71
|
+
@validator('display_name')
|
72
|
+
def display_name_validate_regular_expression(cls, value):
|
73
|
+
"""Validates the regular expression"""
|
74
|
+
if value is None:
|
75
|
+
return value
|
76
|
+
|
77
|
+
if not re.match(r"^[^\\<>&\"]+$", value):
|
78
|
+
raise ValueError(r"must validate the regular expression /^[^\\<>&\"]+$/")
|
79
|
+
return value
|
80
|
+
|
81
|
+
@validator('description')
|
82
|
+
def description_validate_regular_expression(cls, value):
|
83
|
+
"""Validates the regular expression"""
|
84
|
+
if value is None:
|
85
|
+
return value
|
86
|
+
|
87
|
+
if not re.match(r"^[\s\S]*$", value):
|
88
|
+
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
89
|
+
return value
|
90
|
+
|
91
|
+
class Config:
|
92
|
+
"""Pydantic configuration"""
|
93
|
+
allow_population_by_field_name = True
|
94
|
+
validate_assignment = True
|
95
|
+
|
96
|
+
def __str__(self):
|
97
|
+
"""For `print` and `pprint`"""
|
98
|
+
return pprint.pformat(self.dict(by_alias=False))
|
99
|
+
|
100
|
+
def __repr__(self):
|
101
|
+
"""For `print` and `pprint`"""
|
102
|
+
return self.to_str()
|
103
|
+
|
104
|
+
def to_str(self) -> str:
|
105
|
+
"""Returns the string representation of the model using alias"""
|
106
|
+
return pprint.pformat(self.dict(by_alias=True))
|
107
|
+
|
108
|
+
def to_json(self) -> str:
|
109
|
+
"""Returns the JSON representation of the model using alias"""
|
110
|
+
return json.dumps(self.to_dict())
|
111
|
+
|
112
|
+
@classmethod
|
113
|
+
def from_json(cls, json_str: str) -> IdentifierDefinition:
|
114
|
+
"""Create an instance of IdentifierDefinition from a JSON string"""
|
115
|
+
return cls.from_dict(json.loads(json_str))
|
116
|
+
|
117
|
+
def to_dict(self):
|
118
|
+
"""Returns the dictionary representation of the model using alias"""
|
119
|
+
_dict = self.dict(by_alias=True,
|
120
|
+
exclude={
|
121
|
+
},
|
122
|
+
exclude_none=True)
|
123
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
124
|
+
_field_dict = {}
|
125
|
+
if self.properties:
|
126
|
+
for _key in self.properties:
|
127
|
+
if self.properties[_key]:
|
128
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
129
|
+
_dict['properties'] = _field_dict
|
130
|
+
# override the default output from pydantic by calling `to_dict()` of version
|
131
|
+
if self.version:
|
132
|
+
_dict['version'] = self.version.to_dict()
|
133
|
+
# set to None if href (nullable) is None
|
134
|
+
# and __fields_set__ contains the field
|
135
|
+
if self.href is None and "href" in self.__fields_set__:
|
136
|
+
_dict['href'] = None
|
137
|
+
|
138
|
+
# set to None if hierarchy_usage (nullable) is None
|
139
|
+
# and __fields_set__ contains the field
|
140
|
+
if self.hierarchy_usage is None and "hierarchy_usage" in self.__fields_set__:
|
141
|
+
_dict['hierarchyUsage'] = None
|
142
|
+
|
143
|
+
# set to None if hierarchy_level (nullable) is None
|
144
|
+
# and __fields_set__ contains the field
|
145
|
+
if self.hierarchy_level is None and "hierarchy_level" in self.__fields_set__:
|
146
|
+
_dict['hierarchyLevel'] = None
|
147
|
+
|
148
|
+
# set to None if display_name (nullable) is None
|
149
|
+
# and __fields_set__ contains the field
|
150
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
151
|
+
_dict['displayName'] = None
|
152
|
+
|
153
|
+
# set to None if description (nullable) is None
|
154
|
+
# and __fields_set__ contains the field
|
155
|
+
if self.description is None and "description" in self.__fields_set__:
|
156
|
+
_dict['description'] = None
|
157
|
+
|
158
|
+
# set to None if properties (nullable) is None
|
159
|
+
# and __fields_set__ contains the field
|
160
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
161
|
+
_dict['properties'] = None
|
162
|
+
|
163
|
+
return _dict
|
164
|
+
|
165
|
+
@classmethod
|
166
|
+
def from_dict(cls, obj: dict) -> IdentifierDefinition:
|
167
|
+
"""Create an instance of IdentifierDefinition from a dict"""
|
168
|
+
if obj is None:
|
169
|
+
return None
|
170
|
+
|
171
|
+
if not isinstance(obj, dict):
|
172
|
+
return IdentifierDefinition.parse_obj(obj)
|
173
|
+
|
174
|
+
_obj = IdentifierDefinition.parse_obj({
|
175
|
+
"href": obj.get("href"),
|
176
|
+
"domain": obj.get("domain"),
|
177
|
+
"identifier_scope": obj.get("identifierScope"),
|
178
|
+
"identifier_type": obj.get("identifierType"),
|
179
|
+
"life_time": obj.get("lifeTime"),
|
180
|
+
"hierarchy_usage": obj.get("hierarchyUsage"),
|
181
|
+
"hierarchy_level": obj.get("hierarchyLevel"),
|
182
|
+
"display_name": obj.get("displayName"),
|
183
|
+
"description": obj.get("description"),
|
184
|
+
"properties": dict(
|
185
|
+
(_k, ModelProperty.from_dict(_v))
|
186
|
+
for _k, _v in obj.get("properties").items()
|
187
|
+
)
|
188
|
+
if obj.get("properties") is not None
|
189
|
+
else None,
|
190
|
+
"version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None
|
191
|
+
})
|
192
|
+
return _obj
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.identifier_definition import IdentifierDefinition
|
24
|
+
from lusid.models.link import Link
|
25
|
+
|
26
|
+
class PagedResourceListOfIdentifierDefinition(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfIdentifierDefinition
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(IdentifierDefinition) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def __str__(self):
|
43
|
+
"""For `print` and `pprint`"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=False))
|
45
|
+
|
46
|
+
def __repr__(self):
|
47
|
+
"""For `print` and `pprint`"""
|
48
|
+
return self.to_str()
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfIdentifierDefinition:
|
60
|
+
"""Create an instance of PagedResourceListOfIdentifierDefinition from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self):
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
65
|
+
_dict = self.dict(by_alias=True,
|
66
|
+
exclude={
|
67
|
+
},
|
68
|
+
exclude_none=True)
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
70
|
+
_items = []
|
71
|
+
if self.values:
|
72
|
+
for _item in self.values:
|
73
|
+
if _item:
|
74
|
+
_items.append(_item.to_dict())
|
75
|
+
_dict['values'] = _items
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
77
|
+
_items = []
|
78
|
+
if self.links:
|
79
|
+
for _item in self.links:
|
80
|
+
if _item:
|
81
|
+
_items.append(_item.to_dict())
|
82
|
+
_dict['links'] = _items
|
83
|
+
# set to None if next_page (nullable) is None
|
84
|
+
# and __fields_set__ contains the field
|
85
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
86
|
+
_dict['nextPage'] = None
|
87
|
+
|
88
|
+
# set to None if previous_page (nullable) is None
|
89
|
+
# and __fields_set__ contains the field
|
90
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
91
|
+
_dict['previousPage'] = None
|
92
|
+
|
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 links (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.links is None and "links" in self.__fields_set__:
|
101
|
+
_dict['links'] = None
|
102
|
+
|
103
|
+
return _dict
|
104
|
+
|
105
|
+
@classmethod
|
106
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfIdentifierDefinition:
|
107
|
+
"""Create an instance of PagedResourceListOfIdentifierDefinition from a dict"""
|
108
|
+
if obj is None:
|
109
|
+
return None
|
110
|
+
|
111
|
+
if not isinstance(obj, dict):
|
112
|
+
return PagedResourceListOfIdentifierDefinition.parse_obj(obj)
|
113
|
+
|
114
|
+
_obj = PagedResourceListOfIdentifierDefinition.parse_obj({
|
115
|
+
"next_page": obj.get("nextPage"),
|
116
|
+
"previous_page": obj.get("previousPage"),
|
117
|
+
"values": [IdentifierDefinition.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
118
|
+
"href": obj.get("href"),
|
119
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
120
|
+
})
|
121
|
+
return _obj
|