edms-client-api 1.0.1__py2-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 edms-client-api might be problematic. Click here for more details.
- edms_client_api/__init__.py +87 -0
- edms_client_api/api/__init__.py +6 -0
- edms_client_api/api/metadata_api.py +824 -0
- edms_client_api/api/time_series_api.py +988 -0
- edms_client_api/api_client.py +801 -0
- edms_client_api/api_response.py +21 -0
- edms_client_api/configuration.py +581 -0
- edms_client_api/exceptions.py +216 -0
- edms_client_api/models/__init__.py +35 -0
- edms_client_api/models/aggregation_type.py +39 -0
- edms_client_api/models/commodity_type.py +38 -0
- edms_client_api/models/data_type.py +39 -0
- edms_client_api/models/data_value_type.py +37 -0
- edms_client_api/models/dataset_configuration_dto.py +89 -0
- edms_client_api/models/dataset_metadata_column_dto.py +123 -0
- edms_client_api/models/dataset_metadata_dto.py +183 -0
- edms_client_api/models/gps_point_dto.py +89 -0
- edms_client_api/models/granularity_unit.py +42 -0
- edms_client_api/models/http_validation_problem_details.py +122 -0
- edms_client_api/models/place_category.py +43 -0
- edms_client_api/models/place_dto.py +110 -0
- edms_client_api/models/place_type.py +39 -0
- edms_client_api/models/problem_details.py +133 -0
- edms_client_api/models/scope.py +37 -0
- edms_client_api/models/time_zone.py +600 -0
- edms_client_api/models/unit_denominator.py +86 -0
- edms_client_api/models/unit_numerator.py +265 -0
- edms_client_api/models/validation_problem_details.py +122 -0
- edms_client_api/rest.py +258 -0
- edms_client_api-1.0.1.dist-info/METADATA +19 -0
- edms_client_api-1.0.1.dist-info/RECORD +33 -0
- edms_client_api-1.0.1.dist-info/WHEEL +5 -0
- edms_client_api-1.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,988 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
EDMS Client Api
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: development
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from edms_client_api.models.aggregation_type import AggregationType
|
|
24
|
+
from edms_client_api.models.granularity_unit import GranularityUnit
|
|
25
|
+
from edms_client_api.models.time_zone import TimeZone
|
|
26
|
+
|
|
27
|
+
from edms_client_api.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from edms_client_api.api_response import ApiResponse
|
|
29
|
+
from edms_client_api.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TimeSeriesApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
def time_series_get_time_serie_data(
|
|
47
|
+
self,
|
|
48
|
+
dataset_id: Annotated[StrictInt, Field(description="The id of the dataset (must be a timeseries dataset)")],
|
|
49
|
+
from_utc: Annotated[Optional[datetime], Field(description="Start of range (inclusive)")] = None,
|
|
50
|
+
to_utc: Annotated[Optional[datetime], Field(description="End of range (exclusive)")] = None,
|
|
51
|
+
from_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or greater (inclusive)")] = None,
|
|
52
|
+
to_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or smaller (exclusive)")] = None,
|
|
53
|
+
granularity_unit: Annotated[Optional[GranularityUnit], Field(description="Group by this interval")] = None,
|
|
54
|
+
granularity: Annotated[Optional[StrictInt], Field(description="Group by this interval")] = None,
|
|
55
|
+
time_zone: Annotated[Optional[TimeZone], Field(description="Timezone")] = None,
|
|
56
|
+
aggregation_type: Annotated[Optional[AggregationType], Field(description="Aggregation type")] = None,
|
|
57
|
+
configuration: Annotated[Optional[StrictStr], Field(description="Use this specific configuration")] = None,
|
|
58
|
+
all_versions: Annotated[Optional[StrictBool], Field(description="true = return all versions")] = None,
|
|
59
|
+
_request_timeout: Union[
|
|
60
|
+
None,
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
62
|
+
Tuple[
|
|
63
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
64
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
65
|
+
]
|
|
66
|
+
] = None,
|
|
67
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
+
_content_type: Optional[StrictStr] = None,
|
|
69
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
70
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
71
|
+
) -> List[Dict[str, object]]:
|
|
72
|
+
"""Get a list of timeseries values
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
:param dataset_id: The id of the dataset (must be a timeseries dataset) (required)
|
|
76
|
+
:type dataset_id: int
|
|
77
|
+
:param from_utc: Start of range (inclusive)
|
|
78
|
+
:type from_utc: datetime
|
|
79
|
+
:param to_utc: End of range (exclusive)
|
|
80
|
+
:type to_utc: datetime
|
|
81
|
+
:param from_version_utc: Only data with this version or greater (inclusive)
|
|
82
|
+
:type from_version_utc: datetime
|
|
83
|
+
:param to_version_utc: Only data with this version or smaller (exclusive)
|
|
84
|
+
:type to_version_utc: datetime
|
|
85
|
+
:param granularity_unit: Group by this interval
|
|
86
|
+
:type granularity_unit: GranularityUnit
|
|
87
|
+
:param granularity: Group by this interval
|
|
88
|
+
:type granularity: int
|
|
89
|
+
:param time_zone: Timezone
|
|
90
|
+
:type time_zone: TimeZone
|
|
91
|
+
:param aggregation_type: Aggregation type
|
|
92
|
+
:type aggregation_type: AggregationType
|
|
93
|
+
:param configuration: Use this specific configuration
|
|
94
|
+
:type configuration: str
|
|
95
|
+
:param all_versions: true = return all versions
|
|
96
|
+
:type all_versions: bool
|
|
97
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
98
|
+
number provided, it will be total request
|
|
99
|
+
timeout. It can also be a pair (tuple) of
|
|
100
|
+
(connection, read) timeouts.
|
|
101
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
102
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
103
|
+
request; this effectively ignores the
|
|
104
|
+
authentication in the spec for a single request.
|
|
105
|
+
:type _request_auth: dict, optional
|
|
106
|
+
:param _content_type: force content-type for the request.
|
|
107
|
+
:type _content_type: str, Optional
|
|
108
|
+
:param _headers: set to override the headers for a single
|
|
109
|
+
request; this effectively ignores the headers
|
|
110
|
+
in the spec for a single request.
|
|
111
|
+
:type _headers: dict, optional
|
|
112
|
+
:param _host_index: set to override the host_index for a single
|
|
113
|
+
request; this effectively ignores the host_index
|
|
114
|
+
in the spec for a single request.
|
|
115
|
+
:type _host_index: int, optional
|
|
116
|
+
:return: Returns the result object.
|
|
117
|
+
""" # noqa: E501
|
|
118
|
+
|
|
119
|
+
_param = self._time_series_get_time_serie_data_serialize(
|
|
120
|
+
dataset_id=dataset_id,
|
|
121
|
+
from_utc=from_utc,
|
|
122
|
+
to_utc=to_utc,
|
|
123
|
+
from_version_utc=from_version_utc,
|
|
124
|
+
to_version_utc=to_version_utc,
|
|
125
|
+
granularity_unit=granularity_unit,
|
|
126
|
+
granularity=granularity,
|
|
127
|
+
time_zone=time_zone,
|
|
128
|
+
aggregation_type=aggregation_type,
|
|
129
|
+
configuration=configuration,
|
|
130
|
+
all_versions=all_versions,
|
|
131
|
+
_request_auth=_request_auth,
|
|
132
|
+
_content_type=_content_type,
|
|
133
|
+
_headers=_headers,
|
|
134
|
+
_host_index=_host_index
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
138
|
+
'200': "List[Dict[str, object]]",
|
|
139
|
+
'429': "ProblemDetails",
|
|
140
|
+
'403': "ProblemDetails",
|
|
141
|
+
'422': "ValidationProblemDetails",
|
|
142
|
+
}
|
|
143
|
+
response_data = self.api_client.call_api(
|
|
144
|
+
*_param,
|
|
145
|
+
_request_timeout=_request_timeout
|
|
146
|
+
)
|
|
147
|
+
response_data.read()
|
|
148
|
+
return self.api_client.response_deserialize(
|
|
149
|
+
response_data=response_data,
|
|
150
|
+
response_types_map=_response_types_map,
|
|
151
|
+
).data
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
@validate_call
|
|
155
|
+
def time_series_get_time_serie_data_with_http_info(
|
|
156
|
+
self,
|
|
157
|
+
dataset_id: Annotated[StrictInt, Field(description="The id of the dataset (must be a timeseries dataset)")],
|
|
158
|
+
from_utc: Annotated[Optional[datetime], Field(description="Start of range (inclusive)")] = None,
|
|
159
|
+
to_utc: Annotated[Optional[datetime], Field(description="End of range (exclusive)")] = None,
|
|
160
|
+
from_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or greater (inclusive)")] = None,
|
|
161
|
+
to_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or smaller (exclusive)")] = None,
|
|
162
|
+
granularity_unit: Annotated[Optional[GranularityUnit], Field(description="Group by this interval")] = None,
|
|
163
|
+
granularity: Annotated[Optional[StrictInt], Field(description="Group by this interval")] = None,
|
|
164
|
+
time_zone: Annotated[Optional[TimeZone], Field(description="Timezone")] = None,
|
|
165
|
+
aggregation_type: Annotated[Optional[AggregationType], Field(description="Aggregation type")] = None,
|
|
166
|
+
configuration: Annotated[Optional[StrictStr], Field(description="Use this specific configuration")] = None,
|
|
167
|
+
all_versions: Annotated[Optional[StrictBool], Field(description="true = return all versions")] = None,
|
|
168
|
+
_request_timeout: Union[
|
|
169
|
+
None,
|
|
170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
171
|
+
Tuple[
|
|
172
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
173
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
174
|
+
]
|
|
175
|
+
] = None,
|
|
176
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
177
|
+
_content_type: Optional[StrictStr] = None,
|
|
178
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
179
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
180
|
+
) -> ApiResponse[List[Dict[str, object]]]:
|
|
181
|
+
"""Get a list of timeseries values
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
:param dataset_id: The id of the dataset (must be a timeseries dataset) (required)
|
|
185
|
+
:type dataset_id: int
|
|
186
|
+
:param from_utc: Start of range (inclusive)
|
|
187
|
+
:type from_utc: datetime
|
|
188
|
+
:param to_utc: End of range (exclusive)
|
|
189
|
+
:type to_utc: datetime
|
|
190
|
+
:param from_version_utc: Only data with this version or greater (inclusive)
|
|
191
|
+
:type from_version_utc: datetime
|
|
192
|
+
:param to_version_utc: Only data with this version or smaller (exclusive)
|
|
193
|
+
:type to_version_utc: datetime
|
|
194
|
+
:param granularity_unit: Group by this interval
|
|
195
|
+
:type granularity_unit: GranularityUnit
|
|
196
|
+
:param granularity: Group by this interval
|
|
197
|
+
:type granularity: int
|
|
198
|
+
:param time_zone: Timezone
|
|
199
|
+
:type time_zone: TimeZone
|
|
200
|
+
:param aggregation_type: Aggregation type
|
|
201
|
+
:type aggregation_type: AggregationType
|
|
202
|
+
:param configuration: Use this specific configuration
|
|
203
|
+
:type configuration: str
|
|
204
|
+
:param all_versions: true = return all versions
|
|
205
|
+
:type all_versions: bool
|
|
206
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
207
|
+
number provided, it will be total request
|
|
208
|
+
timeout. It can also be a pair (tuple) of
|
|
209
|
+
(connection, read) timeouts.
|
|
210
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
211
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
212
|
+
request; this effectively ignores the
|
|
213
|
+
authentication in the spec for a single request.
|
|
214
|
+
:type _request_auth: dict, optional
|
|
215
|
+
:param _content_type: force content-type for the request.
|
|
216
|
+
:type _content_type: str, Optional
|
|
217
|
+
:param _headers: set to override the headers for a single
|
|
218
|
+
request; this effectively ignores the headers
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _headers: dict, optional
|
|
221
|
+
:param _host_index: set to override the host_index for a single
|
|
222
|
+
request; this effectively ignores the host_index
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _host_index: int, optional
|
|
225
|
+
:return: Returns the result object.
|
|
226
|
+
""" # noqa: E501
|
|
227
|
+
|
|
228
|
+
_param = self._time_series_get_time_serie_data_serialize(
|
|
229
|
+
dataset_id=dataset_id,
|
|
230
|
+
from_utc=from_utc,
|
|
231
|
+
to_utc=to_utc,
|
|
232
|
+
from_version_utc=from_version_utc,
|
|
233
|
+
to_version_utc=to_version_utc,
|
|
234
|
+
granularity_unit=granularity_unit,
|
|
235
|
+
granularity=granularity,
|
|
236
|
+
time_zone=time_zone,
|
|
237
|
+
aggregation_type=aggregation_type,
|
|
238
|
+
configuration=configuration,
|
|
239
|
+
all_versions=all_versions,
|
|
240
|
+
_request_auth=_request_auth,
|
|
241
|
+
_content_type=_content_type,
|
|
242
|
+
_headers=_headers,
|
|
243
|
+
_host_index=_host_index
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
247
|
+
'200': "List[Dict[str, object]]",
|
|
248
|
+
'429': "ProblemDetails",
|
|
249
|
+
'403': "ProblemDetails",
|
|
250
|
+
'422': "ValidationProblemDetails",
|
|
251
|
+
}
|
|
252
|
+
response_data = self.api_client.call_api(
|
|
253
|
+
*_param,
|
|
254
|
+
_request_timeout=_request_timeout
|
|
255
|
+
)
|
|
256
|
+
response_data.read()
|
|
257
|
+
return self.api_client.response_deserialize(
|
|
258
|
+
response_data=response_data,
|
|
259
|
+
response_types_map=_response_types_map,
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
@validate_call
|
|
264
|
+
def time_series_get_time_serie_data_without_preload_content(
|
|
265
|
+
self,
|
|
266
|
+
dataset_id: Annotated[StrictInt, Field(description="The id of the dataset (must be a timeseries dataset)")],
|
|
267
|
+
from_utc: Annotated[Optional[datetime], Field(description="Start of range (inclusive)")] = None,
|
|
268
|
+
to_utc: Annotated[Optional[datetime], Field(description="End of range (exclusive)")] = None,
|
|
269
|
+
from_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or greater (inclusive)")] = None,
|
|
270
|
+
to_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or smaller (exclusive)")] = None,
|
|
271
|
+
granularity_unit: Annotated[Optional[GranularityUnit], Field(description="Group by this interval")] = None,
|
|
272
|
+
granularity: Annotated[Optional[StrictInt], Field(description="Group by this interval")] = None,
|
|
273
|
+
time_zone: Annotated[Optional[TimeZone], Field(description="Timezone")] = None,
|
|
274
|
+
aggregation_type: Annotated[Optional[AggregationType], Field(description="Aggregation type")] = None,
|
|
275
|
+
configuration: Annotated[Optional[StrictStr], Field(description="Use this specific configuration")] = None,
|
|
276
|
+
all_versions: Annotated[Optional[StrictBool], Field(description="true = return all versions")] = None,
|
|
277
|
+
_request_timeout: Union[
|
|
278
|
+
None,
|
|
279
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
280
|
+
Tuple[
|
|
281
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
282
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
283
|
+
]
|
|
284
|
+
] = None,
|
|
285
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
286
|
+
_content_type: Optional[StrictStr] = None,
|
|
287
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
288
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
289
|
+
) -> RESTResponseType:
|
|
290
|
+
"""Get a list of timeseries values
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
:param dataset_id: The id of the dataset (must be a timeseries dataset) (required)
|
|
294
|
+
:type dataset_id: int
|
|
295
|
+
:param from_utc: Start of range (inclusive)
|
|
296
|
+
:type from_utc: datetime
|
|
297
|
+
:param to_utc: End of range (exclusive)
|
|
298
|
+
:type to_utc: datetime
|
|
299
|
+
:param from_version_utc: Only data with this version or greater (inclusive)
|
|
300
|
+
:type from_version_utc: datetime
|
|
301
|
+
:param to_version_utc: Only data with this version or smaller (exclusive)
|
|
302
|
+
:type to_version_utc: datetime
|
|
303
|
+
:param granularity_unit: Group by this interval
|
|
304
|
+
:type granularity_unit: GranularityUnit
|
|
305
|
+
:param granularity: Group by this interval
|
|
306
|
+
:type granularity: int
|
|
307
|
+
:param time_zone: Timezone
|
|
308
|
+
:type time_zone: TimeZone
|
|
309
|
+
:param aggregation_type: Aggregation type
|
|
310
|
+
:type aggregation_type: AggregationType
|
|
311
|
+
:param configuration: Use this specific configuration
|
|
312
|
+
:type configuration: str
|
|
313
|
+
:param all_versions: true = return all versions
|
|
314
|
+
:type all_versions: bool
|
|
315
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
316
|
+
number provided, it will be total request
|
|
317
|
+
timeout. It can also be a pair (tuple) of
|
|
318
|
+
(connection, read) timeouts.
|
|
319
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
320
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
321
|
+
request; this effectively ignores the
|
|
322
|
+
authentication in the spec for a single request.
|
|
323
|
+
:type _request_auth: dict, optional
|
|
324
|
+
:param _content_type: force content-type for the request.
|
|
325
|
+
:type _content_type: str, Optional
|
|
326
|
+
:param _headers: set to override the headers for a single
|
|
327
|
+
request; this effectively ignores the headers
|
|
328
|
+
in the spec for a single request.
|
|
329
|
+
:type _headers: dict, optional
|
|
330
|
+
:param _host_index: set to override the host_index for a single
|
|
331
|
+
request; this effectively ignores the host_index
|
|
332
|
+
in the spec for a single request.
|
|
333
|
+
:type _host_index: int, optional
|
|
334
|
+
:return: Returns the result object.
|
|
335
|
+
""" # noqa: E501
|
|
336
|
+
|
|
337
|
+
_param = self._time_series_get_time_serie_data_serialize(
|
|
338
|
+
dataset_id=dataset_id,
|
|
339
|
+
from_utc=from_utc,
|
|
340
|
+
to_utc=to_utc,
|
|
341
|
+
from_version_utc=from_version_utc,
|
|
342
|
+
to_version_utc=to_version_utc,
|
|
343
|
+
granularity_unit=granularity_unit,
|
|
344
|
+
granularity=granularity,
|
|
345
|
+
time_zone=time_zone,
|
|
346
|
+
aggregation_type=aggregation_type,
|
|
347
|
+
configuration=configuration,
|
|
348
|
+
all_versions=all_versions,
|
|
349
|
+
_request_auth=_request_auth,
|
|
350
|
+
_content_type=_content_type,
|
|
351
|
+
_headers=_headers,
|
|
352
|
+
_host_index=_host_index
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
356
|
+
'200': "List[Dict[str, object]]",
|
|
357
|
+
'429': "ProblemDetails",
|
|
358
|
+
'403': "ProblemDetails",
|
|
359
|
+
'422': "ValidationProblemDetails",
|
|
360
|
+
}
|
|
361
|
+
response_data = self.api_client.call_api(
|
|
362
|
+
*_param,
|
|
363
|
+
_request_timeout=_request_timeout
|
|
364
|
+
)
|
|
365
|
+
return response_data.response
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
def _time_series_get_time_serie_data_serialize(
|
|
369
|
+
self,
|
|
370
|
+
dataset_id,
|
|
371
|
+
from_utc,
|
|
372
|
+
to_utc,
|
|
373
|
+
from_version_utc,
|
|
374
|
+
to_version_utc,
|
|
375
|
+
granularity_unit,
|
|
376
|
+
granularity,
|
|
377
|
+
time_zone,
|
|
378
|
+
aggregation_type,
|
|
379
|
+
configuration,
|
|
380
|
+
all_versions,
|
|
381
|
+
_request_auth,
|
|
382
|
+
_content_type,
|
|
383
|
+
_headers,
|
|
384
|
+
_host_index,
|
|
385
|
+
) -> RequestSerialized:
|
|
386
|
+
|
|
387
|
+
_host = None
|
|
388
|
+
|
|
389
|
+
_collection_formats: Dict[str, str] = {
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
_path_params: Dict[str, str] = {}
|
|
393
|
+
_query_params: List[Tuple[str, str]] = []
|
|
394
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
395
|
+
_form_params: List[Tuple[str, str]] = []
|
|
396
|
+
_files: Dict[
|
|
397
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
398
|
+
] = {}
|
|
399
|
+
_body_params: Optional[bytes] = None
|
|
400
|
+
|
|
401
|
+
# process the path parameters
|
|
402
|
+
if dataset_id is not None:
|
|
403
|
+
_path_params['DatasetId'] = dataset_id
|
|
404
|
+
# process the query parameters
|
|
405
|
+
if from_utc is not None:
|
|
406
|
+
if isinstance(from_utc, datetime):
|
|
407
|
+
_query_params.append(
|
|
408
|
+
(
|
|
409
|
+
'FromUtc',
|
|
410
|
+
from_utc.strftime(
|
|
411
|
+
self.api_client.configuration.datetime_format
|
|
412
|
+
)
|
|
413
|
+
)
|
|
414
|
+
)
|
|
415
|
+
else:
|
|
416
|
+
_query_params.append(('FromUtc', from_utc))
|
|
417
|
+
|
|
418
|
+
if to_utc is not None:
|
|
419
|
+
if isinstance(to_utc, datetime):
|
|
420
|
+
_query_params.append(
|
|
421
|
+
(
|
|
422
|
+
'ToUtc',
|
|
423
|
+
to_utc.strftime(
|
|
424
|
+
self.api_client.configuration.datetime_format
|
|
425
|
+
)
|
|
426
|
+
)
|
|
427
|
+
)
|
|
428
|
+
else:
|
|
429
|
+
_query_params.append(('ToUtc', to_utc))
|
|
430
|
+
|
|
431
|
+
if from_version_utc is not None:
|
|
432
|
+
if isinstance(from_version_utc, datetime):
|
|
433
|
+
_query_params.append(
|
|
434
|
+
(
|
|
435
|
+
'FromVersionUtc',
|
|
436
|
+
from_version_utc.strftime(
|
|
437
|
+
self.api_client.configuration.datetime_format
|
|
438
|
+
)
|
|
439
|
+
)
|
|
440
|
+
)
|
|
441
|
+
else:
|
|
442
|
+
_query_params.append(('FromVersionUtc', from_version_utc))
|
|
443
|
+
|
|
444
|
+
if to_version_utc is not None:
|
|
445
|
+
if isinstance(to_version_utc, datetime):
|
|
446
|
+
_query_params.append(
|
|
447
|
+
(
|
|
448
|
+
'ToVersionUtc',
|
|
449
|
+
to_version_utc.strftime(
|
|
450
|
+
self.api_client.configuration.datetime_format
|
|
451
|
+
)
|
|
452
|
+
)
|
|
453
|
+
)
|
|
454
|
+
else:
|
|
455
|
+
_query_params.append(('ToVersionUtc', to_version_utc))
|
|
456
|
+
|
|
457
|
+
if granularity_unit is not None:
|
|
458
|
+
|
|
459
|
+
_query_params.append(('GranularityUnit', granularity_unit.value))
|
|
460
|
+
|
|
461
|
+
if granularity is not None:
|
|
462
|
+
|
|
463
|
+
_query_params.append(('Granularity', granularity))
|
|
464
|
+
|
|
465
|
+
if time_zone is not None:
|
|
466
|
+
|
|
467
|
+
_query_params.append(('TimeZone', time_zone.value))
|
|
468
|
+
|
|
469
|
+
if aggregation_type is not None:
|
|
470
|
+
|
|
471
|
+
_query_params.append(('AggregationType', aggregation_type.value))
|
|
472
|
+
|
|
473
|
+
if configuration is not None:
|
|
474
|
+
|
|
475
|
+
_query_params.append(('Configuration', configuration))
|
|
476
|
+
|
|
477
|
+
if all_versions is not None:
|
|
478
|
+
|
|
479
|
+
_query_params.append(('AllVersions', all_versions))
|
|
480
|
+
|
|
481
|
+
# process the header parameters
|
|
482
|
+
# process the form parameters
|
|
483
|
+
# process the body parameter
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
# set the HTTP header `Accept`
|
|
487
|
+
if 'Accept' not in _header_params:
|
|
488
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
489
|
+
[
|
|
490
|
+
'application/json'
|
|
491
|
+
]
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
# authentication setting
|
|
496
|
+
_auth_settings: List[str] = [
|
|
497
|
+
'oauth2'
|
|
498
|
+
]
|
|
499
|
+
|
|
500
|
+
return self.api_client.param_serialize(
|
|
501
|
+
method='GET',
|
|
502
|
+
resource_path='/TimeSeries/Dataset/{DatasetId}',
|
|
503
|
+
path_params=_path_params,
|
|
504
|
+
query_params=_query_params,
|
|
505
|
+
header_params=_header_params,
|
|
506
|
+
body=_body_params,
|
|
507
|
+
post_params=_form_params,
|
|
508
|
+
files=_files,
|
|
509
|
+
auth_settings=_auth_settings,
|
|
510
|
+
collection_formats=_collection_formats,
|
|
511
|
+
_host=_host,
|
|
512
|
+
_request_auth=_request_auth
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
@validate_call
|
|
519
|
+
def time_series_get_time_serie_data_by_code(
|
|
520
|
+
self,
|
|
521
|
+
dataset_code: Annotated[StrictStr, Field(description="The code of the dataset (must be a timeseries dataset)")],
|
|
522
|
+
from_utc: Annotated[Optional[datetime], Field(description="Start of range (inclusive)")] = None,
|
|
523
|
+
to_utc: Annotated[Optional[datetime], Field(description="End of range (exclusive)")] = None,
|
|
524
|
+
from_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or greater (inclusive)")] = None,
|
|
525
|
+
to_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or smaller (exclusive)")] = None,
|
|
526
|
+
granularity_unit: Annotated[Optional[GranularityUnit], Field(description="Group by this interval")] = None,
|
|
527
|
+
granularity: Annotated[Optional[StrictInt], Field(description="Group by this interval")] = None,
|
|
528
|
+
time_zone: Annotated[Optional[TimeZone], Field(description="Timezone")] = None,
|
|
529
|
+
aggregation_type: Annotated[Optional[AggregationType], Field(description="Aggregation type")] = None,
|
|
530
|
+
configuration: Annotated[Optional[StrictStr], Field(description="Use this specific configuration")] = None,
|
|
531
|
+
all_versions: Annotated[Optional[StrictBool], Field(description="true = return all versions")] = None,
|
|
532
|
+
_request_timeout: Union[
|
|
533
|
+
None,
|
|
534
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
535
|
+
Tuple[
|
|
536
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
537
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
538
|
+
]
|
|
539
|
+
] = None,
|
|
540
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
541
|
+
_content_type: Optional[StrictStr] = None,
|
|
542
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
543
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
544
|
+
) -> List[Dict[str, object]]:
|
|
545
|
+
"""Get a list of timeseries values
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
:param dataset_code: The code of the dataset (must be a timeseries dataset) (required)
|
|
549
|
+
:type dataset_code: str
|
|
550
|
+
:param from_utc: Start of range (inclusive)
|
|
551
|
+
:type from_utc: datetime
|
|
552
|
+
:param to_utc: End of range (exclusive)
|
|
553
|
+
:type to_utc: datetime
|
|
554
|
+
:param from_version_utc: Only data with this version or greater (inclusive)
|
|
555
|
+
:type from_version_utc: datetime
|
|
556
|
+
:param to_version_utc: Only data with this version or smaller (exclusive)
|
|
557
|
+
:type to_version_utc: datetime
|
|
558
|
+
:param granularity_unit: Group by this interval
|
|
559
|
+
:type granularity_unit: GranularityUnit
|
|
560
|
+
:param granularity: Group by this interval
|
|
561
|
+
:type granularity: int
|
|
562
|
+
:param time_zone: Timezone
|
|
563
|
+
:type time_zone: TimeZone
|
|
564
|
+
:param aggregation_type: Aggregation type
|
|
565
|
+
:type aggregation_type: AggregationType
|
|
566
|
+
:param configuration: Use this specific configuration
|
|
567
|
+
:type configuration: str
|
|
568
|
+
:param all_versions: true = return all versions
|
|
569
|
+
:type all_versions: bool
|
|
570
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
571
|
+
number provided, it will be total request
|
|
572
|
+
timeout. It can also be a pair (tuple) of
|
|
573
|
+
(connection, read) timeouts.
|
|
574
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
575
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
576
|
+
request; this effectively ignores the
|
|
577
|
+
authentication in the spec for a single request.
|
|
578
|
+
:type _request_auth: dict, optional
|
|
579
|
+
:param _content_type: force content-type for the request.
|
|
580
|
+
:type _content_type: str, Optional
|
|
581
|
+
:param _headers: set to override the headers for a single
|
|
582
|
+
request; this effectively ignores the headers
|
|
583
|
+
in the spec for a single request.
|
|
584
|
+
:type _headers: dict, optional
|
|
585
|
+
:param _host_index: set to override the host_index for a single
|
|
586
|
+
request; this effectively ignores the host_index
|
|
587
|
+
in the spec for a single request.
|
|
588
|
+
:type _host_index: int, optional
|
|
589
|
+
:return: Returns the result object.
|
|
590
|
+
""" # noqa: E501
|
|
591
|
+
|
|
592
|
+
_param = self._time_series_get_time_serie_data_by_code_serialize(
|
|
593
|
+
dataset_code=dataset_code,
|
|
594
|
+
from_utc=from_utc,
|
|
595
|
+
to_utc=to_utc,
|
|
596
|
+
from_version_utc=from_version_utc,
|
|
597
|
+
to_version_utc=to_version_utc,
|
|
598
|
+
granularity_unit=granularity_unit,
|
|
599
|
+
granularity=granularity,
|
|
600
|
+
time_zone=time_zone,
|
|
601
|
+
aggregation_type=aggregation_type,
|
|
602
|
+
configuration=configuration,
|
|
603
|
+
all_versions=all_versions,
|
|
604
|
+
_request_auth=_request_auth,
|
|
605
|
+
_content_type=_content_type,
|
|
606
|
+
_headers=_headers,
|
|
607
|
+
_host_index=_host_index
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
611
|
+
'200': "List[Dict[str, object]]",
|
|
612
|
+
'429': "ProblemDetails",
|
|
613
|
+
'403': "ProblemDetails",
|
|
614
|
+
'422': "ValidationProblemDetails",
|
|
615
|
+
}
|
|
616
|
+
response_data = self.api_client.call_api(
|
|
617
|
+
*_param,
|
|
618
|
+
_request_timeout=_request_timeout
|
|
619
|
+
)
|
|
620
|
+
response_data.read()
|
|
621
|
+
return self.api_client.response_deserialize(
|
|
622
|
+
response_data=response_data,
|
|
623
|
+
response_types_map=_response_types_map,
|
|
624
|
+
).data
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
@validate_call
|
|
628
|
+
def time_series_get_time_serie_data_by_code_with_http_info(
|
|
629
|
+
self,
|
|
630
|
+
dataset_code: Annotated[StrictStr, Field(description="The code of the dataset (must be a timeseries dataset)")],
|
|
631
|
+
from_utc: Annotated[Optional[datetime], Field(description="Start of range (inclusive)")] = None,
|
|
632
|
+
to_utc: Annotated[Optional[datetime], Field(description="End of range (exclusive)")] = None,
|
|
633
|
+
from_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or greater (inclusive)")] = None,
|
|
634
|
+
to_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or smaller (exclusive)")] = None,
|
|
635
|
+
granularity_unit: Annotated[Optional[GranularityUnit], Field(description="Group by this interval")] = None,
|
|
636
|
+
granularity: Annotated[Optional[StrictInt], Field(description="Group by this interval")] = None,
|
|
637
|
+
time_zone: Annotated[Optional[TimeZone], Field(description="Timezone")] = None,
|
|
638
|
+
aggregation_type: Annotated[Optional[AggregationType], Field(description="Aggregation type")] = None,
|
|
639
|
+
configuration: Annotated[Optional[StrictStr], Field(description="Use this specific configuration")] = None,
|
|
640
|
+
all_versions: Annotated[Optional[StrictBool], Field(description="true = return all versions")] = None,
|
|
641
|
+
_request_timeout: Union[
|
|
642
|
+
None,
|
|
643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
644
|
+
Tuple[
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
646
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
647
|
+
]
|
|
648
|
+
] = None,
|
|
649
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
650
|
+
_content_type: Optional[StrictStr] = None,
|
|
651
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
652
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
653
|
+
) -> ApiResponse[List[Dict[str, object]]]:
|
|
654
|
+
"""Get a list of timeseries values
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
:param dataset_code: The code of the dataset (must be a timeseries dataset) (required)
|
|
658
|
+
:type dataset_code: str
|
|
659
|
+
:param from_utc: Start of range (inclusive)
|
|
660
|
+
:type from_utc: datetime
|
|
661
|
+
:param to_utc: End of range (exclusive)
|
|
662
|
+
:type to_utc: datetime
|
|
663
|
+
:param from_version_utc: Only data with this version or greater (inclusive)
|
|
664
|
+
:type from_version_utc: datetime
|
|
665
|
+
:param to_version_utc: Only data with this version or smaller (exclusive)
|
|
666
|
+
:type to_version_utc: datetime
|
|
667
|
+
:param granularity_unit: Group by this interval
|
|
668
|
+
:type granularity_unit: GranularityUnit
|
|
669
|
+
:param granularity: Group by this interval
|
|
670
|
+
:type granularity: int
|
|
671
|
+
:param time_zone: Timezone
|
|
672
|
+
:type time_zone: TimeZone
|
|
673
|
+
:param aggregation_type: Aggregation type
|
|
674
|
+
:type aggregation_type: AggregationType
|
|
675
|
+
:param configuration: Use this specific configuration
|
|
676
|
+
:type configuration: str
|
|
677
|
+
:param all_versions: true = return all versions
|
|
678
|
+
:type all_versions: bool
|
|
679
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
680
|
+
number provided, it will be total request
|
|
681
|
+
timeout. It can also be a pair (tuple) of
|
|
682
|
+
(connection, read) timeouts.
|
|
683
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
684
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
685
|
+
request; this effectively ignores the
|
|
686
|
+
authentication in the spec for a single request.
|
|
687
|
+
:type _request_auth: dict, optional
|
|
688
|
+
:param _content_type: force content-type for the request.
|
|
689
|
+
:type _content_type: str, Optional
|
|
690
|
+
:param _headers: set to override the headers for a single
|
|
691
|
+
request; this effectively ignores the headers
|
|
692
|
+
in the spec for a single request.
|
|
693
|
+
:type _headers: dict, optional
|
|
694
|
+
:param _host_index: set to override the host_index for a single
|
|
695
|
+
request; this effectively ignores the host_index
|
|
696
|
+
in the spec for a single request.
|
|
697
|
+
:type _host_index: int, optional
|
|
698
|
+
:return: Returns the result object.
|
|
699
|
+
""" # noqa: E501
|
|
700
|
+
|
|
701
|
+
_param = self._time_series_get_time_serie_data_by_code_serialize(
|
|
702
|
+
dataset_code=dataset_code,
|
|
703
|
+
from_utc=from_utc,
|
|
704
|
+
to_utc=to_utc,
|
|
705
|
+
from_version_utc=from_version_utc,
|
|
706
|
+
to_version_utc=to_version_utc,
|
|
707
|
+
granularity_unit=granularity_unit,
|
|
708
|
+
granularity=granularity,
|
|
709
|
+
time_zone=time_zone,
|
|
710
|
+
aggregation_type=aggregation_type,
|
|
711
|
+
configuration=configuration,
|
|
712
|
+
all_versions=all_versions,
|
|
713
|
+
_request_auth=_request_auth,
|
|
714
|
+
_content_type=_content_type,
|
|
715
|
+
_headers=_headers,
|
|
716
|
+
_host_index=_host_index
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
720
|
+
'200': "List[Dict[str, object]]",
|
|
721
|
+
'429': "ProblemDetails",
|
|
722
|
+
'403': "ProblemDetails",
|
|
723
|
+
'422': "ValidationProblemDetails",
|
|
724
|
+
}
|
|
725
|
+
response_data = self.api_client.call_api(
|
|
726
|
+
*_param,
|
|
727
|
+
_request_timeout=_request_timeout
|
|
728
|
+
)
|
|
729
|
+
response_data.read()
|
|
730
|
+
return self.api_client.response_deserialize(
|
|
731
|
+
response_data=response_data,
|
|
732
|
+
response_types_map=_response_types_map,
|
|
733
|
+
)
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
@validate_call
|
|
737
|
+
def time_series_get_time_serie_data_by_code_without_preload_content(
|
|
738
|
+
self,
|
|
739
|
+
dataset_code: Annotated[StrictStr, Field(description="The code of the dataset (must be a timeseries dataset)")],
|
|
740
|
+
from_utc: Annotated[Optional[datetime], Field(description="Start of range (inclusive)")] = None,
|
|
741
|
+
to_utc: Annotated[Optional[datetime], Field(description="End of range (exclusive)")] = None,
|
|
742
|
+
from_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or greater (inclusive)")] = None,
|
|
743
|
+
to_version_utc: Annotated[Optional[datetime], Field(description="Only data with this version or smaller (exclusive)")] = None,
|
|
744
|
+
granularity_unit: Annotated[Optional[GranularityUnit], Field(description="Group by this interval")] = None,
|
|
745
|
+
granularity: Annotated[Optional[StrictInt], Field(description="Group by this interval")] = None,
|
|
746
|
+
time_zone: Annotated[Optional[TimeZone], Field(description="Timezone")] = None,
|
|
747
|
+
aggregation_type: Annotated[Optional[AggregationType], Field(description="Aggregation type")] = None,
|
|
748
|
+
configuration: Annotated[Optional[StrictStr], Field(description="Use this specific configuration")] = None,
|
|
749
|
+
all_versions: Annotated[Optional[StrictBool], Field(description="true = return all versions")] = None,
|
|
750
|
+
_request_timeout: Union[
|
|
751
|
+
None,
|
|
752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
753
|
+
Tuple[
|
|
754
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
755
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
756
|
+
]
|
|
757
|
+
] = None,
|
|
758
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
759
|
+
_content_type: Optional[StrictStr] = None,
|
|
760
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
761
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
762
|
+
) -> RESTResponseType:
|
|
763
|
+
"""Get a list of timeseries values
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
:param dataset_code: The code of the dataset (must be a timeseries dataset) (required)
|
|
767
|
+
:type dataset_code: str
|
|
768
|
+
:param from_utc: Start of range (inclusive)
|
|
769
|
+
:type from_utc: datetime
|
|
770
|
+
:param to_utc: End of range (exclusive)
|
|
771
|
+
:type to_utc: datetime
|
|
772
|
+
:param from_version_utc: Only data with this version or greater (inclusive)
|
|
773
|
+
:type from_version_utc: datetime
|
|
774
|
+
:param to_version_utc: Only data with this version or smaller (exclusive)
|
|
775
|
+
:type to_version_utc: datetime
|
|
776
|
+
:param granularity_unit: Group by this interval
|
|
777
|
+
:type granularity_unit: GranularityUnit
|
|
778
|
+
:param granularity: Group by this interval
|
|
779
|
+
:type granularity: int
|
|
780
|
+
:param time_zone: Timezone
|
|
781
|
+
:type time_zone: TimeZone
|
|
782
|
+
:param aggregation_type: Aggregation type
|
|
783
|
+
:type aggregation_type: AggregationType
|
|
784
|
+
:param configuration: Use this specific configuration
|
|
785
|
+
:type configuration: str
|
|
786
|
+
:param all_versions: true = return all versions
|
|
787
|
+
:type all_versions: bool
|
|
788
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
789
|
+
number provided, it will be total request
|
|
790
|
+
timeout. It can also be a pair (tuple) of
|
|
791
|
+
(connection, read) timeouts.
|
|
792
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
793
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
794
|
+
request; this effectively ignores the
|
|
795
|
+
authentication in the spec for a single request.
|
|
796
|
+
:type _request_auth: dict, optional
|
|
797
|
+
:param _content_type: force content-type for the request.
|
|
798
|
+
:type _content_type: str, Optional
|
|
799
|
+
:param _headers: set to override the headers for a single
|
|
800
|
+
request; this effectively ignores the headers
|
|
801
|
+
in the spec for a single request.
|
|
802
|
+
:type _headers: dict, optional
|
|
803
|
+
:param _host_index: set to override the host_index for a single
|
|
804
|
+
request; this effectively ignores the host_index
|
|
805
|
+
in the spec for a single request.
|
|
806
|
+
:type _host_index: int, optional
|
|
807
|
+
:return: Returns the result object.
|
|
808
|
+
""" # noqa: E501
|
|
809
|
+
|
|
810
|
+
_param = self._time_series_get_time_serie_data_by_code_serialize(
|
|
811
|
+
dataset_code=dataset_code,
|
|
812
|
+
from_utc=from_utc,
|
|
813
|
+
to_utc=to_utc,
|
|
814
|
+
from_version_utc=from_version_utc,
|
|
815
|
+
to_version_utc=to_version_utc,
|
|
816
|
+
granularity_unit=granularity_unit,
|
|
817
|
+
granularity=granularity,
|
|
818
|
+
time_zone=time_zone,
|
|
819
|
+
aggregation_type=aggregation_type,
|
|
820
|
+
configuration=configuration,
|
|
821
|
+
all_versions=all_versions,
|
|
822
|
+
_request_auth=_request_auth,
|
|
823
|
+
_content_type=_content_type,
|
|
824
|
+
_headers=_headers,
|
|
825
|
+
_host_index=_host_index
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
829
|
+
'200': "List[Dict[str, object]]",
|
|
830
|
+
'429': "ProblemDetails",
|
|
831
|
+
'403': "ProblemDetails",
|
|
832
|
+
'422': "ValidationProblemDetails",
|
|
833
|
+
}
|
|
834
|
+
response_data = self.api_client.call_api(
|
|
835
|
+
*_param,
|
|
836
|
+
_request_timeout=_request_timeout
|
|
837
|
+
)
|
|
838
|
+
return response_data.response
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
def _time_series_get_time_serie_data_by_code_serialize(
|
|
842
|
+
self,
|
|
843
|
+
dataset_code,
|
|
844
|
+
from_utc,
|
|
845
|
+
to_utc,
|
|
846
|
+
from_version_utc,
|
|
847
|
+
to_version_utc,
|
|
848
|
+
granularity_unit,
|
|
849
|
+
granularity,
|
|
850
|
+
time_zone,
|
|
851
|
+
aggregation_type,
|
|
852
|
+
configuration,
|
|
853
|
+
all_versions,
|
|
854
|
+
_request_auth,
|
|
855
|
+
_content_type,
|
|
856
|
+
_headers,
|
|
857
|
+
_host_index,
|
|
858
|
+
) -> RequestSerialized:
|
|
859
|
+
|
|
860
|
+
_host = None
|
|
861
|
+
|
|
862
|
+
_collection_formats: Dict[str, str] = {
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
_path_params: Dict[str, str] = {}
|
|
866
|
+
_query_params: List[Tuple[str, str]] = []
|
|
867
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
868
|
+
_form_params: List[Tuple[str, str]] = []
|
|
869
|
+
_files: Dict[
|
|
870
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
871
|
+
] = {}
|
|
872
|
+
_body_params: Optional[bytes] = None
|
|
873
|
+
|
|
874
|
+
# process the path parameters
|
|
875
|
+
if dataset_code is not None:
|
|
876
|
+
_path_params['DatasetCode'] = dataset_code
|
|
877
|
+
# process the query parameters
|
|
878
|
+
if from_utc is not None:
|
|
879
|
+
if isinstance(from_utc, datetime):
|
|
880
|
+
_query_params.append(
|
|
881
|
+
(
|
|
882
|
+
'FromUtc',
|
|
883
|
+
from_utc.strftime(
|
|
884
|
+
self.api_client.configuration.datetime_format
|
|
885
|
+
)
|
|
886
|
+
)
|
|
887
|
+
)
|
|
888
|
+
else:
|
|
889
|
+
_query_params.append(('FromUtc', from_utc))
|
|
890
|
+
|
|
891
|
+
if to_utc is not None:
|
|
892
|
+
if isinstance(to_utc, datetime):
|
|
893
|
+
_query_params.append(
|
|
894
|
+
(
|
|
895
|
+
'ToUtc',
|
|
896
|
+
to_utc.strftime(
|
|
897
|
+
self.api_client.configuration.datetime_format
|
|
898
|
+
)
|
|
899
|
+
)
|
|
900
|
+
)
|
|
901
|
+
else:
|
|
902
|
+
_query_params.append(('ToUtc', to_utc))
|
|
903
|
+
|
|
904
|
+
if from_version_utc is not None:
|
|
905
|
+
if isinstance(from_version_utc, datetime):
|
|
906
|
+
_query_params.append(
|
|
907
|
+
(
|
|
908
|
+
'FromVersionUtc',
|
|
909
|
+
from_version_utc.strftime(
|
|
910
|
+
self.api_client.configuration.datetime_format
|
|
911
|
+
)
|
|
912
|
+
)
|
|
913
|
+
)
|
|
914
|
+
else:
|
|
915
|
+
_query_params.append(('FromVersionUtc', from_version_utc))
|
|
916
|
+
|
|
917
|
+
if to_version_utc is not None:
|
|
918
|
+
if isinstance(to_version_utc, datetime):
|
|
919
|
+
_query_params.append(
|
|
920
|
+
(
|
|
921
|
+
'ToVersionUtc',
|
|
922
|
+
to_version_utc.strftime(
|
|
923
|
+
self.api_client.configuration.datetime_format
|
|
924
|
+
)
|
|
925
|
+
)
|
|
926
|
+
)
|
|
927
|
+
else:
|
|
928
|
+
_query_params.append(('ToVersionUtc', to_version_utc))
|
|
929
|
+
|
|
930
|
+
if granularity_unit is not None:
|
|
931
|
+
|
|
932
|
+
_query_params.append(('GranularityUnit', granularity_unit.value))
|
|
933
|
+
|
|
934
|
+
if granularity is not None:
|
|
935
|
+
|
|
936
|
+
_query_params.append(('Granularity', granularity))
|
|
937
|
+
|
|
938
|
+
if time_zone is not None:
|
|
939
|
+
|
|
940
|
+
_query_params.append(('TimeZone', time_zone.value))
|
|
941
|
+
|
|
942
|
+
if aggregation_type is not None:
|
|
943
|
+
|
|
944
|
+
_query_params.append(('AggregationType', aggregation_type.value))
|
|
945
|
+
|
|
946
|
+
if configuration is not None:
|
|
947
|
+
|
|
948
|
+
_query_params.append(('Configuration', configuration))
|
|
949
|
+
|
|
950
|
+
if all_versions is not None:
|
|
951
|
+
|
|
952
|
+
_query_params.append(('AllVersions', all_versions))
|
|
953
|
+
|
|
954
|
+
# process the header parameters
|
|
955
|
+
# process the form parameters
|
|
956
|
+
# process the body parameter
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
# set the HTTP header `Accept`
|
|
960
|
+
if 'Accept' not in _header_params:
|
|
961
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
962
|
+
[
|
|
963
|
+
'application/json'
|
|
964
|
+
]
|
|
965
|
+
)
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
# authentication setting
|
|
969
|
+
_auth_settings: List[str] = [
|
|
970
|
+
'oauth2'
|
|
971
|
+
]
|
|
972
|
+
|
|
973
|
+
return self.api_client.param_serialize(
|
|
974
|
+
method='GET',
|
|
975
|
+
resource_path='/TimeSeries/Dataset/ByCode/{DatasetCode}',
|
|
976
|
+
path_params=_path_params,
|
|
977
|
+
query_params=_query_params,
|
|
978
|
+
header_params=_header_params,
|
|
979
|
+
body=_body_params,
|
|
980
|
+
post_params=_form_params,
|
|
981
|
+
files=_files,
|
|
982
|
+
auth_settings=_auth_settings,
|
|
983
|
+
collection_formats=_collection_formats,
|
|
984
|
+
_host=_host,
|
|
985
|
+
_request_auth=_request_auth
|
|
986
|
+
)
|
|
987
|
+
|
|
988
|
+
|