lusid-sdk 2.1.131__py3-none-any.whl → 2.1.138__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.

@@ -0,0 +1,163 @@
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, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, constr, validator
23
+ from lusid.models.day_month import DayMonth
24
+ from lusid.models.model_property import ModelProperty
25
+ from lusid.models.resource_id import ResourceId
26
+
27
+ class FeeRequest(BaseModel):
28
+ """
29
+ FeeRequest
30
+ """
31
+ fee_type: ResourceId = Field(..., alias="feeType")
32
+ name: constr(strict=True, max_length=256, min_length=1) = Field(..., description="The name of the Fee.")
33
+ description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fee.")
34
+ origin: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, description="The origin or source of the Fee accrual.")
35
+ calculation_base: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, alias="calculationBase", description="The calculation base for the Fee that is calculated using a percentage.")
36
+ accrual_currency: constr(strict=True, max_length=3, min_length=0) = Field(..., alias="accrualCurrency", description="The accrual currency.")
37
+ treatment: constr(strict=True, min_length=1) = Field(..., description="The accrual period of the Fee; 'Monthly' or 'Daily'.")
38
+ total_annual_accrual_amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="totalAnnualAccrualAmount", description="The total accrued amount for the Fee.")
39
+ fee_rate_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="feeRatePercentage", description="The fee rate percentage.")
40
+ payable_frequency: constr(strict=True, min_length=1) = Field(..., alias="payableFrequency", description="The payable frequency for the Fee; 'Annually', 'Quarterly' or 'Monthly'.")
41
+ business_day_convention: constr(strict=True, min_length=1) = Field(..., alias="businessDayConvention", description="The business day convention to use for Fee calculations on weekends.")
42
+ start_date: datetime = Field(..., alias="startDate", description="The start date of the Fee.")
43
+ end_date: Optional[datetime] = Field(None, alias="endDate", description="The end date of the Fee.")
44
+ anchor_date: Optional[DayMonth] = Field(None, alias="anchorDate")
45
+ properties: Optional[Dict[str, ModelProperty]] = Field(None, description="The Fee properties. These will be from the 'Fee' domain.")
46
+ __properties = ["feeType", "name", "description", "origin", "calculationBase", "accrualCurrency", "treatment", "totalAnnualAccrualAmount", "feeRatePercentage", "payableFrequency", "businessDayConvention", "startDate", "endDate", "anchorDate", "properties"]
47
+
48
+ @validator('description')
49
+ def description_validate_regular_expression(cls, value):
50
+ """Validates the regular expression"""
51
+ if value is None:
52
+ return value
53
+
54
+ if not re.match(r"^[\s\S]*$", value):
55
+ raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
56
+ return value
57
+
58
+ class Config:
59
+ """Pydantic configuration"""
60
+ allow_population_by_field_name = True
61
+ validate_assignment = True
62
+
63
+ def to_str(self) -> str:
64
+ """Returns the string representation of the model using alias"""
65
+ return pprint.pformat(self.dict(by_alias=True))
66
+
67
+ def to_json(self) -> str:
68
+ """Returns the JSON representation of the model using alias"""
69
+ return json.dumps(self.to_dict())
70
+
71
+ @classmethod
72
+ def from_json(cls, json_str: str) -> FeeRequest:
73
+ """Create an instance of FeeRequest from a JSON string"""
74
+ return cls.from_dict(json.loads(json_str))
75
+
76
+ def to_dict(self):
77
+ """Returns the dictionary representation of the model using alias"""
78
+ _dict = self.dict(by_alias=True,
79
+ exclude={
80
+ },
81
+ exclude_none=True)
82
+ # override the default output from pydantic by calling `to_dict()` of fee_type
83
+ if self.fee_type:
84
+ _dict['feeType'] = self.fee_type.to_dict()
85
+ # override the default output from pydantic by calling `to_dict()` of anchor_date
86
+ if self.anchor_date:
87
+ _dict['anchorDate'] = self.anchor_date.to_dict()
88
+ # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
89
+ _field_dict = {}
90
+ if self.properties:
91
+ for _key in self.properties:
92
+ if self.properties[_key]:
93
+ _field_dict[_key] = self.properties[_key].to_dict()
94
+ _dict['properties'] = _field_dict
95
+ # set to None if description (nullable) is None
96
+ # and __fields_set__ contains the field
97
+ if self.description is None and "description" in self.__fields_set__:
98
+ _dict['description'] = None
99
+
100
+ # set to None if origin (nullable) is None
101
+ # and __fields_set__ contains the field
102
+ if self.origin is None and "origin" in self.__fields_set__:
103
+ _dict['origin'] = None
104
+
105
+ # set to None if calculation_base (nullable) is None
106
+ # and __fields_set__ contains the field
107
+ if self.calculation_base is None and "calculation_base" in self.__fields_set__:
108
+ _dict['calculationBase'] = None
109
+
110
+ # set to None if total_annual_accrual_amount (nullable) is None
111
+ # and __fields_set__ contains the field
112
+ if self.total_annual_accrual_amount is None and "total_annual_accrual_amount" in self.__fields_set__:
113
+ _dict['totalAnnualAccrualAmount'] = None
114
+
115
+ # set to None if fee_rate_percentage (nullable) is None
116
+ # and __fields_set__ contains the field
117
+ if self.fee_rate_percentage is None and "fee_rate_percentage" in self.__fields_set__:
118
+ _dict['feeRatePercentage'] = None
119
+
120
+ # set to None if end_date (nullable) is None
121
+ # and __fields_set__ contains the field
122
+ if self.end_date is None and "end_date" in self.__fields_set__:
123
+ _dict['endDate'] = None
124
+
125
+ # set to None if properties (nullable) is None
126
+ # and __fields_set__ contains the field
127
+ if self.properties is None and "properties" in self.__fields_set__:
128
+ _dict['properties'] = None
129
+
130
+ return _dict
131
+
132
+ @classmethod
133
+ def from_dict(cls, obj: dict) -> FeeRequest:
134
+ """Create an instance of FeeRequest from a dict"""
135
+ if obj is None:
136
+ return None
137
+
138
+ if not isinstance(obj, dict):
139
+ return FeeRequest.parse_obj(obj)
140
+
141
+ _obj = FeeRequest.parse_obj({
142
+ "fee_type": ResourceId.from_dict(obj.get("feeType")) if obj.get("feeType") is not None else None,
143
+ "name": obj.get("name"),
144
+ "description": obj.get("description"),
145
+ "origin": obj.get("origin"),
146
+ "calculation_base": obj.get("calculationBase"),
147
+ "accrual_currency": obj.get("accrualCurrency"),
148
+ "treatment": obj.get("treatment"),
149
+ "total_annual_accrual_amount": obj.get("totalAnnualAccrualAmount"),
150
+ "fee_rate_percentage": obj.get("feeRatePercentage"),
151
+ "payable_frequency": obj.get("payableFrequency"),
152
+ "business_day_convention": obj.get("businessDayConvention"),
153
+ "start_date": obj.get("startDate"),
154
+ "end_date": obj.get("endDate"),
155
+ "anchor_date": DayMonth.from_dict(obj.get("anchorDate")) if obj.get("anchorDate") is not None else None,
156
+ "properties": dict(
157
+ (_k, ModelProperty.from_dict(_v))
158
+ for _k, _v in obj.get("properties").items()
159
+ )
160
+ if obj.get("properties") is not None
161
+ else None
162
+ })
163
+ 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
22
+ from pydantic.v1 import Field, StrictStr, constr, validator
23
+ from lusid.models.compliance_step_request import ComplianceStepRequest
24
+
25
+ class FilterStepRequest(ComplianceStepRequest):
26
+ """
27
+ FilterStepRequest
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")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties = ["complianceStepTypeRequest", "label"]
33
+
34
+ @validator('compliance_step_type_request')
35
+ def compliance_step_type_request_validate_enum(cls, value):
36
+ """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')")
39
+ return value
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
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) -> FilterStepRequest:
56
+ """Create an instance of FilterStepRequest 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
+ "additional_properties"
64
+ },
65
+ exclude_none=True)
66
+ # puts key-value pairs in additional_properties in the top level
67
+ if self.additional_properties is not None:
68
+ for _key, _value in self.additional_properties.items():
69
+ _dict[_key] = _value
70
+
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: dict) -> FilterStepRequest:
75
+ """Create an instance of FilterStepRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return FilterStepRequest.parse_obj(obj)
81
+
82
+ _obj = FilterStepRequest.parse_obj({
83
+ "compliance_step_type_request": obj.get("complianceStepTypeRequest"),
84
+ "label": obj.get("label")
85
+ })
86
+ # store additional fields in additional_properties
87
+ for _key in obj.keys():
88
+ if _key not in cls.__properties:
89
+ _obj.additional_properties[_key] = obj.get(_key)
90
+
91
+ 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
22
+ from pydantic.v1 import Field, StrictStr, constr, validator
23
+ from lusid.models.compliance_step_request import ComplianceStepRequest
24
+
25
+ class GroupByStepRequest(ComplianceStepRequest):
26
+ """
27
+ GroupByStepRequest
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")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties = ["complianceStepTypeRequest", "label"]
33
+
34
+ @validator('compliance_step_type_request')
35
+ def compliance_step_type_request_validate_enum(cls, value):
36
+ """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')")
39
+ return value
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
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) -> GroupByStepRequest:
56
+ """Create an instance of GroupByStepRequest 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
+ "additional_properties"
64
+ },
65
+ exclude_none=True)
66
+ # puts key-value pairs in additional_properties in the top level
67
+ if self.additional_properties is not None:
68
+ for _key, _value in self.additional_properties.items():
69
+ _dict[_key] = _value
70
+
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: dict) -> GroupByStepRequest:
75
+ """Create an instance of GroupByStepRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return GroupByStepRequest.parse_obj(obj)
81
+
82
+ _obj = GroupByStepRequest.parse_obj({
83
+ "compliance_step_type_request": obj.get("complianceStepTypeRequest"),
84
+ "label": obj.get("label")
85
+ })
86
+ # store additional fields in additional_properties
87
+ for _key in obj.keys():
88
+ if _key not in cls.__properties:
89
+ _obj.additional_properties[_key] = obj.get(_key)
90
+
91
+ 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
22
+ from pydantic.v1 import Field, StrictStr, constr, validator
23
+ from lusid.models.compliance_step_request import ComplianceStepRequest
24
+
25
+ class GroupFilterStepRequest(ComplianceStepRequest):
26
+ """
27
+ GroupFilterStepRequest
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")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties = ["complianceStepTypeRequest", "label"]
33
+
34
+ @validator('compliance_step_type_request')
35
+ def compliance_step_type_request_validate_enum(cls, value):
36
+ """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')")
39
+ return value
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
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) -> GroupFilterStepRequest:
56
+ """Create an instance of GroupFilterStepRequest 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
+ "additional_properties"
64
+ },
65
+ exclude_none=True)
66
+ # puts key-value pairs in additional_properties in the top level
67
+ if self.additional_properties is not None:
68
+ for _key, _value in self.additional_properties.items():
69
+ _dict[_key] = _value
70
+
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: dict) -> GroupFilterStepRequest:
75
+ """Create an instance of GroupFilterStepRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return GroupFilterStepRequest.parse_obj(obj)
81
+
82
+ _obj = GroupFilterStepRequest.parse_obj({
83
+ "compliance_step_type_request": obj.get("complianceStepTypeRequest"),
84
+ "label": obj.get("label")
85
+ })
86
+ # store additional fields in additional_properties
87
+ for _key in obj.keys():
88
+ if _key not in cls.__properties:
89
+ _obj.additional_properties[_key] = obj.get(_key)
90
+
91
+ 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
22
+ from pydantic.v1 import Field, StrictStr, constr, validator
23
+ from lusid.models.compliance_step_request import ComplianceStepRequest
24
+
25
+ class IntermediateComplianceStepRequest(ComplianceStepRequest):
26
+ """
27
+ IntermediateComplianceStepRequest
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")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties = ["complianceStepTypeRequest", "label"]
33
+
34
+ @validator('compliance_step_type_request')
35
+ def compliance_step_type_request_validate_enum(cls, value):
36
+ """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')")
39
+ return value
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
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) -> IntermediateComplianceStepRequest:
56
+ """Create an instance of IntermediateComplianceStepRequest 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
+ "additional_properties"
64
+ },
65
+ exclude_none=True)
66
+ # puts key-value pairs in additional_properties in the top level
67
+ if self.additional_properties is not None:
68
+ for _key, _value in self.additional_properties.items():
69
+ _dict[_key] = _value
70
+
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: dict) -> IntermediateComplianceStepRequest:
75
+ """Create an instance of IntermediateComplianceStepRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return IntermediateComplianceStepRequest.parse_obj(obj)
81
+
82
+ _obj = IntermediateComplianceStepRequest.parse_obj({
83
+ "compliance_step_type_request": obj.get("complianceStepTypeRequest"),
84
+ "label": obj.get("label")
85
+ })
86
+ # store additional fields in additional_properties
87
+ for _key in obj.keys():
88
+ if _key not in cls.__properties:
89
+ _obj.additional_properties[_key] = obj.get(_key)
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.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.fee import Fee
24
+ from lusid.models.link import Link
25
+
26
+ class PagedResourceListOfFee(BaseModel):
27
+ """
28
+ PagedResourceListOfFee
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
32
+ values: conlist(Fee) = 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) -> PagedResourceListOfFee:
52
+ """Create an instance of PagedResourceListOfFee 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) -> PagedResourceListOfFee:
99
+ """Create an instance of PagedResourceListOfFee from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return PagedResourceListOfFee.parse_obj(obj)
105
+
106
+ _obj = PagedResourceListOfFee.parse_obj({
107
+ "next_page": obj.get("nextPage"),
108
+ "previous_page": obj.get("previousPage"),
109
+ "values": [Fee.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