lusid-sdk 2.0.461__py3-none-any.whl → 2.0.466__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.
- lusid/__init__.py +16 -0
- lusid/api/__init__.py +2 -0
- lusid/api/staging_rule_set_api.py +885 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +14 -0
- lusid/models/create_derived_property_definition_request.py +3 -3
- lusid/models/create_property_definition_request.py +3 -3
- lusid/models/create_staging_rule_set_request.py +91 -0
- lusid/models/paged_resource_list_of_staging_rule_set.py +113 -0
- lusid/models/property_definition.py +3 -3
- lusid/models/property_definition_search_result.py +3 -3
- lusid/models/property_domain.py +1 -0
- lusid/models/staging_rule.py +90 -0
- lusid/models/staging_rule_approval_criteria.py +81 -0
- lusid/models/staging_rule_match_criteria.py +95 -0
- lusid/models/staging_rule_set.py +103 -0
- lusid/models/update_staging_rule_set_request.py +91 -0
- {lusid_sdk-2.0.461.dist-info → lusid_sdk-2.0.466.dist-info}/METADATA +15 -3
- {lusid_sdk-2.0.461.dist-info → lusid_sdk-2.0.466.dist-info}/RECORD +20 -12
- {lusid_sdk-2.0.461.dist-info → lusid_sdk-2.0.466.dist-info}/WHEEL +0 -0
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.
|
|
376
|
+
"Version of the API: 0.11.6413\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
|
@@ -199,6 +199,7 @@ from lusid.models.create_relation_request import CreateRelationRequest
|
|
|
199
199
|
from lusid.models.create_relationship_definition_request import CreateRelationshipDefinitionRequest
|
|
200
200
|
from lusid.models.create_relationship_request import CreateRelationshipRequest
|
|
201
201
|
from lusid.models.create_sequence_request import CreateSequenceRequest
|
|
202
|
+
from lusid.models.create_staging_rule_set_request import CreateStagingRuleSetRequest
|
|
202
203
|
from lusid.models.create_tax_rule_set_request import CreateTaxRuleSetRequest
|
|
203
204
|
from lusid.models.create_trade_tickets_response import CreateTradeTicketsResponse
|
|
204
205
|
from lusid.models.create_transaction_portfolio_request import CreateTransactionPortfolioRequest
|
|
@@ -551,6 +552,7 @@ from lusid.models.paged_resource_list_of_reconciliation import PagedResourceList
|
|
|
551
552
|
from lusid.models.paged_resource_list_of_reference_list_response import PagedResourceListOfReferenceListResponse
|
|
552
553
|
from lusid.models.paged_resource_list_of_relationship_definition import PagedResourceListOfRelationshipDefinition
|
|
553
554
|
from lusid.models.paged_resource_list_of_sequence_definition import PagedResourceListOfSequenceDefinition
|
|
555
|
+
from lusid.models.paged_resource_list_of_staging_rule_set import PagedResourceListOfStagingRuleSet
|
|
554
556
|
from lusid.models.paged_resource_list_of_transaction_template import PagedResourceListOfTransactionTemplate
|
|
555
557
|
from lusid.models.paged_resource_list_of_transaction_template_specification import PagedResourceListOfTransactionTemplateSpecification
|
|
556
558
|
from lusid.models.paged_resource_list_of_translation_script_id import PagedResourceListOfTranslationScriptId
|
|
@@ -773,6 +775,10 @@ from lusid.models.sides_definition_request import SidesDefinitionRequest
|
|
|
773
775
|
from lusid.models.simple_cash_flow_loan import SimpleCashFlowLoan
|
|
774
776
|
from lusid.models.simple_instrument import SimpleInstrument
|
|
775
777
|
from lusid.models.sort_order import SortOrder
|
|
778
|
+
from lusid.models.staging_rule import StagingRule
|
|
779
|
+
from lusid.models.staging_rule_approval_criteria import StagingRuleApprovalCriteria
|
|
780
|
+
from lusid.models.staging_rule_match_criteria import StagingRuleMatchCriteria
|
|
781
|
+
from lusid.models.staging_rule_set import StagingRuleSet
|
|
776
782
|
from lusid.models.step_schedule import StepSchedule
|
|
777
783
|
from lusid.models.stock_split_event import StockSplitEvent
|
|
778
784
|
from lusid.models.stream import Stream
|
|
@@ -858,6 +864,7 @@ from lusid.models.update_portfolio_request import UpdatePortfolioRequest
|
|
|
858
864
|
from lusid.models.update_property_definition_request import UpdatePropertyDefinitionRequest
|
|
859
865
|
from lusid.models.update_reconciliation_request import UpdateReconciliationRequest
|
|
860
866
|
from lusid.models.update_relationship_definition_request import UpdateRelationshipDefinitionRequest
|
|
867
|
+
from lusid.models.update_staging_rule_set_request import UpdateStagingRuleSetRequest
|
|
861
868
|
from lusid.models.update_tax_rule_set_request import UpdateTaxRuleSetRequest
|
|
862
869
|
from lusid.models.update_unit_request import UpdateUnitRequest
|
|
863
870
|
from lusid.models.upsert_cds_flow_conventions_request import UpsertCdsFlowConventionsRequest
|
|
@@ -1117,6 +1124,7 @@ __all__ = [
|
|
|
1117
1124
|
"CreateRelationshipDefinitionRequest",
|
|
1118
1125
|
"CreateRelationshipRequest",
|
|
1119
1126
|
"CreateSequenceRequest",
|
|
1127
|
+
"CreateStagingRuleSetRequest",
|
|
1120
1128
|
"CreateTaxRuleSetRequest",
|
|
1121
1129
|
"CreateTradeTicketsResponse",
|
|
1122
1130
|
"CreateTransactionPortfolioRequest",
|
|
@@ -1469,6 +1477,7 @@ __all__ = [
|
|
|
1469
1477
|
"PagedResourceListOfReferenceListResponse",
|
|
1470
1478
|
"PagedResourceListOfRelationshipDefinition",
|
|
1471
1479
|
"PagedResourceListOfSequenceDefinition",
|
|
1480
|
+
"PagedResourceListOfStagingRuleSet",
|
|
1472
1481
|
"PagedResourceListOfTransactionTemplate",
|
|
1473
1482
|
"PagedResourceListOfTransactionTemplateSpecification",
|
|
1474
1483
|
"PagedResourceListOfTranslationScriptId",
|
|
@@ -1691,6 +1700,10 @@ __all__ = [
|
|
|
1691
1700
|
"SimpleCashFlowLoan",
|
|
1692
1701
|
"SimpleInstrument",
|
|
1693
1702
|
"SortOrder",
|
|
1703
|
+
"StagingRule",
|
|
1704
|
+
"StagingRuleApprovalCriteria",
|
|
1705
|
+
"StagingRuleMatchCriteria",
|
|
1706
|
+
"StagingRuleSet",
|
|
1694
1707
|
"StepSchedule",
|
|
1695
1708
|
"StockSplitEvent",
|
|
1696
1709
|
"Stream",
|
|
@@ -1776,6 +1789,7 @@ __all__ = [
|
|
|
1776
1789
|
"UpdatePropertyDefinitionRequest",
|
|
1777
1790
|
"UpdateReconciliationRequest",
|
|
1778
1791
|
"UpdateRelationshipDefinitionRequest",
|
|
1792
|
+
"UpdateStagingRuleSetRequest",
|
|
1779
1793
|
"UpdateTaxRuleSetRequest",
|
|
1780
1794
|
"UpdateUnitRequest",
|
|
1781
1795
|
"UpsertCdsFlowConventionsRequest",
|
|
@@ -26,7 +26,7 @@ class CreateDerivedPropertyDefinitionRequest(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
CreateDerivedPropertyDefinitionRequest
|
|
28
28
|
"""
|
|
29
|
-
domain: StrictStr = Field(..., description="The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg")
|
|
29
|
+
domain: StrictStr = Field(..., description="The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
30
30
|
scope: StrictStr = Field(..., description="The scope that the property exists in.")
|
|
31
31
|
code: StrictStr = Field(..., description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
|
32
32
|
display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="The display name of the property.")
|
|
@@ -38,8 +38,8 @@ class CreateDerivedPropertyDefinitionRequest(BaseModel):
|
|
|
38
38
|
@validator('domain')
|
|
39
39
|
def domain_validate_enum(cls, value):
|
|
40
40
|
"""Validates the enum"""
|
|
41
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg'):
|
|
42
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg')")
|
|
41
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
42
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
43
43
|
return value
|
|
44
44
|
|
|
45
45
|
class Config:
|
|
@@ -26,7 +26,7 @@ class CreatePropertyDefinitionRequest(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
CreatePropertyDefinitionRequest
|
|
28
28
|
"""
|
|
29
|
-
domain: StrictStr = Field(..., description="The domain that the property exists in. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg")
|
|
29
|
+
domain: StrictStr = Field(..., description="The domain that the property exists in. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
30
30
|
scope: StrictStr = Field(..., description="The scope that the property exists in.")
|
|
31
31
|
code: StrictStr = Field(..., description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
|
32
32
|
value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
|
|
@@ -41,8 +41,8 @@ class CreatePropertyDefinitionRequest(BaseModel):
|
|
|
41
41
|
@validator('domain')
|
|
42
42
|
def domain_validate_enum(cls, value):
|
|
43
43
|
"""Validates the enum"""
|
|
44
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg'):
|
|
45
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg')")
|
|
44
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
45
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
46
46
|
return value
|
|
47
47
|
|
|
48
48
|
@validator('life_time')
|
|
@@ -0,0 +1,91 @@
|
|
|
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 import BaseModel, Field, conlist, constr
|
|
23
|
+
from lusid.models.staging_rule import StagingRule
|
|
24
|
+
|
|
25
|
+
class CreateStagingRuleSetRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CreateStagingRuleSetRequest
|
|
28
|
+
"""
|
|
29
|
+
display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the staging rule set.")
|
|
30
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the staging rule set.")
|
|
31
|
+
rules: conlist(StagingRule) = Field(..., description="The list of staging rules that apply to a specific entity type.")
|
|
32
|
+
__properties = ["displayName", "description", "rules"]
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
"""Pydantic configuration"""
|
|
36
|
+
allow_population_by_field_name = True
|
|
37
|
+
validate_assignment = True
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> CreateStagingRuleSetRequest:
|
|
49
|
+
"""Create an instance of CreateStagingRuleSetRequest from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self):
|
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
54
|
+
_dict = self.dict(by_alias=True,
|
|
55
|
+
exclude={
|
|
56
|
+
},
|
|
57
|
+
exclude_none=True)
|
|
58
|
+
# override the default output from pydantic by calling `to_dict()` of each item in rules (list)
|
|
59
|
+
_items = []
|
|
60
|
+
if self.rules:
|
|
61
|
+
for _item in self.rules:
|
|
62
|
+
if _item:
|
|
63
|
+
_items.append(_item.to_dict())
|
|
64
|
+
_dict['rules'] = _items
|
|
65
|
+
# set to None if display_name (nullable) is None
|
|
66
|
+
# and __fields_set__ contains the field
|
|
67
|
+
if self.display_name is None and "display_name" in self.__fields_set__:
|
|
68
|
+
_dict['displayName'] = None
|
|
69
|
+
|
|
70
|
+
# set to None if description (nullable) is None
|
|
71
|
+
# and __fields_set__ contains the field
|
|
72
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
73
|
+
_dict['description'] = None
|
|
74
|
+
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: dict) -> CreateStagingRuleSetRequest:
|
|
79
|
+
"""Create an instance of CreateStagingRuleSetRequest from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return CreateStagingRuleSetRequest.parse_obj(obj)
|
|
85
|
+
|
|
86
|
+
_obj = CreateStagingRuleSetRequest.parse_obj({
|
|
87
|
+
"display_name": obj.get("displayName"),
|
|
88
|
+
"description": obj.get("description"),
|
|
89
|
+
"rules": [StagingRule.from_dict(_item) for _item in obj.get("rules")] if obj.get("rules") is not None else None
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
@@ -0,0 +1,113 @@
|
|
|
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 import BaseModel, Field, StrictStr, conlist
|
|
23
|
+
from lusid.models.link import Link
|
|
24
|
+
from lusid.models.staging_rule_set import StagingRuleSet
|
|
25
|
+
|
|
26
|
+
class PagedResourceListOfStagingRuleSet(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PagedResourceListOfStagingRuleSet
|
|
29
|
+
"""
|
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
|
32
|
+
values: conlist(StagingRuleSet) = 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 to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfStagingRuleSet:
|
|
52
|
+
"""Create an instance of PagedResourceListOfStagingRuleSet from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self):
|
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
57
|
+
_dict = self.dict(by_alias=True,
|
|
58
|
+
exclude={
|
|
59
|
+
},
|
|
60
|
+
exclude_none=True)
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
|
62
|
+
_items = []
|
|
63
|
+
if self.values:
|
|
64
|
+
for _item in self.values:
|
|
65
|
+
if _item:
|
|
66
|
+
_items.append(_item.to_dict())
|
|
67
|
+
_dict['values'] = _items
|
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
69
|
+
_items = []
|
|
70
|
+
if self.links:
|
|
71
|
+
for _item in self.links:
|
|
72
|
+
if _item:
|
|
73
|
+
_items.append(_item.to_dict())
|
|
74
|
+
_dict['links'] = _items
|
|
75
|
+
# set to None if next_page (nullable) is None
|
|
76
|
+
# and __fields_set__ contains the field
|
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
|
78
|
+
_dict['nextPage'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if previous_page (nullable) is None
|
|
81
|
+
# and __fields_set__ contains the field
|
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
|
83
|
+
_dict['previousPage'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if href (nullable) is None
|
|
86
|
+
# and __fields_set__ contains the field
|
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
|
88
|
+
_dict['href'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if links (nullable) is None
|
|
91
|
+
# and __fields_set__ contains the field
|
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
93
|
+
_dict['links'] = None
|
|
94
|
+
|
|
95
|
+
return _dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfStagingRuleSet:
|
|
99
|
+
"""Create an instance of PagedResourceListOfStagingRuleSet from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return PagedResourceListOfStagingRuleSet.parse_obj(obj)
|
|
105
|
+
|
|
106
|
+
_obj = PagedResourceListOfStagingRuleSet.parse_obj({
|
|
107
|
+
"next_page": obj.get("nextPage"),
|
|
108
|
+
"previous_page": obj.get("previousPage"),
|
|
109
|
+
"values": [StagingRuleSet.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
|
110
|
+
"href": obj.get("href"),
|
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
|
@@ -36,7 +36,7 @@ class PropertyDefinition(BaseModel):
|
|
|
36
36
|
data_type_id: Optional[ResourceId] = Field(None, alias="dataTypeId")
|
|
37
37
|
type: Optional[StrictStr] = Field(None, description="The type of the property. The available values are: Label, Metric, Information")
|
|
38
38
|
unit_schema: Optional[StrictStr] = Field(None, alias="unitSchema", description="The units that can be associated with the property's values. This is defined by the property's data type. The available values are: NoUnits, Basic, Iso4217Currency")
|
|
39
|
-
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg")
|
|
39
|
+
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
40
40
|
scope: Optional[StrictStr] = Field(None, description="The scope that the property exists in.")
|
|
41
41
|
code: Optional[StrictStr] = Field(None, description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
|
42
42
|
value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
|
|
@@ -87,8 +87,8 @@ class PropertyDefinition(BaseModel):
|
|
|
87
87
|
if value is None:
|
|
88
88
|
return value
|
|
89
89
|
|
|
90
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg'):
|
|
91
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg')")
|
|
90
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
91
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
92
92
|
return value
|
|
93
93
|
|
|
94
94
|
@validator('life_time')
|
|
@@ -34,7 +34,7 @@ class PropertyDefinitionSearchResult(BaseModel):
|
|
|
34
34
|
data_type_id: Optional[ResourceId] = Field(None, alias="dataTypeId")
|
|
35
35
|
type: Optional[StrictStr] = Field(None, description="The type of the property. The available values are: Label, Metric, Information")
|
|
36
36
|
unit_schema: Optional[StrictStr] = Field(None, alias="unitSchema", description="The units that can be associated with the property's values. This is defined by the property's data type. The available values are: NoUnits, Basic, Iso4217Currency")
|
|
37
|
-
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg")
|
|
37
|
+
domain: Optional[StrictStr] = Field(None, description="The domain that the property exists in. 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, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg, DerivedValuation")
|
|
38
38
|
scope: Optional[StrictStr] = Field(None, description="The scope that the property exists in.")
|
|
39
39
|
code: Optional[StrictStr] = Field(None, description="The code of the property. Together with the domain and scope this uniquely identifies the property.")
|
|
40
40
|
value_required: Optional[StrictBool] = Field(None, alias="valueRequired", description="This field is not implemented and should be disregarded.")
|
|
@@ -82,8 +82,8 @@ class PropertyDefinitionSearchResult(BaseModel):
|
|
|
82
82
|
if value is None:
|
|
83
83
|
return value
|
|
84
84
|
|
|
85
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg'):
|
|
86
|
-
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg')")
|
|
85
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation'):
|
|
86
|
+
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', 'Reconciliation', 'PropertyDefinition', 'Compliance', 'DiaryEntry', 'Leg', 'DerivedValuation')")
|
|
87
87
|
return value
|
|
88
88
|
|
|
89
89
|
@validator('life_time')
|
lusid/models/property_domain.py
CHANGED
|
@@ -0,0 +1,90 @@
|
|
|
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 import BaseModel, Field, constr
|
|
23
|
+
from lusid.models.staging_rule_approval_criteria import StagingRuleApprovalCriteria
|
|
24
|
+
from lusid.models.staging_rule_match_criteria import StagingRuleMatchCriteria
|
|
25
|
+
|
|
26
|
+
class StagingRule(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
StagingRule
|
|
29
|
+
"""
|
|
30
|
+
rule_id: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="ruleId", description="The ID of the staging rule.")
|
|
31
|
+
description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the staging rule.")
|
|
32
|
+
status: constr(strict=True, min_length=1) = Field(..., description="Whether the rule is 'Active' or 'Inactive'.")
|
|
33
|
+
match_criteria: StagingRuleMatchCriteria = Field(..., alias="matchCriteria")
|
|
34
|
+
approval_criteria: StagingRuleApprovalCriteria = Field(..., alias="approvalCriteria")
|
|
35
|
+
__properties = ["ruleId", "description", "status", "matchCriteria", "approvalCriteria"]
|
|
36
|
+
|
|
37
|
+
class Config:
|
|
38
|
+
"""Pydantic configuration"""
|
|
39
|
+
allow_population_by_field_name = True
|
|
40
|
+
validate_assignment = True
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> StagingRule:
|
|
52
|
+
"""Create an instance of StagingRule from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self):
|
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
57
|
+
_dict = self.dict(by_alias=True,
|
|
58
|
+
exclude={
|
|
59
|
+
},
|
|
60
|
+
exclude_none=True)
|
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of match_criteria
|
|
62
|
+
if self.match_criteria:
|
|
63
|
+
_dict['matchCriteria'] = self.match_criteria.to_dict()
|
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of approval_criteria
|
|
65
|
+
if self.approval_criteria:
|
|
66
|
+
_dict['approvalCriteria'] = self.approval_criteria.to_dict()
|
|
67
|
+
# set to None if description (nullable) is None
|
|
68
|
+
# and __fields_set__ contains the field
|
|
69
|
+
if self.description is None and "description" in self.__fields_set__:
|
|
70
|
+
_dict['description'] = None
|
|
71
|
+
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: dict) -> StagingRule:
|
|
76
|
+
"""Create an instance of StagingRule from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return StagingRule.parse_obj(obj)
|
|
82
|
+
|
|
83
|
+
_obj = StagingRule.parse_obj({
|
|
84
|
+
"rule_id": obj.get("ruleId"),
|
|
85
|
+
"description": obj.get("description"),
|
|
86
|
+
"status": obj.get("status"),
|
|
87
|
+
"match_criteria": StagingRuleMatchCriteria.from_dict(obj.get("matchCriteria")) if obj.get("matchCriteria") is not None else None,
|
|
88
|
+
"approval_criteria": StagingRuleApprovalCriteria.from_dict(obj.get("approvalCriteria")) if obj.get("approvalCriteria") is not None else None
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
@@ -0,0 +1,81 @@
|
|
|
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 import BaseModel, Field, StrictInt, constr
|
|
23
|
+
|
|
24
|
+
class StagingRuleApprovalCriteria(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
StagingRuleApprovalCriteria
|
|
27
|
+
"""
|
|
28
|
+
required_approvals: Optional[StrictInt] = Field(None, alias="requiredApprovals")
|
|
29
|
+
deciding_user: Optional[constr(strict=True, max_length=16384, min_length=0)] = Field(None, alias="decidingUser")
|
|
30
|
+
__properties = ["requiredApprovals", "decidingUser"]
|
|
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) -> StagingRuleApprovalCriteria:
|
|
47
|
+
"""Create an instance of StagingRuleApprovalCriteria 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
|
+
# set to None if required_approvals (nullable) is None
|
|
57
|
+
# and __fields_set__ contains the field
|
|
58
|
+
if self.required_approvals is None and "required_approvals" in self.__fields_set__:
|
|
59
|
+
_dict['requiredApprovals'] = None
|
|
60
|
+
|
|
61
|
+
# set to None if deciding_user (nullable) is None
|
|
62
|
+
# and __fields_set__ contains the field
|
|
63
|
+
if self.deciding_user is None and "deciding_user" in self.__fields_set__:
|
|
64
|
+
_dict['decidingUser'] = None
|
|
65
|
+
|
|
66
|
+
return _dict
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls, obj: dict) -> StagingRuleApprovalCriteria:
|
|
70
|
+
"""Create an instance of StagingRuleApprovalCriteria from a dict"""
|
|
71
|
+
if obj is None:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
if not isinstance(obj, dict):
|
|
75
|
+
return StagingRuleApprovalCriteria.parse_obj(obj)
|
|
76
|
+
|
|
77
|
+
_obj = StagingRuleApprovalCriteria.parse_obj({
|
|
78
|
+
"required_approvals": obj.get("requiredApprovals"),
|
|
79
|
+
"deciding_user": obj.get("decidingUser")
|
|
80
|
+
})
|
|
81
|
+
return _obj
|