lusid-sdk 2.1.989__py3-none-any.whl → 2.1.990__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/models/__init__.py CHANGED
@@ -84,6 +84,7 @@ from lusid.models.append_fx_forward_tenor_curve_data import AppendFxForwardTenor
84
84
  from lusid.models.append_fx_forward_tenor_pips_curve_data import AppendFxForwardTenorPipsCurveData
85
85
  from lusid.models.append_market_data import AppendMarketData
86
86
  from lusid.models.append_market_data_type import AppendMarketDataType
87
+ from lusid.models.applicable_entity import ApplicableEntity
87
88
  from lusid.models.applicable_instrument_event import ApplicableInstrumentEvent
88
89
  from lusid.models.asset_class import AssetClass
89
90
  from lusid.models.asset_leg import AssetLeg
@@ -101,6 +102,7 @@ from lusid.models.batch_upsert_portfolio_access_metadata_response import BatchUp
101
102
  from lusid.models.batch_upsert_portfolio_access_metadata_response_item import BatchUpsertPortfolioAccessMetadataResponseItem
102
103
  from lusid.models.batch_upsert_portfolio_transactions_response import BatchUpsertPortfolioTransactionsResponse
103
104
  from lusid.models.batch_upsert_property_definition_properties_response import BatchUpsertPropertyDefinitionPropertiesResponse
105
+ from lusid.models.batch_upsert_relational_datasets_response import BatchUpsertRelationalDatasetsResponse
104
106
  from lusid.models.batch_upsert_transaction_settlement_instruction_response import BatchUpsertTransactionSettlementInstructionResponse
105
107
  from lusid.models.block import Block
106
108
  from lusid.models.block_and_order_id_request import BlockAndOrderIdRequest
@@ -785,6 +787,7 @@ from lusid.models.paged_resource_list_of_property_definition import PagedResourc
785
787
  from lusid.models.paged_resource_list_of_property_definition_search_result import PagedResourceListOfPropertyDefinitionSearchResult
786
788
  from lusid.models.paged_resource_list_of_reconciliation import PagedResourceListOfReconciliation
787
789
  from lusid.models.paged_resource_list_of_reference_list_response import PagedResourceListOfReferenceListResponse
790
+ from lusid.models.paged_resource_list_of_relational_data_point_response import PagedResourceListOfRelationalDataPointResponse
788
791
  from lusid.models.paged_resource_list_of_relational_dataset_definition import PagedResourceListOfRelationalDatasetDefinition
789
792
  from lusid.models.paged_resource_list_of_relationship_definition import PagedResourceListOfRelationshipDefinition
790
793
  from lusid.models.paged_resource_list_of_sequence_definition import PagedResourceListOfSequenceDefinition
@@ -888,6 +891,7 @@ from lusid.models.query_applicable_instrument_events_request import QueryApplica
888
891
  from lusid.models.query_bucketed_cash_flows_request import QueryBucketedCashFlowsRequest
889
892
  from lusid.models.query_cash_flows_request import QueryCashFlowsRequest
890
893
  from lusid.models.query_instrument_events_request import QueryInstrumentEventsRequest
894
+ from lusid.models.query_relational_dataset_request import QueryRelationalDatasetRequest
891
895
  from lusid.models.query_trade_tickets_request import QueryTradeTicketsRequest
892
896
  from lusid.models.queryable_key import QueryableKey
893
897
  from lusid.models.quote import Quote
@@ -934,6 +938,9 @@ from lusid.models.reference_portfolio_weight_type import ReferencePortfolioWeigh
934
938
  from lusid.models.related_entity import RelatedEntity
935
939
  from lusid.models.relation import Relation
936
940
  from lusid.models.relation_definition import RelationDefinition
941
+ from lusid.models.relational_data_point_field_value_response import RelationalDataPointFieldValueResponse
942
+ from lusid.models.relational_data_point_response import RelationalDataPointResponse
943
+ from lusid.models.relational_data_series_response import RelationalDataSeriesResponse
937
944
  from lusid.models.relational_dataset_definition import RelationalDatasetDefinition
938
945
  from lusid.models.relational_dataset_field_definition import RelationalDatasetFieldDefinition
