lusid-sdk 2.1.222__py3-none-any.whl → 2.1.254__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/entities_api.py +360 -0
- lusid/api/fee_types_api.py +143 -0
- lusid/api/funds_api.py +8 -16
- lusid/api/order_management_api.py +161 -1
- lusid/configuration.py +1 -1
- lusid/extensions/__init__.py +1 -1
- lusid/models/__init__.py +16 -0
- lusid/models/address_key_compliance_parameter.py +3 -3
- lusid/models/address_key_list_compliance_parameter.py +3 -3
- lusid/models/basket.py +3 -3
- lusid/models/bond.py +3 -3
- lusid/models/bool_compliance_parameter.py +3 -3
- lusid/models/bool_list_compliance_parameter.py +3 -3
- lusid/models/branch_step.py +3 -3
- lusid/models/branch_step_request.py +10 -3
- lusid/models/cap_floor.py +3 -3
- lusid/models/cash_perpetual.py +3 -3
- lusid/models/cds_index.py +3 -3
- lusid/models/check_step.py +3 -3
- lusid/models/check_step_request.py +10 -3
- lusid/models/complex_bond.py +3 -3
- lusid/models/compliance_parameter.py +6 -5
- lusid/models/compliance_parameter_type.py +1 -0
- lusid/models/compliance_step.py +6 -5
- lusid/models/compliance_step_request.py +7 -6
- lusid/models/compliance_step_type.py +1 -0
- lusid/models/compliance_step_type_request.py +1 -0
- lusid/models/contract_for_difference.py +3 -3
- lusid/models/credit_default_swap.py +3 -3
- lusid/models/date_time_compliance_parameter.py +3 -3
- lusid/models/date_time_list_compliance_parameter.py +3 -3
- lusid/models/decimal_compliance_parameter.py +3 -3
- lusid/models/decimal_list_compliance_parameter.py +3 -3
- lusid/models/dependency_source_filter.py +9 -2
- lusid/models/equity.py +3 -3
- lusid/models/equity_option.py +3 -3
- lusid/models/equity_swap.py +3 -3
- lusid/models/exchange_traded_option.py +3 -3
- lusid/models/exotic_instrument.py +3 -3
- lusid/models/fee_accrual.py +32 -14
- lusid/models/fee_request.py +10 -1
- lusid/models/fee_transaction_template_specification.py +79 -0
- lusid/models/filter_predicate_compliance_parameter.py +3 -3
- lusid/models/filter_step.py +3 -3
- lusid/models/filter_step_request.py +10 -3
- lusid/models/fixed_leg.py +3 -3
- lusid/models/flexible_loan.py +3 -3
- lusid/models/floating_leg.py +3 -3
- lusid/models/forward_rate_agreement.py +3 -3
- lusid/models/fund_share_class.py +3 -3
- lusid/models/funding_leg.py +3 -3
- lusid/models/future.py +3 -3
- lusid/models/fx_forward.py +3 -3
- lusid/models/fx_option.py +3 -3
- lusid/models/fx_swap.py +3 -3
- lusid/models/group_by_selector_compliance_parameter.py +3 -3
- lusid/models/group_by_step.py +3 -3
- lusid/models/group_by_step_request.py +10 -3
- lusid/models/group_calculation_compliance_parameter.py +91 -0
- lusid/models/group_filter_predicate_compliance_parameter.py +3 -3
- lusid/models/group_filter_step.py +3 -3
- lusid/models/group_filter_step_request.py +10 -3
- lusid/models/inflation_leg.py +3 -3
- lusid/models/inflation_linked_bond.py +3 -3
- lusid/models/inflation_swap.py +3 -3
- lusid/models/instrument.py +7 -1
- lusid/models/instrument_entity.py +146 -0
- lusid/models/instrument_leg.py +3 -3
- lusid/models/instrument_list_compliance_parameter.py +3 -3
- lusid/models/instrument_type.py +2 -0
- lusid/models/interest_rate_swap.py +3 -3
- lusid/models/interest_rate_swaption.py +3 -3
- lusid/models/intermediate_compliance_step.py +3 -3
- lusid/models/intermediate_compliance_step_request.py +10 -3
- lusid/models/lusid_instrument.py +3 -3
- lusid/models/percent_check_step.py +110 -0
- lusid/models/percent_check_step_request.py +98 -0
- lusid/models/placement_update_request.py +116 -0
- lusid/models/portfolio_group_id_compliance_parameter.py +3 -3
- lusid/models/portfolio_group_id_list_compliance_parameter.py +3 -3
- lusid/models/portfolio_id_compliance_parameter.py +3 -3
- lusid/models/portfolio_id_list_compliance_parameter.py +3 -3
- lusid/models/property_definition_entity.py +146 -0
- lusid/models/property_key_compliance_parameter.py +3 -3
- lusid/models/property_key_list_compliance_parameter.py +3 -3
- lusid/models/property_list_compliance_parameter.py +3 -3
- lusid/models/recombine_step.py +3 -3
- lusid/models/reference_instrument.py +3 -3
- lusid/models/repo.py +3 -3
- lusid/models/simple_cash_flow_loan.py +3 -3
- lusid/models/simple_instrument.py +3 -3
- lusid/models/string_compliance_parameter.py +3 -3
- lusid/models/string_list_compliance_parameter.py +3 -3
- lusid/models/term_deposit.py +3 -3
- lusid/models/total_return_swap.py +3 -3
- lusid/models/transaction_type_calculation.py +11 -14
- lusid/models/transaction_type_movement.py +19 -2
- lusid/models/update_placements_response.py +153 -0
- lusid/models/upsert_instruments_response.py +20 -1
- {lusid_sdk-2.1.222.dist-info → lusid_sdk-2.1.254.dist-info}/METADATA +16 -4
- {lusid_sdk-2.1.222.dist-info → lusid_sdk-2.1.254.dist-info}/RECORD +103 -95
- {lusid_sdk-2.1.222.dist-info → lusid_sdk-2.1.254.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist, constr
|
|
23
|
+
from lusid.models.instrument import Instrument
|
|
24
|
+
from lusid.models.link import Link
|
|
25
|
+
|
|
26
|
+
class InstrumentEntity(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A list of instruments. # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
href: StrictStr = Field(..., description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
|
31
|
+
entity_unique_id: constr(strict=True, min_length=1) = Field(..., alias="entityUniqueId", description="The unique id of the entity.")
|
|
32
|
+
as_at_version_number: Optional[StrictInt] = Field(None, alias="asAtVersionNumber", description="The integer version number for the entity (the entity was created at version 1)")
|
|
33
|
+
status: constr(strict=True, min_length=1) = Field(..., description="The status of the entity at the current time.")
|
|
34
|
+
as_at_deleted: Optional[datetime] = Field(None, alias="asAtDeleted", description="The asAt datetime at which the entity was deleted.")
|
|
35
|
+
user_id_deleted: Optional[StrictStr] = Field(None, alias="userIdDeleted", description="The unique id of the user who deleted the entity.")
|
|
36
|
+
request_id_deleted: Optional[StrictStr] = Field(None, alias="requestIdDeleted", description="The unique request id of the command that deleted the entity.")
|
|
37
|
+
effective_at_created: Optional[datetime] = Field(None, alias="effectiveAtCreated", description="The EffectiveAt this Entity is created, if entity does not currently exist in EffectiveAt.")
|
|
38
|
+
prevailing_instrument: Optional[Instrument] = Field(None, alias="prevailingInstrument")
|
|
39
|
+
deleted_instrument: Optional[Instrument] = Field(None, alias="deletedInstrument")
|
|
40
|
+
previewed_status: Optional[StrictStr] = Field(None, alias="previewedStatus", description="The status of the previewed entity.")
|
|
41
|
+
previewed_instrument: Optional[Instrument] = Field(None, alias="previewedInstrument")
|
|
42
|
+
links: Optional[conlist(Link)] = None
|
|
43
|
+
__properties = ["href", "entityUniqueId", "asAtVersionNumber", "status", "asAtDeleted", "userIdDeleted", "requestIdDeleted", "effectiveAtCreated", "prevailingInstrument", "deletedInstrument", "previewedStatus", "previewedInstrument", "links"]
|
|
44
|
+
|
|
45
|
+
class Config:
|
|
46
|
+
"""Pydantic configuration"""
|
|
47
|
+
allow_population_by_field_name = True
|
|
48
|
+
validate_assignment = True
|
|
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) -> InstrumentEntity:
|
|
60
|
+
"""Create an instance of InstrumentEntity 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 prevailing_instrument
|
|
70
|
+
if self.prevailing_instrument:
|
|
71
|
+
_dict['prevailingInstrument'] = self.prevailing_instrument.to_dict()
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of deleted_instrument
|
|
73
|
+
if self.deleted_instrument:
|
|
74
|
+
_dict['deletedInstrument'] = self.deleted_instrument.to_dict()
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of previewed_instrument
|
|
76
|
+
if self.previewed_instrument:
|
|
77
|
+
_dict['previewedInstrument'] = self.previewed_instrument.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.links:
|
|
81
|
+
for _item in self.links:
|
|
82
|
+
if _item:
|
|
83
|
+
_items.append(_item.to_dict())
|
|
84
|
+
_dict['links'] = _items
|
|
85
|
+
# set to None if as_at_version_number (nullable) is None
|
|
86
|
+
# and __fields_set__ contains the field
|
|
87
|
+
if self.as_at_version_number is None and "as_at_version_number" in self.__fields_set__:
|
|
88
|
+
_dict['asAtVersionNumber'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if as_at_deleted (nullable) is None
|
|
91
|
+
# and __fields_set__ contains the field
|
|
92
|
+
if self.as_at_deleted is None and "as_at_deleted" in self.__fields_set__:
|
|
93
|
+
_dict['asAtDeleted'] = None
|
|
94
|
+
|
|
95
|
+
# set to None if user_id_deleted (nullable) is None
|
|
96
|
+
# and __fields_set__ contains the field
|
|
97
|
+
if self.user_id_deleted is None and "user_id_deleted" in self.__fields_set__:
|
|
98
|
+
_dict['userIdDeleted'] = None
|
|
99
|
+
|
|
100
|
+
# set to None if request_id_deleted (nullable) is None
|
|
101
|
+
# and __fields_set__ contains the field
|
|
102
|
+
if self.request_id_deleted is None and "request_id_deleted" in self.__fields_set__:
|
|
103
|
+
_dict['requestIdDeleted'] = None
|
|
104
|
+
|
|
105
|
+
# set to None if effective_at_created (nullable) is None
|
|
106
|
+
# and __fields_set__ contains the field
|
|
107
|
+
if self.effective_at_created is None and "effective_at_created" in self.__fields_set__:
|
|
108
|
+
_dict['effectiveAtCreated'] = None
|
|
109
|
+
|
|
110
|
+
# set to None if previewed_status (nullable) is None
|
|
111
|
+
# and __fields_set__ contains the field
|
|
112
|
+
if self.previewed_status is None and "previewed_status" in self.__fields_set__:
|
|
113
|
+
_dict['previewedStatus'] = None
|
|
114
|
+
|
|
115
|
+
# set to None if links (nullable) is None
|
|
116
|
+
# and __fields_set__ contains the field
|
|
117
|
+
if self.links is None and "links" in self.__fields_set__:
|
|
118
|
+
_dict['links'] = None
|
|
119
|
+
|
|
120
|
+
return _dict
|
|
121
|
+
|
|
122
|
+
@classmethod
|
|
123
|
+
def from_dict(cls, obj: dict) -> InstrumentEntity:
|
|
124
|
+
"""Create an instance of InstrumentEntity from a dict"""
|
|
125
|
+
if obj is None:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
if not isinstance(obj, dict):
|
|
129
|
+
return InstrumentEntity.parse_obj(obj)
|
|
130
|
+
|
|
131
|
+
_obj = InstrumentEntity.parse_obj({
|
|
132
|
+
"href": obj.get("href"),
|
|
133
|
+
"entity_unique_id": obj.get("entityUniqueId"),
|
|
134
|
+
"as_at_version_number": obj.get("asAtVersionNumber"),
|
|
135
|
+
"status": obj.get("status"),
|
|
136
|
+
"as_at_deleted": obj.get("asAtDeleted"),
|
|
137
|
+
"user_id_deleted": obj.get("userIdDeleted"),
|
|
138
|
+
"request_id_deleted": obj.get("requestIdDeleted"),
|
|
139
|
+
"effective_at_created": obj.get("effectiveAtCreated"),
|
|
140
|
+
"prevailing_instrument": Instrument.from_dict(obj.get("prevailingInstrument")) if obj.get("prevailingInstrument") is not None else None,
|
|
141
|
+
"deleted_instrument": Instrument.from_dict(obj.get("deletedInstrument")) if obj.get("deletedInstrument") is not None else None,
|
|
142
|
+
"previewed_status": obj.get("previewedStatus"),
|
|
143
|
+
"previewed_instrument": Instrument.from_dict(obj.get("previewedInstrument")) if obj.get("previewedInstrument") is not None else None,
|
|
144
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
|
145
|
+
})
|
|
146
|
+
return _obj
|
lusid/models/instrument_leg.py
CHANGED
|
@@ -27,15 +27,15 @@ class InstrumentLeg(LusidInstrument):
|
|
|
27
27
|
"""
|
|
28
28
|
Base class for representing instrument legs in LUSID. An instrument leg describes a set of cashflows that are paid at a set of points in time according to some set of conventions. This base class should not be directly instantiated; only its inheritors should be used. # noqa: E501
|
|
29
29
|
"""
|
|
30
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
|
|
30
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["instrumentType"]
|
|
33
33
|
|
|
34
34
|
@validator('instrument_type')
|
|
35
35
|
def instrument_type_validate_enum(cls, value):
|
|
36
36
|
"""Validates the enum"""
|
|
37
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
|
|
38
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
|
|
37
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
|
38
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
|
39
39
|
return value
|
|
40
40
|
|
|
41
41
|
class Config:
|
|
@@ -28,15 +28,15 @@ class InstrumentListComplianceParameter(ComplianceParameter):
|
|
|
28
28
|
InstrumentListComplianceParameter
|
|
29
29
|
"""
|
|
30
30
|
value: ResourceId = Field(...)
|
|
31
|
-
compliance_parameter_type: StrictStr = Field(..., alias="complianceParameterType", description="The parameter type. The available values are: BoolComplianceParameter, StringComplianceParameter, DecimalComplianceParameter, DateTimeComplianceParameter, PropertyKeyComplianceParameter, AddressKeyComplianceParameter, PortfolioIdComplianceParameter, PortfolioGroupIdComplianceParameter, StringListComplianceParameter, BoolListComplianceParameter, DateTimeListComplianceParameter, DecimalListComplianceParameter, PropertyKeyListComplianceParameter, AddressKeyListComplianceParameter, PortfolioIdListComplianceParameter, PortfolioGroupIdListComplianceParameter, InstrumentListComplianceParameter, FilterPredicateComplianceParameter, GroupFilterPredicateComplianceParameter, GroupBySelectorComplianceParameter, PropertyListComplianceParameter")
|
|
31
|
+
compliance_parameter_type: StrictStr = Field(..., alias="complianceParameterType", description="The parameter type. The available values are: BoolComplianceParameter, StringComplianceParameter, DecimalComplianceParameter, DateTimeComplianceParameter, PropertyKeyComplianceParameter, AddressKeyComplianceParameter, PortfolioIdComplianceParameter, PortfolioGroupIdComplianceParameter, StringListComplianceParameter, BoolListComplianceParameter, DateTimeListComplianceParameter, DecimalListComplianceParameter, PropertyKeyListComplianceParameter, AddressKeyListComplianceParameter, PortfolioIdListComplianceParameter, PortfolioGroupIdListComplianceParameter, InstrumentListComplianceParameter, FilterPredicateComplianceParameter, GroupFilterPredicateComplianceParameter, GroupBySelectorComplianceParameter, PropertyListComplianceParameter, GroupCalculationComplianceParameter")
|
|
32
32
|
additional_properties: Dict[str, Any] = {}
|
|
33
33
|
__properties = ["complianceParameterType", "value"]
|
|
34
34
|
|
|
35
35
|
@validator('compliance_parameter_type')
|
|
36
36
|
def compliance_parameter_type_validate_enum(cls, value):
|
|
37
37
|
"""Validates the enum"""
|
|
38
|
-
if value not in ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter', 'PropertyListComplianceParameter'):
|
|
39
|
-
raise ValueError("must be one of enum values ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter', 'PropertyListComplianceParameter')")
|
|
38
|
+
if value not in ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter', 'PropertyListComplianceParameter', 'GroupCalculationComplianceParameter'):
|
|
39
|
+
raise ValueError("must be one of enum values ('BoolComplianceParameter', 'StringComplianceParameter', 'DecimalComplianceParameter', 'DateTimeComplianceParameter', 'PropertyKeyComplianceParameter', 'AddressKeyComplianceParameter', 'PortfolioIdComplianceParameter', 'PortfolioGroupIdComplianceParameter', 'StringListComplianceParameter', 'BoolListComplianceParameter', 'DateTimeListComplianceParameter', 'DecimalListComplianceParameter', 'PropertyKeyListComplianceParameter', 'AddressKeyListComplianceParameter', 'PortfolioIdListComplianceParameter', 'PortfolioGroupIdListComplianceParameter', 'InstrumentListComplianceParameter', 'FilterPredicateComplianceParameter', 'GroupFilterPredicateComplianceParameter', 'GroupBySelectorComplianceParameter', 'PropertyListComplianceParameter', 'GroupCalculationComplianceParameter')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
42
|
class Config:
|
lusid/models/instrument_type.py
CHANGED
|
@@ -67,6 +67,8 @@ class InstrumentType(str, Enum):
|
|
|
67
67
|
INFLATIONLEG = 'InflationLeg'
|
|
68
68
|
FUNDSHARECLASS = 'FundShareClass'
|
|
69
69
|
FLEXIBLELOAN = 'FlexibleLoan'
|
|
70
|
+
UNSETTLEDCASH = 'UnsettledCash'
|
|
71
|
+
CASH = 'Cash'
|
|
70
72
|
|
|
71
73
|
@classmethod
|
|
72
74
|
def from_json(cls, json_str: str) -> InstrumentType:
|
|
@@ -34,15 +34,15 @@ class InterestRateSwap(LusidInstrument):
|
|
|
34
34
|
legs: conlist(InstrumentLeg) = Field(..., description="The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg.")
|
|
35
35
|
settlement_ccy: Optional[StrictStr] = Field(None, alias="settlementCcy", description="Settlement currency if IRS is non-deliverable.")
|
|
36
36
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven fixed-floating swap. The dates must be distinct and either all payments are Pay or all payments are receive")
|
|
37
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
|
|
37
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
|
38
38
|
additional_properties: Dict[str, Any] = {}
|
|
39
39
|
__properties = ["instrumentType", "startDate", "maturityDate", "isNonDeliverable", "legs", "settlementCcy", "additionalPayments"]
|
|
40
40
|
|
|
41
41
|
@validator('instrument_type')
|
|
42
42
|
def instrument_type_validate_enum(cls, value):
|
|
43
43
|
"""Validates the enum"""
|
|
44
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
|
|
45
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
|
|
44
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
|
45
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
|
46
46
|
return value
|
|
47
47
|
|
|
48
48
|
class Config:
|
|
@@ -33,15 +33,15 @@ class InterestRateSwaption(LusidInstrument):
|
|
|
33
33
|
premium: Optional[Premium] = None
|
|
34
34
|
delivery_method: constr(strict=True, min_length=1) = Field(..., alias="deliveryMethod", description="How does the option settle Supported string (enumeration) values are: [Cash, Physical].")
|
|
35
35
|
swap: InterestRateSwap = Field(...)
|
|
36
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
|
|
36
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
|
37
37
|
additional_properties: Dict[str, Any] = {}
|
|
38
38
|
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap"]
|
|
39
39
|
|
|
40
40
|
@validator('instrument_type')
|
|
41
41
|
def instrument_type_validate_enum(cls, value):
|
|
42
42
|
"""Validates the enum"""
|
|
43
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
|
|
44
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
|
|
43
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
|
44
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
|
45
45
|
return value
|
|
46
46
|
|
|
47
47
|
class Config:
|
|
@@ -29,15 +29,15 @@ class IntermediateComplianceStep(ComplianceStep):
|
|
|
29
29
|
"""
|
|
30
30
|
label: constr(strict=True, min_length=1) = Field(..., description="The label of the compliance step")
|
|
31
31
|
grouped_parameters: Dict[str, conlist(ComplianceTemplateParameter)] = Field(..., alias="groupedParameters", description="Parameters required for the step")
|
|
32
|
-
compliance_step_type: StrictStr = Field(..., alias="complianceStepType", description=". The available values are: FilterStep, GroupByStep, GroupFilterStep, BranchStep, RecombineStep, CheckStep")
|
|
32
|
+
compliance_step_type: StrictStr = Field(..., alias="complianceStepType", description=". The available values are: FilterStep, GroupByStep, GroupFilterStep, BranchStep, RecombineStep, CheckStep, PercentCheckStep")
|
|
33
33
|
additional_properties: Dict[str, Any] = {}
|
|
34
34
|
__properties = ["complianceStepType", "label", "groupedParameters"]
|
|
35
35
|
|
|
36
36
|
@validator('compliance_step_type')
|
|
37
37
|
def compliance_step_type_validate_enum(cls, value):
|
|
38
38
|
"""Validates the enum"""
|
|
39
|
-
if value not in ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep'):
|
|
40
|
-
raise ValueError("must be one of enum values ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep')")
|
|
39
|
+
if value not in ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep', 'PercentCheckStep'):
|
|
40
|
+
raise ValueError("must be one of enum values ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep', 'PercentCheckStep')")
|
|
41
41
|
return value
|
|
42
42
|
|
|
43
43
|
class Config:
|
|
@@ -27,15 +27,22 @@ class IntermediateComplianceStepRequest(ComplianceStepRequest):
|
|
|
27
27
|
IntermediateComplianceStepRequest
|
|
28
28
|
"""
|
|
29
29
|
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
-
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest, PercentCheckStepRequest")
|
|
31
31
|
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
33
|
|
|
34
|
+
@validator('label')
|
|
35
|
+
def label_validate_regular_expression(cls, value):
|
|
36
|
+
"""Validates the regular expression"""
|
|
37
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
38
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
39
|
+
return value
|
|
40
|
+
|
|
34
41
|
@validator('compliance_step_type_request')
|
|
35
42
|
def compliance_step_type_request_validate_enum(cls, value):
|
|
36
43
|
"""Validates the enum"""
|
|
37
|
-
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest'):
|
|
38
|
-
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest')")
|
|
44
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest', 'PercentCheckStepRequest'):
|
|
45
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest', 'PercentCheckStepRequest')")
|
|
39
46
|
return value
|
|
40
47
|
|
|
41
48
|
class Config:
|
lusid/models/lusid_instrument.py
CHANGED
|
@@ -26,14 +26,14 @@ class LusidInstrument(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
Base class in the hierarchy for representing the full economic definition of instruments in LUSID. These definitions are used to provide instrument analytics such as PV, accrual, cash flows, and risk. This base class should not be directly instantiated; each supported InstrumentType has a corresponding inherited class. # noqa: E501
|
|
28
28
|
"""
|
|
29
|
-
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan")
|
|
29
|
+
instrument_type: StrictStr = Field(..., alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash")
|
|
30
30
|
__properties = ["instrumentType"]
|
|
31
31
|
|
|
32
32
|
@validator('instrument_type')
|
|
33
33
|
def instrument_type_validate_enum(cls, value):
|
|
34
34
|
"""Validates the enum"""
|
|
35
|
-
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan'):
|
|
36
|
-
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan')")
|
|
35
|
+
if value not in ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash'):
|
|
36
|
+
raise ValueError("must be one of enum values ('QuotedSecurity', 'InterestRateSwap', 'FxForward', 'Future', 'ExoticInstrument', 'FxOption', 'CreditDefaultSwap', 'InterestRateSwaption', 'Bond', 'EquityOption', 'FixedLeg', 'FloatingLeg', 'BespokeCashFlowsLeg', 'Unknown', 'TermDeposit', 'ContractForDifference', 'EquitySwap', 'CashPerpetual', 'CapFloor', 'CashSettled', 'CdsIndex', 'Basket', 'FundingLeg', 'FxSwap', 'ForwardRateAgreement', 'SimpleInstrument', 'Repo', 'Equity', 'ExchangeTradedOption', 'ReferenceInstrument', 'ComplexBond', 'InflationLinkedBond', 'InflationSwap', 'SimpleCashFlowLoan', 'TotalReturnSwap', 'InflationLeg', 'FundShareClass', 'FlexibleLoan', 'UnsettledCash', 'Cash')")
|
|
37
37
|
return value
|
|
38
38
|
|
|
39
39
|
class Config:
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
|
22
|
+
from pydantic.v1 import Field, StrictStr, conlist, constr, validator
|
|
23
|
+
from lusid.models.compliance_step import ComplianceStep
|
|
24
|
+
from lusid.models.compliance_template_parameter import ComplianceTemplateParameter
|
|
25
|
+
|
|
26
|
+
class PercentCheckStep(ComplianceStep):
|
|
27
|
+
"""
|
|
28
|
+
PercentCheckStep
|
|
29
|
+
"""
|
|
30
|
+
label: constr(strict=True, min_length=1) = Field(..., description="The label of the compliance step")
|
|
31
|
+
limit_check_parameters: conlist(ComplianceTemplateParameter) = Field(..., alias="limitCheckParameters", description="Parameters required for an absolute limit check")
|
|
32
|
+
warning_check_parameters: conlist(ComplianceTemplateParameter) = Field(..., alias="warningCheckParameters", description="Parameters required for a warning limit check")
|
|
33
|
+
compliance_step_type: StrictStr = Field(..., alias="complianceStepType", description=". The available values are: FilterStep, GroupByStep, GroupFilterStep, BranchStep, RecombineStep, CheckStep, PercentCheckStep")
|
|
34
|
+
additional_properties: Dict[str, Any] = {}
|
|
35
|
+
__properties = ["complianceStepType", "label", "limitCheckParameters", "warningCheckParameters"]
|
|
36
|
+
|
|
37
|
+
@validator('compliance_step_type')
|
|
38
|
+
def compliance_step_type_validate_enum(cls, value):
|
|
39
|
+
"""Validates the enum"""
|
|
40
|
+
if value not in ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep', 'PercentCheckStep'):
|
|
41
|
+
raise ValueError("must be one of enum values ('FilterStep', 'GroupByStep', 'GroupFilterStep', 'BranchStep', 'RecombineStep', 'CheckStep', 'PercentCheckStep')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
class Config:
|
|
45
|
+
"""Pydantic configuration"""
|
|
46
|
+
allow_population_by_field_name = True
|
|
47
|
+
validate_assignment = True
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> PercentCheckStep:
|
|
59
|
+
"""Create an instance of PercentCheckStep from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
64
|
+
_dict = self.dict(by_alias=True,
|
|
65
|
+
exclude={
|
|
66
|
+
"additional_properties"
|
|
67
|
+
},
|
|
68
|
+
exclude_none=True)
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of each item in limit_check_parameters (list)
|
|
70
|
+
_items = []
|
|
71
|
+
if self.limit_check_parameters:
|
|
72
|
+
for _item in self.limit_check_parameters:
|
|
73
|
+
if _item:
|
|
74
|
+
_items.append(_item.to_dict())
|
|
75
|
+
_dict['limitCheckParameters'] = _items
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in warning_check_parameters (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.warning_check_parameters:
|
|
79
|
+
for _item in self.warning_check_parameters:
|
|
80
|
+
if _item:
|
|
81
|
+
_items.append(_item.to_dict())
|
|
82
|
+
_dict['warningCheckParameters'] = _items
|
|
83
|
+
# puts key-value pairs in additional_properties in the top level
|
|
84
|
+
if self.additional_properties is not None:
|
|
85
|
+
for _key, _value in self.additional_properties.items():
|
|
86
|
+
_dict[_key] = _value
|
|
87
|
+
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: dict) -> PercentCheckStep:
|
|
92
|
+
"""Create an instance of PercentCheckStep from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return PercentCheckStep.parse_obj(obj)
|
|
98
|
+
|
|
99
|
+
_obj = PercentCheckStep.parse_obj({
|
|
100
|
+
"compliance_step_type": obj.get("complianceStepType"),
|
|
101
|
+
"label": obj.get("label"),
|
|
102
|
+
"limit_check_parameters": [ComplianceTemplateParameter.from_dict(_item) for _item in obj.get("limitCheckParameters")] if obj.get("limitCheckParameters") is not None else None,
|
|
103
|
+
"warning_check_parameters": [ComplianceTemplateParameter.from_dict(_item) for _item in obj.get("warningCheckParameters")] if obj.get("warningCheckParameters") is not None else None
|
|
104
|
+
})
|
|
105
|
+
# store additional fields in additional_properties
|
|
106
|
+
for _key in obj.keys():
|
|
107
|
+
if _key not in cls.__properties:
|
|
108
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
109
|
+
|
|
110
|
+
return _obj
|
|
@@ -0,0 +1,98 @@
|
|
|
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 Field, StrictStr, constr, validator
|
|
23
|
+
from lusid.models.compliance_step_request import ComplianceStepRequest
|
|
24
|
+
|
|
25
|
+
class PercentCheckStepRequest(ComplianceStepRequest):
|
|
26
|
+
"""
|
|
27
|
+
PercentCheckStepRequest
|
|
28
|
+
"""
|
|
29
|
+
label: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The label of the compliance step")
|
|
30
|
+
compliance_step_type_request: StrictStr = Field(..., alias="complianceStepTypeRequest", description=". The available values are: FilterStepRequest, GroupByStepRequest, GroupFilterStepRequest, BranchStepRequest, CheckStepRequest, PercentCheckStepRequest")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties = ["complianceStepTypeRequest", "label"]
|
|
33
|
+
|
|
34
|
+
@validator('label')
|
|
35
|
+
def label_validate_regular_expression(cls, value):
|
|
36
|
+
"""Validates the regular expression"""
|
|
37
|
+
if not re.match(r"^[a-zA-Z0-9\-_]+$", value):
|
|
38
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
@validator('compliance_step_type_request')
|
|
42
|
+
def compliance_step_type_request_validate_enum(cls, value):
|
|
43
|
+
"""Validates the enum"""
|
|
44
|
+
if value not in ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest', 'PercentCheckStepRequest'):
|
|
45
|
+
raise ValueError("must be one of enum values ('FilterStepRequest', 'GroupByStepRequest', 'GroupFilterStepRequest', 'BranchStepRequest', 'CheckStepRequest', 'PercentCheckStepRequest')")
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
class Config:
|
|
49
|
+
"""Pydantic configuration"""
|
|
50
|
+
allow_population_by_field_name = True
|
|
51
|
+
validate_assignment = True
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> PercentCheckStepRequest:
|
|
63
|
+
"""Create an instance of PercentCheckStepRequest from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self):
|
|
67
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
68
|
+
_dict = self.dict(by_alias=True,
|
|
69
|
+
exclude={
|
|
70
|
+
"additional_properties"
|
|
71
|
+
},
|
|
72
|
+
exclude_none=True)
|
|
73
|
+
# puts key-value pairs in additional_properties in the top level
|
|
74
|
+
if self.additional_properties is not None:
|
|
75
|
+
for _key, _value in self.additional_properties.items():
|
|
76
|
+
_dict[_key] = _value
|
|
77
|
+
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: dict) -> PercentCheckStepRequest:
|
|
82
|
+
"""Create an instance of PercentCheckStepRequest from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return PercentCheckStepRequest.parse_obj(obj)
|
|
88
|
+
|
|
89
|
+
_obj = PercentCheckStepRequest.parse_obj({
|
|
90
|
+
"compliance_step_type_request": obj.get("complianceStepTypeRequest"),
|
|
91
|
+
"label": obj.get("label")
|
|
92
|
+
})
|
|
93
|
+
# store additional fields in additional_properties
|
|
94
|
+
for _key in obj.keys():
|
|
95
|
+
if _key not in cls.__properties:
|
|
96
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
97
|
+
|
|
98
|
+
return _obj
|