weheat 2025.1.14rc1__py3-none-any.whl → 2025.1.15__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 weheat might be problematic. Click here for more details.
- weheat/__init__.py +7 -2
- weheat/abstractions/discovery.py +6 -6
- weheat/abstractions/heat_pump.py +11 -15
- weheat/abstractions/user.py +7 -7
- weheat/api/__init__.py +1 -0
- weheat/api/energy_log_api.py +306 -132
- weheat/api/heat_pump_api.py +521 -369
- weheat/api/heat_pump_log_api.py +836 -359
- weheat/api/user_api.py +243 -115
- weheat/api_client.py +234 -261
- weheat/api_response.py +10 -18
- weheat/configuration.py +14 -9
- weheat/exceptions.py +59 -25
- weheat/models/__init__.py +6 -0
- weheat/models/boiler_type.py +8 -3
- weheat/models/device_state.py +9 -4
- weheat/models/dhw_type.py +8 -3
- weheat/models/energy_view_dto.py +81 -66
- weheat/models/heat_pump_log_view_dto.py +527 -481
- weheat/models/heat_pump_model.py +8 -3
- weheat/models/heat_pump_status_enum.py +8 -3
- weheat/models/heat_pump_type.py +8 -3
- weheat/models/raw_heat_pump_log_dto.py +353 -315
- weheat/models/read_all_heat_pump_dto.py +64 -48
- weheat/models/read_heat_pump_dto.py +59 -43
- weheat/models/read_user_dto.py +54 -39
- weheat/models/read_user_me_dto.py +124 -0
- weheat/models/role.py +10 -4
- weheat/rest.py +152 -259
- weheat-2025.1.15.dist-info/METADATA +115 -0
- weheat-2025.1.15.dist-info/RECORD +37 -0
- weheat-2025.1.14rc1.dist-info/METADATA +0 -117
- weheat-2025.1.14rc1.dist-info/RECORD +0 -36
- {weheat-2025.1.14rc1.dist-info → weheat-2025.1.15.dist-info}/LICENSE +0 -0
- {weheat-2025.1.14rc1.dist-info → weheat-2025.1.15.dist-info}/WHEEL +0 -0
- {weheat-2025.1.14rc1.dist-info → weheat-2025.1.15.dist-info}/top_level.txt +0 -0
weheat/api/heat_pump_api.py
CHANGED
|
@@ -12,16 +12,20 @@
|
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
import re # noqa: F401
|
|
16
15
|
import io
|
|
17
16
|
import warnings
|
|
18
17
|
|
|
18
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
19
|
+
from typing import Dict, List, Optional, Tuple, Union, Any
|
|
20
|
+
|
|
19
21
|
try:
|
|
20
|
-
from
|
|
22
|
+
from typing import Annotated
|
|
21
23
|
except ImportError:
|
|
22
|
-
from
|
|
24
|
+
from typing_extensions import Annotated
|
|
23
25
|
|
|
26
|
+
from pydantic import Field
|
|
24
27
|
from typing_extensions import Annotated
|
|
28
|
+
from pydantic import StrictInt, StrictStr
|
|
25
29
|
|
|
26
30
|
from typing import List, Optional
|
|
27
31
|
|
|
@@ -31,10 +35,7 @@ from weheat.models.read_heat_pump_dto import ReadHeatPumpDto
|
|
|
31
35
|
|
|
32
36
|
from weheat.api_client import ApiClient
|
|
33
37
|
from weheat.api_response import ApiResponse
|
|
34
|
-
from weheat.
|
|
35
|
-
ApiTypeError,
|
|
36
|
-
ApiValueError
|
|
37
|
-
)
|
|
38
|
+
from weheat.rest import RESTResponseType
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
class HeatPumpApi:
|
|
@@ -49,15 +50,31 @@ class HeatPumpApi:
|
|
|
49
50
|
api_client = ApiClient.get_default()
|
|
50
51
|
self.api_client = api_client
|
|
51
52
|
|
|
52
|
-
@validate_arguments
|
|
53
|
-
def api_v1_heat_pumps_get(self, search : Annotated[Optional[StrictStr], Field(description="String with keywords (split by spaces) to search on SN, PN and Name of a heat pump")] = None, page : Annotated[Optional[StrictInt], Field(description="The page number")] = None, page_size : Annotated[Optional[StrictInt], Field(description="The page size")] = None, state : Annotated[Optional[DeviceState], Field(description="Filter for which device state the heat pump should be in using Device")] = None, x_version : Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None, **kwargs) -> List[ReadAllHeatPumpDto]: # noqa: E501
|
|
54
|
-
"""Gets all heat pumps (Paged, Searchable) # noqa: E501
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
@validate_call
|
|
55
|
+
async def api_v1_heat_pumps_get(
|
|
56
|
+
self,
|
|
57
|
+
search: Annotated[Optional[StrictStr], Field(description="String with keywords (split by spaces) to search on SN, PN and Name of a heat pump")] = None,
|
|
58
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number")] = None,
|
|
59
|
+
page_size: Annotated[Optional[StrictInt], Field(description="The page size")] = None,
|
|
60
|
+
state: Annotated[Optional[DeviceState], Field(description="Filter for which device state the heat pump should be in using Device")] = None,
|
|
61
|
+
generic_model: Annotated[Optional[StrictStr], Field(description="Filter for which generic model the heat pump should have")] = None,
|
|
62
|
+
x_version: Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None,
|
|
63
|
+
_request_timeout: Union[
|
|
64
|
+
None,
|
|
65
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
66
|
+
Tuple[
|
|
67
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
68
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
69
|
+
]
|
|
70
|
+
] = None,
|
|
71
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
72
|
+
_content_type: Optional[StrictStr] = None,
|
|
73
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
74
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
75
|
+
) -> List[ReadAllHeatPumpDto]:
|
|
76
|
+
"""Gets all heat pumps (Paged, Searchable)
|
|
58
77
|
|
|
59
|
-
>>> thread = api.api_v1_heat_pumps_get(search, page, page_size, state, x_version, async_req=True)
|
|
60
|
-
>>> result = thread.get()
|
|
61
78
|
|
|
62
79
|
:param search: String with keywords (split by spaces) to search on SN, PN and Name of a heat pump
|
|
63
80
|
:type search: str
|
|
@@ -67,34 +84,86 @@ class HeatPumpApi:
|
|
|
67
84
|
:type page_size: int
|
|
68
85
|
:param state: Filter for which device state the heat pump should be in using Device
|
|
69
86
|
:type state: DeviceState
|
|
87
|
+
:param generic_model: Filter for which generic model the heat pump should have
|
|
88
|
+
:type generic_model: str
|
|
70
89
|
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
71
90
|
:type x_version: str
|
|
72
|
-
:param
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
92
|
+
number provided, it will be total request
|
|
93
|
+
timeout. It can also be a pair (tuple) of
|
|
94
|
+
(connection, read) timeouts.
|
|
95
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
96
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
97
|
+
request; this effectively ignores the
|
|
98
|
+
authentication in the spec for a single request.
|
|
99
|
+
:type _request_auth: dict, optional
|
|
100
|
+
:param _content_type: force content-type for the request.
|
|
101
|
+
:type _content_type: str, Optional
|
|
102
|
+
:param _headers: set to override the headers for a single
|
|
103
|
+
request; this effectively ignores the headers
|
|
104
|
+
in the spec for a single request.
|
|
105
|
+
:type _headers: dict, optional
|
|
106
|
+
:param _host_index: set to override the host_index for a single
|
|
107
|
+
request; this effectively ignores the host_index
|
|
108
|
+
in the spec for a single request.
|
|
109
|
+
:type _host_index: int, optional
|
|
78
110
|
:return: Returns the result object.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
111
|
+
""" # noqa: E501
|
|
112
|
+
|
|
113
|
+
_param = self._api_v1_heat_pumps_get_serialize(
|
|
114
|
+
search=search,
|
|
115
|
+
page=page,
|
|
116
|
+
page_size=page_size,
|
|
117
|
+
state=state,
|
|
118
|
+
generic_model=generic_model,
|
|
119
|
+
x_version=x_version,
|
|
120
|
+
_request_auth=_request_auth,
|
|
121
|
+
_content_type=_content_type,
|
|
122
|
+
_headers=_headers,
|
|
123
|
+
_host_index=_host_index
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
127
|
+
'403': "str",
|
|
128
|
+
'500': None,
|
|
129
|
+
'505': None,
|
|
130
|
+
'200': "List[ReadAllHeatPumpDto]",
|
|
131
|
+
}
|
|
132
|
+
response_data = await self.api_client.call_api(
|
|
133
|
+
*_param,
|
|
134
|
+
_request_timeout=_request_timeout
|
|
135
|
+
)
|
|
136
|
+
await response_data.read()
|
|
137
|
+
return self.api_client.response_deserialize(
|
|
138
|
+
response_data=response_data,
|
|
139
|
+
response_types_map=_response_types_map,
|
|
140
|
+
).data
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@validate_call
|
|
144
|
+
async def api_v1_heat_pumps_get_with_http_info(
|
|
145
|
+
self,
|
|
146
|
+
search: Annotated[Optional[StrictStr], Field(description="String with keywords (split by spaces) to search on SN, PN and Name of a heat pump")] = None,
|
|
147
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number")] = None,
|
|
148
|
+
page_size: Annotated[Optional[StrictInt], Field(description="The page size")] = None,
|
|
149
|
+
state: Annotated[Optional[DeviceState], Field(description="Filter for which device state the heat pump should be in using Device")] = None,
|
|
150
|
+
generic_model: Annotated[Optional[StrictStr], Field(description="Filter for which generic model the heat pump should have")] = None,
|
|
151
|
+
x_version: Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None,
|
|
152
|
+
_request_timeout: Union[
|
|
153
|
+
None,
|
|
154
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
155
|
+
Tuple[
|
|
156
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
157
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
158
|
+
]
|
|
159
|
+
] = None,
|
|
160
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
161
|
+
_content_type: Optional[StrictStr] = None,
|
|
162
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
163
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
164
|
+
) -> ApiResponse[List[ReadAllHeatPumpDto]]:
|
|
165
|
+
"""Gets all heat pumps (Paged, Searchable)
|
|
166
|
+
|
|
98
167
|
|
|
99
168
|
:param search: String with keywords (split by spaces) to search on SN, PN and Name of a heat pump
|
|
100
169
|
:type search: str
|
|
@@ -104,429 +173,512 @@ class HeatPumpApi:
|
|
|
104
173
|
:type page_size: int
|
|
105
174
|
:param state: Filter for which device state the heat pump should be in using Device
|
|
106
175
|
:type state: DeviceState
|
|
176
|
+
:param generic_model: Filter for which generic model the heat pump should have
|
|
177
|
+
:type generic_model: str
|
|
107
178
|
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
108
179
|
:type x_version: str
|
|
109
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
110
|
-
:type async_req: bool, optional
|
|
111
|
-
:param _preload_content: if False, the ApiResponse.data will
|
|
112
|
-
be set to none and raw_data will store the
|
|
113
|
-
HTTP response body without reading/decoding.
|
|
114
|
-
Default is True.
|
|
115
|
-
:type _preload_content: bool, optional
|
|
116
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
|
117
|
-
object with status code, headers, etc
|
|
118
|
-
:type _return_http_data_only: bool, optional
|
|
119
180
|
:param _request_timeout: timeout setting for this request. If one
|
|
120
181
|
number provided, it will be total request
|
|
121
182
|
timeout. It can also be a pair (tuple) of
|
|
122
183
|
(connection, read) timeouts.
|
|
184
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
123
185
|
:param _request_auth: set to override the auth_settings for an a single
|
|
124
|
-
request; this effectively ignores the
|
|
125
|
-
in the spec for a single request.
|
|
186
|
+
request; this effectively ignores the
|
|
187
|
+
authentication in the spec for a single request.
|
|
126
188
|
:type _request_auth: dict, optional
|
|
127
|
-
:
|
|
189
|
+
:param _content_type: force content-type for the request.
|
|
190
|
+
:type _content_type: str, Optional
|
|
191
|
+
:param _headers: set to override the headers for a single
|
|
192
|
+
request; this effectively ignores the headers
|
|
193
|
+
in the spec for a single request.
|
|
194
|
+
:type _headers: dict, optional
|
|
195
|
+
:param _host_index: set to override the host_index for a single
|
|
196
|
+
request; this effectively ignores the host_index
|
|
197
|
+
in the spec for a single request.
|
|
198
|
+
:type _host_index: int, optional
|
|
128
199
|
:return: Returns the result object.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
]
|
|
143
|
-
_all_params.extend(
|
|
144
|
-
[
|
|
145
|
-
'async_req',
|
|
146
|
-
'_return_http_data_only',
|
|
147
|
-
'_preload_content',
|
|
148
|
-
'_request_timeout',
|
|
149
|
-
'_request_auth',
|
|
150
|
-
'_content_type',
|
|
151
|
-
'_headers'
|
|
152
|
-
]
|
|
200
|
+
""" # noqa: E501
|
|
201
|
+
|
|
202
|
+
_param = self._api_v1_heat_pumps_get_serialize(
|
|
203
|
+
search=search,
|
|
204
|
+
page=page,
|
|
205
|
+
page_size=page_size,
|
|
206
|
+
state=state,
|
|
207
|
+
generic_model=generic_model,
|
|
208
|
+
x_version=x_version,
|
|
209
|
+
_request_auth=_request_auth,
|
|
210
|
+
_content_type=_content_type,
|
|
211
|
+
_headers=_headers,
|
|
212
|
+
_host_index=_host_index
|
|
153
213
|
)
|
|
154
214
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
215
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
216
|
+
'403': "str",
|
|
217
|
+
'500': None,
|
|
218
|
+
'505': None,
|
|
219
|
+
'200': "List[ReadAllHeatPumpDto]",
|
|
220
|
+
}
|
|
221
|
+
response_data = await self.api_client.call_api(
|
|
222
|
+
*_param,
|
|
223
|
+
_request_timeout=_request_timeout
|
|
224
|
+
)
|
|
225
|
+
await response_data.read()
|
|
226
|
+
return self.api_client.response_deserialize(
|
|
227
|
+
response_data=response_data,
|
|
228
|
+
response_types_map=_response_types_map,
|
|
229
|
+
)
|
|
164
230
|
|
|
165
|
-
_collection_formats = {}
|
|
166
231
|
|
|
167
|
-
|
|
168
|
-
|
|
232
|
+
@validate_call
|
|
233
|
+
async def api_v1_heat_pumps_get_without_preload_content(
|
|
234
|
+
self,
|
|
235
|
+
search: Annotated[Optional[StrictStr], Field(description="String with keywords (split by spaces) to search on SN, PN and Name of a heat pump")] = None,
|
|
236
|
+
page: Annotated[Optional[StrictInt], Field(description="The page number")] = None,
|
|
237
|
+
page_size: Annotated[Optional[StrictInt], Field(description="The page size")] = None,
|
|
238
|
+
state: Annotated[Optional[DeviceState], Field(description="Filter for which device state the heat pump should be in using Device")] = None,
|
|
239
|
+
generic_model: Annotated[Optional[StrictStr], Field(description="Filter for which generic model the heat pump should have")] = None,
|
|
240
|
+
x_version: Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None,
|
|
241
|
+
_request_timeout: Union[
|
|
242
|
+
None,
|
|
243
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
244
|
+
Tuple[
|
|
245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
246
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
247
|
+
]
|
|
248
|
+
] = None,
|
|
249
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
250
|
+
_content_type: Optional[StrictStr] = None,
|
|
251
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
252
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
253
|
+
) -> RESTResponseType:
|
|
254
|
+
"""Gets all heat pumps (Paged, Searchable)
|
|
169
255
|
|
|
170
|
-
# process the query parameters
|
|
171
|
-
_query_params = []
|
|
172
|
-
if _params.get('search') is not None: # noqa: E501
|
|
173
|
-
_query_params.append(('search', _params['search']))
|
|
174
256
|
|
|
175
|
-
|
|
176
|
-
|
|
257
|
+
:param search: String with keywords (split by spaces) to search on SN, PN and Name of a heat pump
|
|
258
|
+
:type search: str
|
|
259
|
+
:param page: The page number
|
|
260
|
+
:type page: int
|
|
261
|
+
:param page_size: The page size
|
|
262
|
+
:type page_size: int
|
|
263
|
+
:param state: Filter for which device state the heat pump should be in using Device
|
|
264
|
+
:type state: DeviceState
|
|
265
|
+
:param generic_model: Filter for which generic model the heat pump should have
|
|
266
|
+
:type generic_model: str
|
|
267
|
+
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
268
|
+
:type x_version: str
|
|
269
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
270
|
+
number provided, it will be total request
|
|
271
|
+
timeout. It can also be a pair (tuple) of
|
|
272
|
+
(connection, read) timeouts.
|
|
273
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
274
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
275
|
+
request; this effectively ignores the
|
|
276
|
+
authentication in the spec for a single request.
|
|
277
|
+
:type _request_auth: dict, optional
|
|
278
|
+
:param _content_type: force content-type for the request.
|
|
279
|
+
:type _content_type: str, Optional
|
|
280
|
+
:param _headers: set to override the headers for a single
|
|
281
|
+
request; this effectively ignores the headers
|
|
282
|
+
in the spec for a single request.
|
|
283
|
+
:type _headers: dict, optional
|
|
284
|
+
:param _host_index: set to override the host_index for a single
|
|
285
|
+
request; this effectively ignores the host_index
|
|
286
|
+
in the spec for a single request.
|
|
287
|
+
:type _host_index: int, optional
|
|
288
|
+
:return: Returns the result object.
|
|
289
|
+
""" # noqa: E501
|
|
290
|
+
|
|
291
|
+
_param = self._api_v1_heat_pumps_get_serialize(
|
|
292
|
+
search=search,
|
|
293
|
+
page=page,
|
|
294
|
+
page_size=page_size,
|
|
295
|
+
state=state,
|
|
296
|
+
generic_model=generic_model,
|
|
297
|
+
x_version=x_version,
|
|
298
|
+
_request_auth=_request_auth,
|
|
299
|
+
_content_type=_content_type,
|
|
300
|
+
_headers=_headers,
|
|
301
|
+
_host_index=_host_index
|
|
302
|
+
)
|
|
177
303
|
|
|
178
|
-
|
|
179
|
-
|
|
304
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
305
|
+
'403': "str",
|
|
306
|
+
'500': None,
|
|
307
|
+
'505': None,
|
|
308
|
+
'200': "List[ReadAllHeatPumpDto]",
|
|
309
|
+
}
|
|
310
|
+
response_data = await self.api_client.call_api(
|
|
311
|
+
*_param,
|
|
312
|
+
_request_timeout=_request_timeout
|
|
313
|
+
)
|
|
314
|
+
return response_data.response
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def _api_v1_heat_pumps_get_serialize(
|
|
318
|
+
self,
|
|
319
|
+
search,
|
|
320
|
+
page,
|
|
321
|
+
page_size,
|
|
322
|
+
state,
|
|
323
|
+
generic_model,
|
|
324
|
+
x_version,
|
|
325
|
+
_request_auth,
|
|
326
|
+
_content_type,
|
|
327
|
+
_headers,
|
|
328
|
+
_host_index,
|
|
329
|
+
) -> Tuple:
|
|
330
|
+
|
|
331
|
+
_host = None
|
|
332
|
+
|
|
333
|
+
_collection_formats: Dict[str, str] = {
|
|
334
|
+
}
|
|
180
335
|
|
|
181
|
-
|
|
182
|
-
|
|
336
|
+
_path_params: Dict[str, str] = {}
|
|
337
|
+
_query_params: List[Tuple[str, str]] = []
|
|
338
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
339
|
+
_form_params: List[Tuple[str, str]] = []
|
|
340
|
+
_files: Dict[str, str] = {}
|
|
341
|
+
_body_params: Optional[bytes] = None
|
|
183
342
|
|
|
343
|
+
# process the path parameters
|
|
344
|
+
# process the query parameters
|
|
345
|
+
if search is not None:
|
|
346
|
+
|
|
347
|
+
_query_params.append(('search', search))
|
|
348
|
+
|
|
349
|
+
if page is not None:
|
|
350
|
+
|
|
351
|
+
_query_params.append(('page', page))
|
|
352
|
+
|
|
353
|
+
if page_size is not None:
|
|
354
|
+
|
|
355
|
+
_query_params.append(('pageSize', page_size))
|
|
356
|
+
|
|
357
|
+
if state is not None:
|
|
358
|
+
|
|
359
|
+
_query_params.append(('state', state.value))
|
|
360
|
+
|
|
361
|
+
if generic_model is not None:
|
|
362
|
+
|
|
363
|
+
_query_params.append(('genericModel', generic_model))
|
|
364
|
+
|
|
184
365
|
# process the header parameters
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
_header_params['x-version'] = _params['x_version']
|
|
188
|
-
|
|
366
|
+
if x_version is not None:
|
|
367
|
+
_header_params['x-version'] = x_version
|
|
189
368
|
# process the form parameters
|
|
190
|
-
_form_params = []
|
|
191
|
-
_files = {}
|
|
192
369
|
# process the body parameter
|
|
193
|
-
|
|
370
|
+
|
|
371
|
+
|
|
194
372
|
# set the HTTP header `Accept`
|
|
195
373
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
196
|
-
[
|
|
374
|
+
[
|
|
375
|
+
'text/plain',
|
|
376
|
+
'application/json',
|
|
377
|
+
'text/json'
|
|
378
|
+
]
|
|
379
|
+
)
|
|
197
380
|
|
|
198
|
-
# authentication setting
|
|
199
|
-
_auth_settings = ['oauth2'] # noqa: E501
|
|
200
381
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
'
|
|
204
|
-
|
|
205
|
-
'500': None,
|
|
206
|
-
}
|
|
382
|
+
# authentication setting
|
|
383
|
+
_auth_settings: List[str] = [
|
|
384
|
+
'oauth2'
|
|
385
|
+
]
|
|
207
386
|
|
|
208
|
-
return self.api_client.
|
|
209
|
-
'
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
387
|
+
return self.api_client.param_serialize(
|
|
388
|
+
method='GET',
|
|
389
|
+
resource_path='/api/v1/heat-pumps',
|
|
390
|
+
path_params=_path_params,
|
|
391
|
+
query_params=_query_params,
|
|
392
|
+
header_params=_header_params,
|
|
213
393
|
body=_body_params,
|
|
214
394
|
post_params=_form_params,
|
|
215
395
|
files=_files,
|
|
216
|
-
response_types_map=_response_types_map,
|
|
217
396
|
auth_settings=_auth_settings,
|
|
218
|
-
async_req=_params.get('async_req'),
|
|
219
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
220
|
-
_preload_content=_params.get('_preload_content', True),
|
|
221
|
-
_request_timeout=_params.get('_request_timeout'),
|
|
222
397
|
collection_formats=_collection_formats,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
398
|
+
_host=_host,
|
|
399
|
+
_request_auth=_request_auth
|
|
400
|
+
)
|
|
226
401
|
|
|
227
|
-
@validate_arguments
|
|
228
|
-
def api_v1_heat_pumps_heat_pump_id_get(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The heatPumpId of the heat pump you want to get")], x_version : Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None, **kwargs) -> ReadHeatPumpDto: # noqa: E501
|
|
229
|
-
"""Gets a heat pump by heatPumpId # noqa: E501
|
|
230
402
|
|
|
231
|
-
|
|
232
|
-
|
|
403
|
+
@validate_call
|
|
404
|
+
async def api_v1_heat_pumps_heat_pump_id_get(
|
|
405
|
+
self,
|
|
406
|
+
heat_pump_id: Annotated[StrictStr, Field(description="The heatPumpId of the heat pump you want to get")],
|
|
407
|
+
x_version: Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None,
|
|
408
|
+
_request_timeout: Union[
|
|
409
|
+
None,
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
411
|
+
Tuple[
|
|
412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
413
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
414
|
+
]
|
|
415
|
+
] = None,
|
|
416
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
417
|
+
_content_type: Optional[StrictStr] = None,
|
|
418
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
420
|
+
) -> ReadHeatPumpDto:
|
|
421
|
+
"""Gets a heat pump by heatPumpId
|
|
233
422
|
|
|
234
|
-
>>> thread = api.api_v1_heat_pumps_heat_pump_id_get(heat_pump_id, x_version, async_req=True)
|
|
235
|
-
>>> result = thread.get()
|
|
236
423
|
|
|
237
424
|
:param heat_pump_id: The heatPumpId of the heat pump you want to get (required)
|
|
238
425
|
:type heat_pump_id: str
|
|
239
426
|
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
240
427
|
:type x_version: str
|
|
241
|
-
:param
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
428
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
429
|
+
number provided, it will be total request
|
|
430
|
+
timeout. It can also be a pair (tuple) of
|
|
431
|
+
(connection, read) timeouts.
|
|
432
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
433
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
434
|
+
request; this effectively ignores the
|
|
435
|
+
authentication in the spec for a single request.
|
|
436
|
+
:type _request_auth: dict, optional
|
|
437
|
+
:param _content_type: force content-type for the request.
|
|
438
|
+
:type _content_type: str, Optional
|
|
439
|
+
:param _headers: set to override the headers for a single
|
|
440
|
+
request; this effectively ignores the headers
|
|
441
|
+
in the spec for a single request.
|
|
442
|
+
:type _headers: dict, optional
|
|
443
|
+
:param _host_index: set to override the host_index for a single
|
|
444
|
+
request; this effectively ignores the host_index
|
|
445
|
+
in the spec for a single request.
|
|
446
|
+
:type _host_index: int, optional
|
|
247
447
|
:return: Returns the result object.
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
448
|
+
""" # noqa: E501
|
|
449
|
+
|
|
450
|
+
_param = self._api_v1_heat_pumps_heat_pump_id_get_serialize(
|
|
451
|
+
heat_pump_id=heat_pump_id,
|
|
452
|
+
x_version=x_version,
|
|
453
|
+
_request_auth=_request_auth,
|
|
454
|
+
_content_type=_content_type,
|
|
455
|
+
_headers=_headers,
|
|
456
|
+
_host_index=_host_index
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
460
|
+
'403': "str",
|
|
461
|
+
'500': None,
|
|
462
|
+
'505': None,
|
|
463
|
+
'200': "ReadHeatPumpDto",
|
|
464
|
+
'404': None,
|
|
465
|
+
}
|
|
466
|
+
response_data = await self.api_client.call_api(
|
|
467
|
+
*_param,
|
|
468
|
+
_request_timeout=_request_timeout
|
|
469
|
+
)
|
|
470
|
+
await response_data.read()
|
|
471
|
+
return self.api_client.response_deserialize(
|
|
472
|
+
response_data=response_data,
|
|
473
|
+
response_types_map=_response_types_map,
|
|
474
|
+
).data
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
@validate_call
|
|
478
|
+
async def api_v1_heat_pumps_heat_pump_id_get_with_http_info(
|
|
479
|
+
self,
|
|
480
|
+
heat_pump_id: Annotated[StrictStr, Field(description="The heatPumpId of the heat pump you want to get")],
|
|
481
|
+
x_version: Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None,
|
|
482
|
+
_request_timeout: Union[
|
|
483
|
+
None,
|
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
485
|
+
Tuple[
|
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
487
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
488
|
+
]
|
|
489
|
+
] = None,
|
|
490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
491
|
+
_content_type: Optional[StrictStr] = None,
|
|
492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
494
|
+
) -> ApiResponse[ReadHeatPumpDto]:
|
|
495
|
+
"""Gets a heat pump by heatPumpId
|
|
496
|
+
|
|
267
497
|
|
|
268
498
|
:param heat_pump_id: The heatPumpId of the heat pump you want to get (required)
|
|
269
499
|
:type heat_pump_id: str
|
|
270
500
|
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
271
501
|
:type x_version: str
|
|
272
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
273
|
-
:type async_req: bool, optional
|
|
274
|
-
:param _preload_content: if False, the ApiResponse.data will
|
|
275
|
-
be set to none and raw_data will store the
|
|
276
|
-
HTTP response body without reading/decoding.
|
|
277
|
-
Default is True.
|
|
278
|
-
:type _preload_content: bool, optional
|
|
279
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
|
280
|
-
object with status code, headers, etc
|
|
281
|
-
:type _return_http_data_only: bool, optional
|
|
282
502
|
:param _request_timeout: timeout setting for this request. If one
|
|
283
503
|
number provided, it will be total request
|
|
284
504
|
timeout. It can also be a pair (tuple) of
|
|
285
505
|
(connection, read) timeouts.
|
|
506
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
286
507
|
:param _request_auth: set to override the auth_settings for an a single
|
|
287
|
-
request; this effectively ignores the
|
|
288
|
-
in the spec for a single request.
|
|
508
|
+
request; this effectively ignores the
|
|
509
|
+
authentication in the spec for a single request.
|
|
289
510
|
:type _request_auth: dict, optional
|
|
290
|
-
:
|
|
511
|
+
:param _content_type: force content-type for the request.
|
|
512
|
+
:type _content_type: str, Optional
|
|
513
|
+
:param _headers: set to override the headers for a single
|
|
514
|
+
request; this effectively ignores the headers
|
|
515
|
+
in the spec for a single request.
|
|
516
|
+
:type _headers: dict, optional
|
|
517
|
+
:param _host_index: set to override the host_index for a single
|
|
518
|
+
request; this effectively ignores the host_index
|
|
519
|
+
in the spec for a single request.
|
|
520
|
+
:type _host_index: int, optional
|
|
291
521
|
:return: Returns the result object.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
'x_version'
|
|
302
|
-
]
|
|
303
|
-
_all_params.extend(
|
|
304
|
-
[
|
|
305
|
-
'async_req',
|
|
306
|
-
'_return_http_data_only',
|
|
307
|
-
'_preload_content',
|
|
308
|
-
'_request_timeout',
|
|
309
|
-
'_request_auth',
|
|
310
|
-
'_content_type',
|
|
311
|
-
'_headers'
|
|
312
|
-
]
|
|
522
|
+
""" # noqa: E501
|
|
523
|
+
|
|
524
|
+
_param = self._api_v1_heat_pumps_heat_pump_id_get_serialize(
|
|
525
|
+
heat_pump_id=heat_pump_id,
|
|
526
|
+
x_version=x_version,
|
|
527
|
+
_request_auth=_request_auth,
|
|
528
|
+
_content_type=_content_type,
|
|
529
|
+
_headers=_headers,
|
|
530
|
+
_host_index=_host_index
|
|
313
531
|
)
|
|
314
532
|
|
|
315
|
-
|
|
316
|
-
for _key, _val in _params['kwargs'].items():
|
|
317
|
-
if _key not in _all_params:
|
|
318
|
-
raise ApiTypeError(
|
|
319
|
-
"Got an unexpected keyword argument '%s'"
|
|
320
|
-
" to method api_v1_heat_pumps_heat_pump_id_get" % _key
|
|
321
|
-
)
|
|
322
|
-
_params[_key] = _val
|
|
323
|
-
del _params['kwargs']
|
|
324
|
-
|
|
325
|
-
_collection_formats = {}
|
|
326
|
-
|
|
327
|
-
# process the path parameters
|
|
328
|
-
_path_params = {}
|
|
329
|
-
if _params['heat_pump_id'] is not None:
|
|
330
|
-
_path_params['heatPumpId'] = _params['heat_pump_id']
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
# process the query parameters
|
|
334
|
-
_query_params = []
|
|
335
|
-
# process the header parameters
|
|
336
|
-
_header_params = dict(_params.get('_headers', {}))
|
|
337
|
-
if _params['x_version'] is not None:
|
|
338
|
-
_header_params['x-version'] = _params['x_version']
|
|
339
|
-
|
|
340
|
-
# process the form parameters
|
|
341
|
-
_form_params = []
|
|
342
|
-
_files = {}
|
|
343
|
-
# process the body parameter
|
|
344
|
-
_body_params = None
|
|
345
|
-
# set the HTTP header `Accept`
|
|
346
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
347
|
-
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
|
348
|
-
|
|
349
|
-
# authentication setting
|
|
350
|
-
_auth_settings = ['oauth2'] # noqa: E501
|
|
351
|
-
|
|
352
|
-
_response_types_map = {
|
|
533
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
353
534
|
'403': "str",
|
|
535
|
+
'500': None,
|
|
354
536
|
'505': None,
|
|
355
537
|
'200': "ReadHeatPumpDto",
|
|
356
538
|
'404': None,
|
|
357
|
-
'500': None,
|
|
358
539
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
post_params=_form_params,
|
|
367
|
-
files=_files,
|
|
540
|
+
response_data = await self.api_client.call_api(
|
|
541
|
+
*_param,
|
|
542
|
+
_request_timeout=_request_timeout
|
|
543
|
+
)
|
|
544
|
+
await response_data.read()
|
|
545
|
+
return self.api_client.response_deserialize(
|
|
546
|
+
response_data=response_data,
|
|
368
547
|
response_types_map=_response_types_map,
|
|
369
|
-
|
|
370
|
-
async_req=_params.get('async_req'),
|
|
371
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
372
|
-
_preload_content=_params.get('_preload_content', True),
|
|
373
|
-
_request_timeout=_params.get('_request_timeout'),
|
|
374
|
-
collection_formats=_collection_formats,
|
|
375
|
-
_request_auth=_params.get('_request_auth'))
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
548
|
+
)
|
|
381
549
|
|
|
382
|
-
@validate_arguments
|
|
383
|
-
def api_v1_heat_pumps_sn_serial_number_get(self, serial_number : Annotated[StrictStr, Field(..., description="The serial number of the heat pump you want to get")], x_version : Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None, **kwargs) -> ReadHeatPumpDto: # noqa: E501
|
|
384
|
-
"""Gets a heat pump by Serial Number # noqa: E501
|
|
385
550
|
|
|
386
|
-
|
|
387
|
-
|
|
551
|
+
@validate_call
|
|
552
|
+
async def api_v1_heat_pumps_heat_pump_id_get_without_preload_content(
|
|
553
|
+
self,
|
|
554
|
+
heat_pump_id: Annotated[StrictStr, Field(description="The heatPumpId of the heat pump you want to get")],
|
|
555
|
+
x_version: Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None,
|
|
556
|
+
_request_timeout: Union[
|
|
557
|
+
None,
|
|
558
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
559
|
+
Tuple[
|
|
560
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
561
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
562
|
+
]
|
|
563
|
+
] = None,
|
|
564
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
565
|
+
_content_type: Optional[StrictStr] = None,
|
|
566
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
567
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
568
|
+
) -> RESTResponseType:
|
|
569
|
+
"""Gets a heat pump by heatPumpId
|
|
388
570
|
|
|
389
|
-
>>> thread = api.api_v1_heat_pumps_sn_serial_number_get(serial_number, x_version, async_req=True)
|
|
390
|
-
>>> result = thread.get()
|
|
391
571
|
|
|
392
|
-
:param
|
|
393
|
-
:type
|
|
394
|
-
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
395
|
-
:type x_version: str
|
|
396
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
397
|
-
:type async_req: bool, optional
|
|
398
|
-
:param _request_timeout: timeout setting for this request.
|
|
399
|
-
If one number provided, it will be total request
|
|
400
|
-
timeout. It can also be a pair (tuple) of
|
|
401
|
-
(connection, read) timeouts.
|
|
402
|
-
:return: Returns the result object.
|
|
403
|
-
If the method is called asynchronously,
|
|
404
|
-
returns the request thread.
|
|
405
|
-
:rtype: ReadHeatPumpDto
|
|
406
|
-
"""
|
|
407
|
-
kwargs['_return_http_data_only'] = True
|
|
408
|
-
if '_preload_content' in kwargs:
|
|
409
|
-
message = "Error! Please call the api_v1_heat_pumps_sn_serial_number_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
410
|
-
raise ValueError(message)
|
|
411
|
-
return self.api_v1_heat_pumps_sn_serial_number_get_with_http_info(serial_number, x_version, **kwargs) # noqa: E501
|
|
412
|
-
|
|
413
|
-
@validate_arguments
|
|
414
|
-
def api_v1_heat_pumps_sn_serial_number_get_with_http_info(self, serial_number : Annotated[StrictStr, Field(..., description="The serial number of the heat pump you want to get")], x_version : Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
415
|
-
"""Gets a heat pump by Serial Number # noqa: E501
|
|
416
|
-
|
|
417
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
418
|
-
asynchronous HTTP request, please pass async_req=True
|
|
419
|
-
|
|
420
|
-
>>> thread = api.api_v1_heat_pumps_sn_serial_number_get_with_http_info(serial_number, x_version, async_req=True)
|
|
421
|
-
>>> result = thread.get()
|
|
422
|
-
|
|
423
|
-
:param serial_number: The serial number of the heat pump you want to get (required)
|
|
424
|
-
:type serial_number: str
|
|
572
|
+
:param heat_pump_id: The heatPumpId of the heat pump you want to get (required)
|
|
573
|
+
:type heat_pump_id: str
|
|
425
574
|
:param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
|
|
426
575
|
:type x_version: str
|
|
427
|
-
:param async_req: Whether to execute the request asynchronously.
|
|
428
|
-
:type async_req: bool, optional
|
|
429
|
-
:param _preload_content: if False, the ApiResponse.data will
|
|
430
|
-
be set to none and raw_data will store the
|
|
431
|
-
HTTP response body without reading/decoding.
|
|
432
|
-
Default is True.
|
|
433
|
-
:type _preload_content: bool, optional
|
|
434
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
|
435
|
-
object with status code, headers, etc
|
|
436
|
-
:type _return_http_data_only: bool, optional
|
|
437
576
|
:param _request_timeout: timeout setting for this request. If one
|
|
438
577
|
number provided, it will be total request
|
|
439
578
|
timeout. It can also be a pair (tuple) of
|
|
440
579
|
(connection, read) timeouts.
|
|
580
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
441
581
|
:param _request_auth: set to override the auth_settings for an a single
|
|
442
|
-
request; this effectively ignores the
|
|
443
|
-
in the spec for a single request.
|
|
582
|
+
request; this effectively ignores the
|
|
583
|
+
authentication in the spec for a single request.
|
|
444
584
|
:type _request_auth: dict, optional
|
|
445
|
-
:
|
|
585
|
+
:param _content_type: force content-type for the request.
|
|
586
|
+
:type _content_type: str, Optional
|
|
587
|
+
:param _headers: set to override the headers for a single
|
|
588
|
+
request; this effectively ignores the headers
|
|
589
|
+
in the spec for a single request.
|
|
590
|
+
:type _headers: dict, optional
|
|
591
|
+
:param _host_index: set to override the host_index for a single
|
|
592
|
+
request; this effectively ignores the host_index
|
|
593
|
+
in the spec for a single request.
|
|
594
|
+
:type _host_index: int, optional
|
|
446
595
|
:return: Returns the result object.
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
596
|
+
""" # noqa: E501
|
|
597
|
+
|
|
598
|
+
_param = self._api_v1_heat_pumps_heat_pump_id_get_serialize(
|
|
599
|
+
heat_pump_id=heat_pump_id,
|
|
600
|
+
x_version=x_version,
|
|
601
|
+
_request_auth=_request_auth,
|
|
602
|
+
_content_type=_content_type,
|
|
603
|
+
_headers=_headers,
|
|
604
|
+
_host_index=_host_index
|
|
605
|
+
)
|
|
453
606
|
|
|
454
|
-
|
|
455
|
-
'
|
|
456
|
-
'
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
'_request_auth',
|
|
465
|
-
'_content_type',
|
|
466
|
-
'_headers'
|
|
467
|
-
]
|
|
607
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
608
|
+
'403': "str",
|
|
609
|
+
'500': None,
|
|
610
|
+
'505': None,
|
|
611
|
+
'200': "ReadHeatPumpDto",
|
|
612
|
+
'404': None,
|
|
613
|
+
}
|
|
614
|
+
response_data = await self.api_client.call_api(
|
|
615
|
+
*_param,
|
|
616
|
+
_request_timeout=_request_timeout
|
|
468
617
|
)
|
|
618
|
+
return response_data.response
|
|
469
619
|
|
|
470
|
-
# validate the arguments
|
|
471
|
-
for _key, _val in _params['kwargs'].items():
|
|
472
|
-
if _key not in _all_params:
|
|
473
|
-
raise ApiTypeError(
|
|
474
|
-
"Got an unexpected keyword argument '%s'"
|
|
475
|
-
" to method api_v1_heat_pumps_sn_serial_number_get" % _key
|
|
476
|
-
)
|
|
477
|
-
_params[_key] = _val
|
|
478
|
-
del _params['kwargs']
|
|
479
620
|
|
|
480
|
-
|
|
621
|
+
def _api_v1_heat_pumps_heat_pump_id_get_serialize(
|
|
622
|
+
self,
|
|
623
|
+
heat_pump_id,
|
|
624
|
+
x_version,
|
|
625
|
+
_request_auth,
|
|
626
|
+
_content_type,
|
|
627
|
+
_headers,
|
|
628
|
+
_host_index,
|
|
629
|
+
) -> Tuple:
|
|
481
630
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
631
|
+
_host = None
|
|
632
|
+
|
|
633
|
+
_collection_formats: Dict[str, str] = {
|
|
634
|
+
}
|
|
486
635
|
|
|
636
|
+
_path_params: Dict[str, str] = {}
|
|
637
|
+
_query_params: List[Tuple[str, str]] = []
|
|
638
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
639
|
+
_form_params: List[Tuple[str, str]] = []
|
|
640
|
+
_files: Dict[str, str] = {}
|
|
641
|
+
_body_params: Optional[bytes] = None
|
|
487
642
|
|
|
643
|
+
# process the path parameters
|
|
644
|
+
if heat_pump_id is not None:
|
|
645
|
+
_path_params['heatPumpId'] = heat_pump_id
|
|
488
646
|
# process the query parameters
|
|
489
|
-
_query_params = []
|
|
490
647
|
# process the header parameters
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
_header_params['x-version'] = _params['x_version']
|
|
494
|
-
|
|
648
|
+
if x_version is not None:
|
|
649
|
+
_header_params['x-version'] = x_version
|
|
495
650
|
# process the form parameters
|
|
496
|
-
_form_params = []
|
|
497
|
-
_files = {}
|
|
498
651
|
# process the body parameter
|
|
499
|
-
|
|
652
|
+
|
|
653
|
+
|
|
500
654
|
# set the HTTP header `Accept`
|
|
501
655
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
502
|
-
[
|
|
656
|
+
[
|
|
657
|
+
'text/plain',
|
|
658
|
+
'application/json',
|
|
659
|
+
'text/json'
|
|
660
|
+
]
|
|
661
|
+
)
|
|
503
662
|
|
|
504
|
-
# authentication setting
|
|
505
|
-
_auth_settings = ['oauth2'] # noqa: E501
|
|
506
663
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
'
|
|
510
|
-
|
|
511
|
-
'404': None,
|
|
512
|
-
'500': None,
|
|
513
|
-
}
|
|
664
|
+
# authentication setting
|
|
665
|
+
_auth_settings: List[str] = [
|
|
666
|
+
'oauth2'
|
|
667
|
+
]
|
|
514
668
|
|
|
515
|
-
return self.api_client.
|
|
516
|
-
'
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
669
|
+
return self.api_client.param_serialize(
|
|
670
|
+
method='GET',
|
|
671
|
+
resource_path='/api/v1/heat-pumps/{heatPumpId}',
|
|
672
|
+
path_params=_path_params,
|
|
673
|
+
query_params=_query_params,
|
|
674
|
+
header_params=_header_params,
|
|
520
675
|
body=_body_params,
|
|
521
676
|
post_params=_form_params,
|
|
522
677
|
files=_files,
|
|
523
|
-
response_types_map=_response_types_map,
|
|
524
678
|
auth_settings=_auth_settings,
|
|
525
|
-
async_req=_params.get('async_req'),
|
|
526
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
527
|
-
_preload_content=_params.get('_preload_content', True),
|
|
528
|
-
_request_timeout=_params.get('_request_timeout'),
|
|
529
679
|
collection_formats=_collection_formats,
|
|
530
|
-
|
|
680
|
+
_host=_host,
|
|
681
|
+
_request_auth=_request_auth
|
|
682
|
+
)
|
|
531
683
|
|
|
532
684
|
|