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