weheat 2024.7.8__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.

@@ -0,0 +1,553 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Weheat Backend
5
+
6
+ This is the backend for the Weheat project
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import re # noqa: F401
16
+ import io
17
+ import warnings
18
+
19
+ from pydantic import validate_arguments, ValidationError
20
+
21
+ from typing_extensions import Annotated
22
+ from datetime import datetime
23
+
24
+ from pydantic import Field, StrictStr
25
+
26
+ from typing import List, Optional
27
+
28
+ from weheat.models.heat_pump_log_view_dto import HeatPumpLogViewDto
29
+ from weheat.models.raw_heat_pump_log_dto import RawHeatPumpLogDto
30
+
31
+ from weheat.api_client import ApiClient
32
+ from weheat.api_response import ApiResponse
33
+ from weheat.exceptions import ( # noqa: F401
34
+ ApiTypeError,
35
+ ApiValueError
36
+ )
37
+
38
+
39
+ class HeatPumpLogApi:
40
+ """NOTE: This class is auto generated by OpenAPI Generator
41
+ Ref: https://openapi-generator.tech
42
+
43
+ Do not edit the class manually.
44
+ """
45
+
46
+ def __init__(self, api_client=None) -> None:
47
+ if api_client is None:
48
+ api_client = ApiClient.get_default()
49
+ self.api_client = api_client
50
+
51
+ @validate_arguments
52
+ def api_v1_heat_pumps_heat_pump_id_logs_get(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The id of the heat pump")], start_time : Annotated[Optional[datetime], Field(description="Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, end_time : Annotated[Optional[datetime], Field(description="End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, interval : Annotated[Optional[StrictStr], Field(description="Interval granularity of the log data, allowed intervals: \"Minute\", \"FiveMinute\", \"FifteenMinute\", \"Hour\", \"Day\", \"Week\", \"Month\", \"Year\"")] = 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[HeatPumpLogViewDto]: # noqa: E501
53
+ """Gets the heat pump logs of the heat pump in a from start time to end time for a given interval Correct Intervals include: Minute, FiveMinute, FifteenMinute, Hour, Day, Week, Month, Year Limits for these intervals are: 2 days, 1 week, 1 month, 1 month, 1 year, 2 years, 5 years, 100 years # noqa: E501
54
+
55
+ This method makes a synchronous HTTP request by default. To make an
56
+ asynchronous HTTP request, please pass async_req=True
57
+
58
+ >>> thread = api.api_v1_heat_pumps_heat_pump_id_logs_get(heat_pump_id, start_time, end_time, interval, x_version, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ :param heat_pump_id: The id of the heat pump (required)
62
+ :type heat_pump_id: str
63
+ :param start_time: Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
64
+ :type start_time: datetime
65
+ :param end_time: End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
66
+ :type end_time: datetime
67
+ :param interval: Interval granularity of the log data, allowed intervals: \"Minute\", \"FiveMinute\", \"FifteenMinute\", \"Hour\", \"Day\", \"Week\", \"Month\", \"Year\"
68
+ :type interval: str
69
+ :param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
70
+ :type x_version: str
71
+ :param async_req: Whether to execute the request asynchronously.
72
+ :type async_req: bool, optional
73
+ :param _request_timeout: timeout setting for this request.
74
+ If one number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :return: Returns the result object.
78
+ If the method is called asynchronously,
79
+ returns the request thread.
80
+ :rtype: List[HeatPumpLogViewDto]
81
+ """
82
+ kwargs['_return_http_data_only'] = True
83
+ if '_preload_content' in kwargs:
84
+ message = "Error! Please call the api_v1_heat_pumps_heat_pump_id_logs_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
85
+ raise ValueError(message)
86
+ return self.api_v1_heat_pumps_heat_pump_id_logs_get_with_http_info(heat_pump_id, start_time, end_time, interval, x_version, **kwargs) # noqa: E501
87
+
88
+ @validate_arguments
89
+ def api_v1_heat_pumps_heat_pump_id_logs_get_with_http_info(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The id of the heat pump")], start_time : Annotated[Optional[datetime], Field(description="Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, end_time : Annotated[Optional[datetime], Field(description="End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, interval : Annotated[Optional[StrictStr], Field(description="Interval granularity of the log data, allowed intervals: \"Minute\", \"FiveMinute\", \"FifteenMinute\", \"Hour\", \"Day\", \"Week\", \"Month\", \"Year\"")] = None, 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
90
+ """Gets the heat pump logs of the heat pump in a from start time to end time for a given interval Correct Intervals include: Minute, FiveMinute, FifteenMinute, Hour, Day, Week, Month, Year Limits for these intervals are: 2 days, 1 week, 1 month, 1 month, 1 year, 2 years, 5 years, 100 years # noqa: E501
91
+
92
+ This method makes a synchronous HTTP request by default. To make an
93
+ asynchronous HTTP request, please pass async_req=True
94
+
95
+ >>> thread = api.api_v1_heat_pumps_heat_pump_id_logs_get_with_http_info(heat_pump_id, start_time, end_time, interval, x_version, async_req=True)
96
+ >>> result = thread.get()
97
+
98
+ :param heat_pump_id: The id of the heat pump (required)
99
+ :type heat_pump_id: str
100
+ :param start_time: Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
101
+ :type start_time: datetime
102
+ :param end_time: End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
103
+ :type end_time: datetime
104
+ :param interval: Interval granularity of the log data, allowed intervals: \"Minute\", \"FiveMinute\", \"FifteenMinute\", \"Hour\", \"Day\", \"Week\", \"Month\", \"Year\"
105
+ :type interval: str
106
+ :param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
107
+ :type x_version: str
108
+ :param async_req: Whether to execute the request asynchronously.
109
+ :type async_req: bool, optional
110
+ :param _preload_content: if False, the ApiResponse.data will
111
+ be set to none and raw_data will store the
112
+ HTTP response body without reading/decoding.
113
+ Default is True.
114
+ :type _preload_content: bool, optional
115
+ :param _return_http_data_only: response data instead of ApiResponse
116
+ object with status code, headers, etc
117
+ :type _return_http_data_only: bool, optional
118
+ :param _request_timeout: timeout setting for this request. If one
119
+ number provided, it will be total request
120
+ timeout. It can also be a pair (tuple) of
121
+ (connection, read) timeouts.
122
+ :param _request_auth: set to override the auth_settings for an a single
123
+ request; this effectively ignores the authentication
124
+ in the spec for a single request.
125
+ :type _request_auth: dict, optional
126
+ :type _content_type: string, optional: force content-type for the request
127
+ :return: Returns the result object.
128
+ If the method is called asynchronously,
129
+ returns the request thread.
130
+ :rtype: tuple(List[HeatPumpLogViewDto], status_code(int), headers(HTTPHeaderDict))
131
+ """
132
+
133
+ _params = locals()
134
+
135
+ _all_params = [
136
+ 'heat_pump_id',
137
+ 'start_time',
138
+ 'end_time',
139
+ 'interval',
140
+ 'x_version'
141
+ ]
142
+ _all_params.extend(
143
+ [
144
+ 'async_req',
145
+ '_return_http_data_only',
146
+ '_preload_content',
147
+ '_request_timeout',
148
+ '_request_auth',
149
+ '_content_type',
150
+ '_headers'
151
+ ]
152
+ )
153
+
154
+ # validate the arguments
155
+ for _key, _val in _params['kwargs'].items():
156
+ if _key not in _all_params:
157
+ raise ApiTypeError(
158
+ "Got an unexpected keyword argument '%s'"
159
+ " to method api_v1_heat_pumps_heat_pump_id_logs_get" % _key
160
+ )
161
+ _params[_key] = _val
162
+ del _params['kwargs']
163
+
164
+ _collection_formats = {}
165
+
166
+ # process the path parameters
167
+ _path_params = {}
168
+ if _params['heat_pump_id'] is not None:
169
+ _path_params['heatPumpId'] = _params['heat_pump_id']
170
+
171
+
172
+ # process the query parameters
173
+ _query_params = []
174
+ if _params.get('start_time') is not None: # noqa: E501
175
+ if isinstance(_params['start_time'], datetime):
176
+ _query_params.append(('startTime', _params['start_time'].strftime(self.api_client.configuration.datetime_format)))
177
+ else:
178
+ _query_params.append(('startTime', _params['start_time']))
179
+
180
+ if _params.get('end_time') is not None: # noqa: E501
181
+ if isinstance(_params['end_time'], datetime):
182
+ _query_params.append(('endTime', _params['end_time'].strftime(self.api_client.configuration.datetime_format)))
183
+ else:
184
+ _query_params.append(('endTime', _params['end_time']))
185
+
186
+ if _params.get('interval') is not None: # noqa: E501
187
+ _query_params.append(('interval', _params['interval']))
188
+
189
+ # process the header parameters
190
+ _header_params = dict(_params.get('_headers', {}))
191
+ if _params['x_version'] is not None:
192
+ _header_params['x-version'] = _params['x_version']
193
+
194
+ # process the form parameters
195
+ _form_params = []
196
+ _files = {}
197
+ # process the body parameter
198
+ _body_params = None
199
+ # set the HTTP header `Accept`
200
+ _header_params['Accept'] = self.api_client.select_header_accept(
201
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
202
+
203
+ # authentication setting
204
+ _auth_settings = ['oauth2'] # noqa: E501
205
+
206
+ _response_types_map = {
207
+ '403': "str",
208
+ '505': None,
209
+ '200': "List[HeatPumpLogViewDto]",
210
+ '400': None,
211
+ '404': None,
212
+ '500': None,
213
+ }
214
+
215
+ return self.api_client.call_api(
216
+ '/api/v1/heat-pumps/{heatPumpId}/logs', 'GET',
217
+ _path_params,
218
+ _query_params,
219
+ _header_params,
220
+ body=_body_params,
221
+ post_params=_form_params,
222
+ files=_files,
223
+ response_types_map=_response_types_map,
224
+ auth_settings=_auth_settings,
225
+ async_req=_params.get('async_req'),
226
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
227
+ _preload_content=_params.get('_preload_content', True),
228
+ _request_timeout=_params.get('_request_timeout'),
229
+ collection_formats=_collection_formats,
230
+ _request_auth=_params.get('_request_auth'))
231
+
232
+ @validate_arguments
233
+ def api_v1_heat_pumps_heat_pump_id_logs_latest_get(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The id of the heat pump")], x_version : Annotated[Optional[StrictStr], Field(description="Optional version parameter for frontend applications to check if an update / refresh is needed")] = None, **kwargs) -> RawHeatPumpLogDto: # noqa: E501
234
+ """Gets the latest raw heat pump log of the heat pump # noqa: E501
235
+
236
+ This method makes a synchronous HTTP request by default. To make an
237
+ asynchronous HTTP request, please pass async_req=True
238
+
239
+ >>> thread = api.api_v1_heat_pumps_heat_pump_id_logs_latest_get(heat_pump_id, x_version, async_req=True)
240
+ >>> result = thread.get()
241
+
242
+ :param heat_pump_id: The id of the heat pump (required)
243
+ :type heat_pump_id: str
244
+ :param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
245
+ :type x_version: str
246
+ :param async_req: Whether to execute the request asynchronously.
247
+ :type async_req: bool, optional
248
+ :param _request_timeout: timeout setting for this request.
249
+ If one number provided, it will be total request
250
+ timeout. It can also be a pair (tuple) of
251
+ (connection, read) timeouts.
252
+ :return: Returns the result object.
253
+ If the method is called asynchronously,
254
+ returns the request thread.
255
+ :rtype: RawHeatPumpLogDto
256
+ """
257
+ kwargs['_return_http_data_only'] = True
258
+ if '_preload_content' in kwargs:
259
+ message = "Error! Please call the api_v1_heat_pumps_heat_pump_id_logs_latest_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
260
+ raise ValueError(message)
261
+ return self.api_v1_heat_pumps_heat_pump_id_logs_latest_get_with_http_info(heat_pump_id, x_version, **kwargs) # noqa: E501
262
+
263
+ @validate_arguments
264
+ def api_v1_heat_pumps_heat_pump_id_logs_latest_get_with_http_info(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The id of the heat pump")], 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
265
+ """Gets the latest raw heat pump log of the heat pump # noqa: E501
266
+
267
+ This method makes a synchronous HTTP request by default. To make an
268
+ asynchronous HTTP request, please pass async_req=True
269
+
270
+ >>> thread = api.api_v1_heat_pumps_heat_pump_id_logs_latest_get_with_http_info(heat_pump_id, x_version, async_req=True)
271
+ >>> result = thread.get()
272
+
273
+ :param heat_pump_id: The id of the heat pump (required)
274
+ :type heat_pump_id: str
275
+ :param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
276
+ :type x_version: str
277
+ :param async_req: Whether to execute the request asynchronously.
278
+ :type async_req: bool, optional
279
+ :param _preload_content: if False, the ApiResponse.data will
280
+ be set to none and raw_data will store the
281
+ HTTP response body without reading/decoding.
282
+ Default is True.
283
+ :type _preload_content: bool, optional
284
+ :param _return_http_data_only: response data instead of ApiResponse
285
+ object with status code, headers, etc
286
+ :type _return_http_data_only: bool, optional
287
+ :param _request_timeout: timeout setting for this request. If one
288
+ number provided, it will be total request
289
+ timeout. It can also be a pair (tuple) of
290
+ (connection, read) timeouts.
291
+ :param _request_auth: set to override the auth_settings for an a single
292
+ request; this effectively ignores the authentication
293
+ in the spec for a single request.
294
+ :type _request_auth: dict, optional
295
+ :type _content_type: string, optional: force content-type for the request
296
+ :return: Returns the result object.
297
+ If the method is called asynchronously,
298
+ returns the request thread.
299
+ :rtype: tuple(RawHeatPumpLogDto, status_code(int), headers(HTTPHeaderDict))
300
+ """
301
+
302
+ _params = locals()
303
+
304
+ _all_params = [
305
+ 'heat_pump_id',
306
+ 'x_version'
307
+ ]
308
+ _all_params.extend(
309
+ [
310
+ 'async_req',
311
+ '_return_http_data_only',
312
+ '_preload_content',
313
+ '_request_timeout',
314
+ '_request_auth',
315
+ '_content_type',
316
+ '_headers'
317
+ ]
318
+ )
319
+
320
+ # validate the arguments
321
+ for _key, _val in _params['kwargs'].items():
322
+ if _key not in _all_params:
323
+ raise ApiTypeError(
324
+ "Got an unexpected keyword argument '%s'"
325
+ " to method api_v1_heat_pumps_heat_pump_id_logs_latest_get" % _key
326
+ )
327
+ _params[_key] = _val
328
+ del _params['kwargs']
329
+
330
+ _collection_formats = {}
331
+
332
+ # process the path parameters
333
+ _path_params = {}
334
+ if _params['heat_pump_id'] is not None:
335
+ _path_params['heatPumpId'] = _params['heat_pump_id']
336
+
337
+
338
+ # process the query parameters
339
+ _query_params = []
340
+ # process the header parameters
341
+ _header_params = dict(_params.get('_headers', {}))
342
+ if _params['x_version'] is not None:
343
+ _header_params['x-version'] = _params['x_version']
344
+
345
+ # process the form parameters
346
+ _form_params = []
347
+ _files = {}
348
+ # process the body parameter
349
+ _body_params = None
350
+ # set the HTTP header `Accept`
351
+ _header_params['Accept'] = self.api_client.select_header_accept(
352
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
353
+
354
+ # authentication setting
355
+ _auth_settings = ['oauth2'] # noqa: E501
356
+
357
+ _response_types_map = {
358
+ '403': "str",
359
+ '505': None,
360
+ '200': "RawHeatPumpLogDto",
361
+ '404': None,
362
+ '500': None,
363
+ }
364
+
365
+ return self.api_client.call_api(
366
+ '/api/v1/heat-pumps/{heatPumpId}/logs/latest', 'GET',
367
+ _path_params,
368
+ _query_params,
369
+ _header_params,
370
+ body=_body_params,
371
+ post_params=_form_params,
372
+ files=_files,
373
+ response_types_map=_response_types_map,
374
+ auth_settings=_auth_settings,
375
+ async_req=_params.get('async_req'),
376
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
377
+ _preload_content=_params.get('_preload_content', True),
378
+ _request_timeout=_params.get('_request_timeout'),
379
+ collection_formats=_collection_formats,
380
+ _request_auth=_params.get('_request_auth'))
381
+
382
+ @validate_arguments
383
+ def api_v1_heat_pumps_heat_pump_id_logs_raw_get(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The id of the heat pump")], start_time : Annotated[Optional[datetime], Field(description="Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, end_time : Annotated[Optional[datetime], Field(description="End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = 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[RawHeatPumpLogDto]: # noqa: E501
384
+ """Gets the raw heat pump logs of the heat pump in a from start time to end time for a given interval. Maximum interval is 4 hours. # noqa: E501
385
+
386
+ This method makes a synchronous HTTP request by default. To make an
387
+ asynchronous HTTP request, please pass async_req=True
388
+
389
+ >>> thread = api.api_v1_heat_pumps_heat_pump_id_logs_raw_get(heat_pump_id, start_time, end_time, x_version, async_req=True)
390
+ >>> result = thread.get()
391
+
392
+ :param heat_pump_id: The id of the heat pump (required)
393
+ :type heat_pump_id: str
394
+ :param start_time: Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
395
+ :type start_time: datetime
396
+ :param end_time: End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
397
+ :type end_time: datetime
398
+ :param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
399
+ :type x_version: str
400
+ :param async_req: Whether to execute the request asynchronously.
401
+ :type async_req: bool, optional
402
+ :param _request_timeout: timeout setting for this request.
403
+ If one number provided, it will be total request
404
+ timeout. It can also be a pair (tuple) of
405
+ (connection, read) timeouts.
406
+ :return: Returns the result object.
407
+ If the method is called asynchronously,
408
+ returns the request thread.
409
+ :rtype: List[RawHeatPumpLogDto]
410
+ """
411
+ kwargs['_return_http_data_only'] = True
412
+ if '_preload_content' in kwargs:
413
+ message = "Error! Please call the api_v1_heat_pumps_heat_pump_id_logs_raw_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
414
+ raise ValueError(message)
415
+ return self.api_v1_heat_pumps_heat_pump_id_logs_raw_get_with_http_info(heat_pump_id, start_time, end_time, x_version, **kwargs) # noqa: E501
416
+
417
+ @validate_arguments
418
+ def api_v1_heat_pumps_heat_pump_id_logs_raw_get_with_http_info(self, heat_pump_id : Annotated[StrictStr, Field(..., description="The id of the heat pump")], start_time : Annotated[Optional[datetime], Field(description="Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, end_time : Annotated[Optional[datetime], Field(description="End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)")] = None, 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
419
+ """Gets the raw heat pump logs of the heat pump in a from start time to end time for a given interval. Maximum interval is 4 hours. # noqa: E501
420
+
421
+ This method makes a synchronous HTTP request by default. To make an
422
+ asynchronous HTTP request, please pass async_req=True
423
+
424
+ >>> thread = api.api_v1_heat_pumps_heat_pump_id_logs_raw_get_with_http_info(heat_pump_id, start_time, end_time, x_version, async_req=True)
425
+ >>> result = thread.get()
426
+
427
+ :param heat_pump_id: The id of the heat pump (required)
428
+ :type heat_pump_id: str
429
+ :param start_time: Start time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
430
+ :type start_time: datetime
431
+ :param end_time: End time of the interval as a DateTime object in UTC (format: yyyy-MM-dd HH:mm:ss)
432
+ :type end_time: datetime
433
+ :param x_version: Optional version parameter for frontend applications to check if an update / refresh is needed
434
+ :type x_version: str
435
+ :param async_req: Whether to execute the request asynchronously.
436
+ :type async_req: bool, optional
437
+ :param _preload_content: if False, the ApiResponse.data will
438
+ be set to none and raw_data will store the
439
+ HTTP response body without reading/decoding.
440
+ Default is True.
441
+ :type _preload_content: bool, optional
442
+ :param _return_http_data_only: response data instead of ApiResponse
443
+ object with status code, headers, etc
444
+ :type _return_http_data_only: bool, optional
445
+ :param _request_timeout: timeout setting for this request. If one
446
+ number provided, it will be total request
447
+ timeout. It can also be a pair (tuple) of
448
+ (connection, read) timeouts.
449
+ :param _request_auth: set to override the auth_settings for an a single
450
+ request; this effectively ignores the authentication
451
+ in the spec for a single request.
452
+ :type _request_auth: dict, optional
453
+ :type _content_type: string, optional: force content-type for the request
454
+ :return: Returns the result object.
455
+ If the method is called asynchronously,
456
+ returns the request thread.
457
+ :rtype: tuple(List[RawHeatPumpLogDto], status_code(int), headers(HTTPHeaderDict))
458
+ """
459
+
460
+ _params = locals()
461
+
462
+ _all_params = [
463
+ 'heat_pump_id',
464
+ 'start_time',
465
+ 'end_time',
466
+ 'x_version'
467
+ ]
468
+ _all_params.extend(
469
+ [
470
+ 'async_req',
471
+ '_return_http_data_only',
472
+ '_preload_content',
473
+ '_request_timeout',
474
+ '_request_auth',
475
+ '_content_type',
476
+ '_headers'
477
+ ]
478
+ )
479
+
480
+ # validate the arguments
481
+ for _key, _val in _params['kwargs'].items():
482
+ if _key not in _all_params:
483
+ raise ApiTypeError(
484
+ "Got an unexpected keyword argument '%s'"
485
+ " to method api_v1_heat_pumps_heat_pump_id_logs_raw_get" % _key
486
+ )
487
+ _params[_key] = _val
488
+ del _params['kwargs']
489
+
490
+ _collection_formats = {}
491
+
492
+ # process the path parameters
493
+ _path_params = {}
494
+ if _params['heat_pump_id'] is not None:
495
+ _path_params['heatPumpId'] = _params['heat_pump_id']
496
+
497
+
498
+ # process the query parameters
499
+ _query_params = []
500
+ if _params.get('start_time') is not None: # noqa: E501
501
+ if isinstance(_params['start_time'], datetime):
502
+ _query_params.append(('startTime', _params['start_time'].strftime(self.api_client.configuration.datetime_format)))
503
+ else:
504
+ _query_params.append(('startTime', _params['start_time']))
505
+
506
+ if _params.get('end_time') is not None: # noqa: E501
507
+ if isinstance(_params['end_time'], datetime):
508
+ _query_params.append(('endTime', _params['end_time'].strftime(self.api_client.configuration.datetime_format)))
509
+ else:
510
+ _query_params.append(('endTime', _params['end_time']))
511
+
512
+ # process the header parameters
513
+ _header_params = dict(_params.get('_headers', {}))
514
+ if _params['x_version'] is not None:
515
+ _header_params['x-version'] = _params['x_version']
516
+
517
+ # process the form parameters
518
+ _form_params = []
519
+ _files = {}
520
+ # process the body parameter
521
+ _body_params = None
522
+ # set the HTTP header `Accept`
523
+ _header_params['Accept'] = self.api_client.select_header_accept(
524
+ ['text/plain', 'application/json', 'text/json']) # noqa: E501
525
+
526
+ # authentication setting
527
+ _auth_settings = ['oauth2'] # noqa: E501
528
+
529
+ _response_types_map = {
530
+ '403': "str",
531
+ '505': None,
532
+ '200': "List[RawHeatPumpLogDto]",
533
+ '400': None,
534
+ '404': None,
535
+ '500': None,
536
+ }
537
+
538
+ return self.api_client.call_api(
539
+ '/api/v1/heat-pumps/{heatPumpId}/logs/raw', 'GET',
540
+ _path_params,
541
+ _query_params,
542
+ _header_params,
543
+ body=_body_params,
544
+ post_params=_form_params,
545
+ files=_files,
546
+ response_types_map=_response_types_map,
547
+ auth_settings=_auth_settings,
548
+ async_req=_params.get('async_req'),
549
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
550
+ _preload_content=_params.get('_preload_content', True),
551
+ _request_timeout=_params.get('_request_timeout'),
552
+ collection_formats=_collection_formats,
553
+ _request_auth=_params.get('_request_auth'))