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