939
946
  from lusid.models.relationship import Relationship
@@ -1265,6 +1272,8 @@ from lusid.models.upsert_reference_portfolio_constituent_properties_request impo
1265
1272
  from lusid.models.upsert_reference_portfolio_constituent_properties_response import UpsertReferencePortfolioConstituentPropertiesResponse
1266
1273
  from lusid.models.upsert_reference_portfolio_constituents_request import UpsertReferencePortfolioConstituentsRequest
1267
1274
  from lusid.models.upsert_reference_portfolio_constituents_response import UpsertReferencePortfolioConstituentsResponse
1275
+ from lusid.models.upsert_relational_data_point_data_series import UpsertRelationalDataPointDataSeries
1276
+ from lusid.models.upsert_relational_data_point_request import UpsertRelationalDataPointRequest
1268
1277
  from lusid.models.upsert_result_values_data_request import UpsertResultValuesDataRequest
1269
1278
  from lusid.models.upsert_returns_response import UpsertReturnsResponse
1270
1279
  from lusid.models.upsert_single_structured_data_response import UpsertSingleStructuredDataResponse
@@ -1391,6 +1400,7 @@ __all__ = [
1391
1400
  "AppendFxForwardTenorPipsCurveData",
1392
1401
  "AppendMarketData",
1393
1402
  "AppendMarketDataType",
1403
+ "ApplicableEntity",
1394
1404
  "ApplicableInstrumentEvent",
1395
1405
  "AssetClass",
1396
1406
  "AssetLeg",
@@ -1408,6 +1418,7 @@ __all__ = [
1408
1418
  "BatchUpsertPortfolioAccessMetadataResponseItem",
1409
1419
  "BatchUpsertPortfolioTransactionsResponse",
1410
1420
  "BatchUpsertPropertyDefinitionPropertiesResponse",
1421
+ "BatchUpsertRelationalDatasetsResponse",
1411
1422
  "BatchUpsertTransactionSettlementInstructionResponse",
1412
1423
  "Block",
1413
1424
  "BlockAndOrderIdRequest",
@@ -2092,6 +2103,7 @@ __all__ = [
2092
2103
  "PagedResourceListOfPropertyDefinitionSearchResult",
2093
2104
  "PagedResourceListOfReconciliation",
2094
2105
  "PagedResourceListOfReferenceListResponse",
2106
+ "PagedResourceListOfRelationalDataPointResponse",
2095
2107
  "PagedResourceListOfRelationalDatasetDefinition",
2096
2108
  "PagedResourceListOfRelationshipDefinition",
2097
2109
  "PagedResourceListOfSequenceDefinition",
@@ -2195,6 +2207,7 @@ __all__ = [
2195
2207
  "QueryBucketedCashFlowsRequest",
2196
2208
  "QueryCashFlowsRequest",
2197
2209
  "QueryInstrumentEventsRequest",
2210
+ "QueryRelationalDatasetRequest",
2198
2211
  "QueryTradeTicketsRequest",
2199
2212
  "QueryableKey",
2200
2213
  "Quote",
@@ -2241,6 +2254,9 @@ __all__ = [
2241
2254
  "RelatedEntity",
2242
2255
  "Relation",
2243
2256
  "RelationDefinition",
2257
+ "RelationalDataPointFieldValueResponse",
2258
+ "RelationalDataPointResponse",
2259
+ "RelationalDataSeriesResponse",
2244
2260
  "RelationalDatasetDefinition",
2245
2261
  "RelationalDatasetFieldDefinition",
2246
2262
  "Relationship",
@@ -2572,6 +2588,8 @@ __all__ = [
2572
2588
  "UpsertReferencePortfolioConstituentPropertiesResponse",
2573
2589
  "UpsertReferencePortfolioConstituentsRequest",
2574
2590
  "UpsertReferencePortfolioConstituentsResponse",
2591
+ "UpsertRelationalDataPointDataSeries",
2592
+ "UpsertRelationalDataPointRequest",
2575
2593
  "UpsertResultValuesDataRequest",
2576
2594
  "UpsertReturnsResponse",
2577
2595
  "UpsertSingleStructuredDataResponse",
@@ -0,0 +1,105 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, constr, validator
23
+
24
+ class ApplicableEntity(BaseModel):
25
+ """
26
+ ApplicableEntity
27
+ """
28
+ entity_type: StrictStr = Field(...,alias="entityType", description="The type of entity (e.g., Instrument, Portfolio) that this DataSeries applies to.")
29
+ entity_scope: Optional[StrictStr] = Field(None,alias="entityScope", description="The scope of the entity.")
30
+ identifier_scope: Optional[StrictStr] = Field(None,alias="identifierScope", description="The scope of the identifier used to uniquely identify the entity.")
31
+ identifier_type: Optional[StrictStr] = Field(None,alias="identifierType", description="The type of identifier (e.g., Figi, Isin) used to uniquely identify the entity.")
32
+ identifier_value: Optional[StrictStr] = Field(None,alias="identifierValue", description="The value of the identifier used to uniquely identify the entity.")
33
+ __properties = ["entityType", "entityScope", "identifierScope", "identifierType", "identifierValue"]
34
+
35
+ class Config:
36
+ """Pydantic configuration"""
37
+ allow_population_by_field_name = True
38
+ validate_assignment = True
39
+
40
+ def __str__(self):
41
+ """For `print` and `pprint`"""
42
+ return pprint.pformat(self.dict(by_alias=False))
43
+
44
+ def __repr__(self):
45
+ """For `print` and `pprint`"""
46
+ return self.to_str()
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.dict(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> ApplicableEntity:
58
+ """Create an instance of ApplicableEntity from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self):
62
+ """Returns the dictionary representation of the model using alias"""
63
+ _dict = self.dict(by_alias=True,
64
+ exclude={
65
+ },
66
+ exclude_none=True)
67
+ # set to None if entity_scope (nullable) is None
68
+ # and __fields_set__ contains the field
69
+ if self.entity_scope is None and "entity_scope" in self.__fields_set__:
70
+ _dict['entityScope'] = None
71
+
72
+ # set to None if identifier_scope (nullable) is None
73
+ # and __fields_set__ contains the field
74
+ if self.identifier_scope is None and "identifier_scope" in self.__fields_set__:
75
+ _dict['identifierScope'] = None
76
+
77
+ # set to None if identifier_type (nullable) is None
78
+ # and __fields_set__ contains the field
79
+ if self.identifier_type is None and "identifier_type" in self.__fields_set__:
80
+ _dict['identifierType'] = None
81
+
82
+ # set to None if identifier_value (nullable) is None
83
+ # and __fields_set__ contains the field
84
+ if self.identifier_value is None and "identifier_value" in self.__fields_set__:
85
+ _dict['identifierValue'] = None
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: dict) -> ApplicableEntity:
91
+ """Create an instance of ApplicableEntity from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return ApplicableEntity.parse_obj(obj)
97
+
98
+ _obj = ApplicableEntity.parse_obj({
99
+ "entity_type": obj.get("entityType"),
100
+ "entity_scope": obj.get("entityScope"),
101
+ "identifier_scope": obj.get("identifierScope"),
102
+ "identifier_type": obj.get("identifierType"),
103
+ "identifier_value": obj.get("identifierValue")
104
+ })
105
+ return _obj
@@ -0,0 +1,132 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.error_detail import ErrorDetail
24
+ from lusid.models.link import Link
25
+ from lusid.models.relational_data_point_response import RelationalDataPointResponse
26
+
27
+ class BatchUpsertRelationalDatasetsResponse(BaseModel):
28
+ """
29
+ BatchUpsertRelationalDatasetsResponse
30
+ """
31
+ values: Dict[str, RelationalDataPointResponse] = Field(..., description="A list of data points that were successfully upserted.")
32
+ failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="A list of data points that failed to be upserted, along with the associated error message.")
33
+ href: Optional[StrictStr] = Field(None,alias="href", description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["values", "failed", "href", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def __str__(self):
43
+ """For `print` and `pprint`"""
44
+ return pprint.pformat(self.dict(by_alias=False))
45
+
46
+ def __repr__(self):
47
+ """For `print` and `pprint`"""
48
+ return self.to_str()
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> BatchUpsertRelationalDatasetsResponse:
60
+ """Create an instance of BatchUpsertRelationalDatasetsResponse from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True,
66
+ exclude={
67
+ },
68
+ exclude_none=True)
69
+ # override the default output from pydantic by calling `to_dict()` of each value in values (dict)
70
+ _field_dict = {}
71
+ if self.values:
72
+ for _key in self.values:
73
+ if self.values[_key]:
74
+ _field_dict[_key] = self.values[_key].to_dict()
75
+ _dict['values'] = _field_dict
76
+ # override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
77
+ _field_dict = {}
78
+ if self.failed:
79
+ for _key in self.failed:
80
+ if self.failed[_key]:
81
+ _field_dict[_key] = self.failed[_key].to_dict()
82
+ _dict['failed'] = _field_dict
83
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
84
+ _items = []
85
+ if self.links:
86
+ for _item in self.links:
87
+ if _item:
88
+ _items.append(_item.to_dict())
89
+ _dict['links'] = _items
90
+ # set to None if failed (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.failed is None and "failed" in self.__fields_set__:
93
+ _dict['failed'] = None
94
+
95
+ # set to None if href (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.href is None and "href" in self.__fields_set__:
98
+ _dict['href'] = None
99
+
100
+ # set to None if links (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.links is None and "links" in self.__fields_set__:
103
+ _dict['links'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: dict) -> BatchUpsertRelationalDatasetsResponse:
109
+ """Create an instance of BatchUpsertRelationalDatasetsResponse from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return BatchUpsertRelationalDatasetsResponse.parse_obj(obj)
115
+
116
+ _obj = BatchUpsertRelationalDatasetsResponse.parse_obj({
117
+ "values": dict(
118
+ (_k, RelationalDataPointResponse.from_dict(_v))
119
+ for _k, _v in obj.get("values").items()
120
+ )
121
+ if obj.get("values") is not None
122
+ else None,
123
+ "failed": dict(
124
+ (_k, ErrorDetail.from_dict(_v))
125
+ for _k, _v in obj.get("failed").items()
126
+ )
127
+ if obj.get("failed") is not None
128
+ else None,
129
+ "href": obj.get("href"),
130
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
131
+ })
132
+ return _obj
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from datetime import datetime
21
21
  from typing import Any, Dict, List, Optional, Union
22
- from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, conlist, validator
22
+ from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist, validator
23
23
  from lusid.models.instrument_event import InstrumentEvent
24
24
  from lusid.models.lapse_election import LapseElection
25
25
 
@@ -32,9 +32,10 @@ class LoanPrincipalRepaymentEvent(InstrumentEvent):
32
32
  lapse_elections: Optional[conlist(LapseElection)] = Field(None, alias="lapseElections", description="Election for controlling whether the Principal is paid automatically or not. Exactly one election must be provided.")
33
33
  fraction: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Fraction of the outstanding settled principal balance to be repaid. Must be between 0 and 1, inclusive. Defaults to 1 if not set. Ignored if the field Amount is set to a value different than zero.")
34
34
  amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Amount to be repaid (independent of the fraction). This field is not used at all if not set or set to 0, in this case the fraction field will be used instead. Otherwise, the fraction field is ignored.")
35
+ with_interest: Optional[StrictBool] = Field(None, alias="withInterest", description="If set to true, then active contracts whose balance is reduced by the repayment will have their accrued interest repaid proportionally to the balance reduction.")
35
36
  instrument_event_type: StrictStr = Field(...,alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent, TermDepositInterestEvent, TermDepositPrincipalEvent, EarlyRedemptionEvent, FutureMarkToMarketEvent, AdjustGlobalCommitmentEvent, ContractInitialisationEvent, DrawdownEvent, LoanInterestRepaymentEvent, UpdateDepositAmountEvent, LoanPrincipalRepaymentEvent, DepositInterestPaymentEvent, DepositCloseEvent, LoanFacilityContractRolloverEvent, RepurchaseOfferEvent, RepoPartialClosureEvent, RepoCashFlowEvent, FlexibleRepoInterestPaymentEvent, FlexibleRepoCashFlowEvent, FlexibleRepoCollateralEvent, ConversionEvent, FlexibleRepoPartialClosureEvent, FlexibleRepoFullClosureEvent, CapletFloorletCashFlowEvent")
36
37
  additional_properties: Dict[str, Any] = {}
37
- __properties = ["instrumentEventType", "paymentDate", "currency", "lapseElections", "fraction", "amount"]
38
+ __properties = ["instrumentEventType", "paymentDate", "currency", "lapseElections", "fraction", "amount", "withInterest"]
38
39
 
39
40
  @validator('instrument_event_type')
40
41
  def instrument_event_type_validate_enum(cls, value):
@@ -174,7 +175,8 @@ class LoanPrincipalRepaymentEvent(InstrumentEvent):
174
175
  "currency": obj.get("currency"),
175
176
  "lapse_elections": [LapseElection.from_dict(_item) for _item in obj.get("lapseElections")] if obj.get("lapseElections") is not None else None,
176
177
  "fraction": obj.get("fraction"),
177
- "amount": obj.get("amount")
178
+ "amount": obj.get("amount"),
179
+ "with_interest": obj.get("withInterest")
178
180
  })
179
181
  # store additional fields in additional_properties
180
182
  for _key in obj.keys():
@@ -0,0 +1,121 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.link import Link
24
+ from lusid.models.relational_data_point_response import RelationalDataPointResponse
25
+
26
+ class PagedResourceListOfRelationalDataPointResponse(BaseModel):
27
+ """
28
+ PagedResourceListOfRelationalDataPointResponse
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None,alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None,alias="previousPage")
32
+ values: conlist(RelationalDataPointResponse) = Field(...)
33
+ href: Optional[StrictStr] = Field(None,alias="href")
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["nextPage", "previousPage", "values", "href", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def __str__(self):
43
+ """For `print` and `pprint`"""
44
+ return pprint.pformat(self.dict(by_alias=False))
45
+
46
+ def __repr__(self):
47
+ """For `print` and `pprint`"""
48
+ return self.to_str()
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> PagedResourceListOfRelationalDataPointResponse:
60
+ """Create an instance of PagedResourceListOfRelationalDataPointResponse from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True,
66
+ exclude={
67
+ },
68
+ exclude_none=True)
69
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
70
+ _items = []
71
+ if self.values:
72
+ for _item in self.values:
73
+ if _item:
74
+ _items.append(_item.to_dict())
75
+ _dict['values'] = _items
76
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
77
+ _items = []
78
+ if self.links:
79
+ for _item in self.links:
80
+ if _item:
81
+ _items.append(_item.to_dict())
82
+ _dict['links'] = _items
83
+ # set to None if next_page (nullable) is None
84
+ # and __fields_set__ contains the field
85
+ if self.next_page is None and "next_page" in self.__fields_set__:
86
+ _dict['nextPage'] = None
87
+
88
+ # set to None if previous_page (nullable) is None
89
+ # and __fields_set__ contains the field
90
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
91
+ _dict['previousPage'] = None
92
+
93
+ # set to None if href (nullable) is None
94
+ # and __fields_set__ contains the field
95
+ if self.href is None and "href" in self.__fields_set__:
96
+ _dict['href'] = None
97
+
98
+ # set to None if links (nullable) is None
99
+ # and __fields_set__ contains the field
100
+ if self.links is None and "links" in self.__fields_set__:
101
+ _dict['links'] = None
102
+
103
+ return _dict
104
+
105
+ @classmethod
106
+ def from_dict(cls, obj: dict) -> PagedResourceListOfRelationalDataPointResponse:
107
+ """Create an instance of PagedResourceListOfRelationalDataPointResponse from a dict"""
108
+ if obj is None:
109
+ return None
110
+
111
+ if not isinstance(obj, dict):
112
+ return PagedResourceListOfRelationalDataPointResponse.parse_obj(obj)
113
+
114
+ _obj = PagedResourceListOfRelationalDataPointResponse.parse_obj({
115
+ "next_page": obj.get("nextPage"),
116
+ "previous_page": obj.get("previousPage"),
117
+ "values": [RelationalDataPointResponse.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
118
+ "href": obj.get("href"),
119
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
120
+ })
121
+ return _obj
@@ -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.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist, constr
23
+
24
+ class QueryRelationalDatasetRequest(BaseModel):
25
+ """
26
+ QueryRelationalDatasetRequest
27
+ """
28
+ query_method: StrictStr = Field(...,alias="queryMethod", description="The method used to query data points. Can be either 'Latest' or 'TimeSeries'.")
29
+ filter: Optional[StrictStr] = Field(None,alias="filter", description="Expression to filter the result set. For more information about filtering LUSID results, see https://support.lusid.com/knowledgebase/article/KA-01914.")
30
+ custom_sort_by: Optional[conlist(StrictStr)] = Field(None, alias="customSortBy", description="A list of fields to sort the results by. For example, to sort by a Value field 'AValueField' in descending order, specify 'AValueField DESC'.")
31
+ __properties = ["queryMethod", "filter", "customSortBy"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def __str__(self):
39
+ """For `print` and `pprint`"""
40
+ return pprint.pformat(self.dict(by_alias=False))
41
+
42
+ def __repr__(self):
43
+ """For `print` and `pprint`"""
44
+ return self.to_str()
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> QueryRelationalDatasetRequest:
56
+ """Create an instance of QueryRelationalDatasetRequest from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ # set to None if filter (nullable) is None
66
+ # and __fields_set__ contains the field
67
+ if self.filter is None and "filter" in self.__fields_set__:
68
+ _dict['filter'] = None
69
+
70
+ # set to None if custom_sort_by (nullable) is None
71
+ # and __fields_set__ contains the field
72
+ if self.custom_sort_by is None and "custom_sort_by" in self.__fields_set__:
73
+ _dict['customSortBy'] = None
74
+
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: dict) -> QueryRelationalDatasetRequest:
79
+ """Create an instance of QueryRelationalDatasetRequest from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return QueryRelationalDatasetRequest.parse_obj(obj)
85
+
86
+ _obj = QueryRelationalDatasetRequest.parse_obj({
87
+ "query_method": obj.get("queryMethod"),
88
+ "filter": obj.get("filter"),
89
+ "custom_sort_by": obj.get("customSortBy")
90
+ })
91
+ return _obj
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import StrictStr, Field, BaseModel, Field
23
+
24
+ class RelationalDataPointFieldValueResponse(BaseModel):
25
+ """
26
+ RelationalDataPointFieldValueResponse
27
+ """
28
+ value: Optional[Any] = Field(..., description="The value of the field.")
29
+ __properties = ["value"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+ allow_population_by_field_name = True
34
+ validate_assignment = True
35
+
36
+ def __str__(self):
37
+ """For `print` and `pprint`"""
38
+ return pprint.pformat(self.dict(by_alias=False))
39
+
40
+ def __repr__(self):
41
+ """For `print` and `pprint`"""
42
+ return self.to_str()
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.dict(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> RelationalDataPointFieldValueResponse:
54
+ """Create an instance of RelationalDataPointFieldValueResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self):
58
+ """Returns the dictionary representation of the model using alias"""
59
+ _dict = self.dict(by_alias=True,
60
+ exclude={
61
+ },
62
+ exclude_none=True)
63
+ # set to None if value (nullable) is None
64
+ # and __fields_set__ contains the field
65
+ if self.value is None and "value" in self.__fields_set__:
66
+ _dict['value'] = None
67
+
68
+ return _dict
69
+
70
+ @classmethod
71
+ def from_dict(cls, obj: dict) -> RelationalDataPointFieldValueResponse:
72
+ """Create an instance of RelationalDataPointFieldValueResponse from a dict"""
73
+ if obj is None:
74
+ return None
75
+
76
+ if not isinstance(obj, dict):
77
+ return RelationalDataPointFieldValueResponse.parse_obj(obj)
78
+
79
+ _obj = RelationalDataPointFieldValueResponse.parse_obj({
80
+ "value": obj.get("value")
81
+ })
82
+ return _obj