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,824 @@
|
|
|
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 pydantic import Field, StrictInt, StrictStr
|
|
20
|
+
from typing import List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from edms_client_api.models.dataset_metadata_dto import DatasetMetadataDto
|
|
23
|
+
|
|
24
|
+
from edms_client_api.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from edms_client_api.api_response import ApiResponse
|
|
26
|
+
from edms_client_api.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class MetadataApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def metadata_get_dataset_metadata(
|
|
44
|
+
self,
|
|
45
|
+
dataset_id: Annotated[StrictInt, Field(description="The id of the dataset")],
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
) -> DatasetMetadataDto:
|
|
59
|
+
"""Get the metadata behind a dataset
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
:param dataset_id: The id of the dataset (required)
|
|
63
|
+
:type dataset_id: int
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._metadata_get_dataset_metadata_serialize(
|
|
87
|
+
dataset_id=dataset_id,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
'200': "DatasetMetadataDto",
|
|
96
|
+
'422': "ValidationProblemDetails",
|
|
97
|
+
}
|
|
98
|
+
response_data = self.api_client.call_api(
|
|
99
|
+
*_param,
|
|
100
|
+
_request_timeout=_request_timeout
|
|
101
|
+
)
|
|
102
|
+
response_data.read()
|
|
103
|
+
return self.api_client.response_deserialize(
|
|
104
|
+
response_data=response_data,
|
|
105
|
+
response_types_map=_response_types_map,
|
|
106
|
+
).data
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
def metadata_get_dataset_metadata_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
dataset_id: Annotated[StrictInt, Field(description="The id of the dataset")],
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
125
|
+
) -> ApiResponse[DatasetMetadataDto]:
|
|
126
|
+
"""Get the metadata behind a dataset
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:param dataset_id: The id of the dataset (required)
|
|
130
|
+
:type dataset_id: int
|
|
131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
132
|
+
number provided, it will be total request
|
|
133
|
+
timeout. It can also be a pair (tuple) of
|
|
134
|
+
(connection, read) timeouts.
|
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
137
|
+
request; this effectively ignores the
|
|
138
|
+
authentication in the spec for a single request.
|
|
139
|
+
:type _request_auth: dict, optional
|
|
140
|
+
:param _content_type: force content-type for the request.
|
|
141
|
+
:type _content_type: str, Optional
|
|
142
|
+
:param _headers: set to override the headers for a single
|
|
143
|
+
request; this effectively ignores the headers
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _headers: dict, optional
|
|
146
|
+
:param _host_index: set to override the host_index for a single
|
|
147
|
+
request; this effectively ignores the host_index
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _host_index: int, optional
|
|
150
|
+
:return: Returns the result object.
|
|
151
|
+
""" # noqa: E501
|
|
152
|
+
|
|
153
|
+
_param = self._metadata_get_dataset_metadata_serialize(
|
|
154
|
+
dataset_id=dataset_id,
|
|
155
|
+
_request_auth=_request_auth,
|
|
156
|
+
_content_type=_content_type,
|
|
157
|
+
_headers=_headers,
|
|
158
|
+
_host_index=_host_index
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
162
|
+
'200': "DatasetMetadataDto",
|
|
163
|
+
'422': "ValidationProblemDetails",
|
|
164
|
+
}
|
|
165
|
+
response_data = self.api_client.call_api(
|
|
166
|
+
*_param,
|
|
167
|
+
_request_timeout=_request_timeout
|
|
168
|
+
)
|
|
169
|
+
response_data.read()
|
|
170
|
+
return self.api_client.response_deserialize(
|
|
171
|
+
response_data=response_data,
|
|
172
|
+
response_types_map=_response_types_map,
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
@validate_call
|
|
177
|
+
def metadata_get_dataset_metadata_without_preload_content(
|
|
178
|
+
self,
|
|
179
|
+
dataset_id: Annotated[StrictInt, Field(description="The id of the dataset")],
|
|
180
|
+
_request_timeout: Union[
|
|
181
|
+
None,
|
|
182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
183
|
+
Tuple[
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
186
|
+
]
|
|
187
|
+
] = None,
|
|
188
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
189
|
+
_content_type: Optional[StrictStr] = None,
|
|
190
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
192
|
+
) -> RESTResponseType:
|
|
193
|
+
"""Get the metadata behind a dataset
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
:param dataset_id: The id of the dataset (required)
|
|
197
|
+
:type dataset_id: int
|
|
198
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
199
|
+
number provided, it will be total request
|
|
200
|
+
timeout. It can also be a pair (tuple) of
|
|
201
|
+
(connection, read) timeouts.
|
|
202
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
203
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
204
|
+
request; this effectively ignores the
|
|
205
|
+
authentication in the spec for a single request.
|
|
206
|
+
:type _request_auth: dict, optional
|
|
207
|
+
:param _content_type: force content-type for the request.
|
|
208
|
+
:type _content_type: str, Optional
|
|
209
|
+
:param _headers: set to override the headers for a single
|
|
210
|
+
request; this effectively ignores the headers
|
|
211
|
+
in the spec for a single request.
|
|
212
|
+
:type _headers: dict, optional
|
|
213
|
+
:param _host_index: set to override the host_index for a single
|
|
214
|
+
request; this effectively ignores the host_index
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _host_index: int, optional
|
|
217
|
+
:return: Returns the result object.
|
|
218
|
+
""" # noqa: E501
|
|
219
|
+
|
|
220
|
+
_param = self._metadata_get_dataset_metadata_serialize(
|
|
221
|
+
dataset_id=dataset_id,
|
|
222
|
+
_request_auth=_request_auth,
|
|
223
|
+
_content_type=_content_type,
|
|
224
|
+
_headers=_headers,
|
|
225
|
+
_host_index=_host_index
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
229
|
+
'200': "DatasetMetadataDto",
|
|
230
|
+
'422': "ValidationProblemDetails",
|
|
231
|
+
}
|
|
232
|
+
response_data = self.api_client.call_api(
|
|
233
|
+
*_param,
|
|
234
|
+
_request_timeout=_request_timeout
|
|
235
|
+
)
|
|
236
|
+
return response_data.response
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _metadata_get_dataset_metadata_serialize(
|
|
240
|
+
self,
|
|
241
|
+
dataset_id,
|
|
242
|
+
_request_auth,
|
|
243
|
+
_content_type,
|
|
244
|
+
_headers,
|
|
245
|
+
_host_index,
|
|
246
|
+
) -> RequestSerialized:
|
|
247
|
+
|
|
248
|
+
_host = None
|
|
249
|
+
|
|
250
|
+
_collection_formats: Dict[str, str] = {
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
_path_params: Dict[str, str] = {}
|
|
254
|
+
_query_params: List[Tuple[str, str]] = []
|
|
255
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
256
|
+
_form_params: List[Tuple[str, str]] = []
|
|
257
|
+
_files: Dict[
|
|
258
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
259
|
+
] = {}
|
|
260
|
+
_body_params: Optional[bytes] = None
|
|
261
|
+
|
|
262
|
+
# process the path parameters
|
|
263
|
+
if dataset_id is not None:
|
|
264
|
+
_path_params['DatasetId'] = dataset_id
|
|
265
|
+
# process the query parameters
|
|
266
|
+
# process the header parameters
|
|
267
|
+
# process the form parameters
|
|
268
|
+
# process the body parameter
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# set the HTTP header `Accept`
|
|
272
|
+
if 'Accept' not in _header_params:
|
|
273
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
274
|
+
[
|
|
275
|
+
'application/json'
|
|
276
|
+
]
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# authentication setting
|
|
281
|
+
_auth_settings: List[str] = [
|
|
282
|
+
'oauth2'
|
|
283
|
+
]
|
|
284
|
+
|
|
285
|
+
return self.api_client.param_serialize(
|
|
286
|
+
method='GET',
|
|
287
|
+
resource_path='/Metadata/Dataset/{DatasetId}',
|
|
288
|
+
path_params=_path_params,
|
|
289
|
+
query_params=_query_params,
|
|
290
|
+
header_params=_header_params,
|
|
291
|
+
body=_body_params,
|
|
292
|
+
post_params=_form_params,
|
|
293
|
+
files=_files,
|
|
294
|
+
auth_settings=_auth_settings,
|
|
295
|
+
collection_formats=_collection_formats,
|
|
296
|
+
_host=_host,
|
|
297
|
+
_request_auth=_request_auth
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
@validate_call
|
|
304
|
+
def metadata_get_dataset_metadata_by_code(
|
|
305
|
+
self,
|
|
306
|
+
dataset_code: Annotated[StrictStr, Field(description="The code of the dataset")],
|
|
307
|
+
_request_timeout: Union[
|
|
308
|
+
None,
|
|
309
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
310
|
+
Tuple[
|
|
311
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
312
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
313
|
+
]
|
|
314
|
+
] = None,
|
|
315
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
316
|
+
_content_type: Optional[StrictStr] = None,
|
|
317
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
318
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
319
|
+
) -> DatasetMetadataDto:
|
|
320
|
+
"""Get the metadata behind a dataset
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
:param dataset_code: The code of the dataset (required)
|
|
324
|
+
:type dataset_code: str
|
|
325
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
326
|
+
number provided, it will be total request
|
|
327
|
+
timeout. It can also be a pair (tuple) of
|
|
328
|
+
(connection, read) timeouts.
|
|
329
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
330
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
331
|
+
request; this effectively ignores the
|
|
332
|
+
authentication in the spec for a single request.
|
|
333
|
+
:type _request_auth: dict, optional
|
|
334
|
+
:param _content_type: force content-type for the request.
|
|
335
|
+
:type _content_type: str, Optional
|
|
336
|
+
:param _headers: set to override the headers for a single
|
|
337
|
+
request; this effectively ignores the headers
|
|
338
|
+
in the spec for a single request.
|
|
339
|
+
:type _headers: dict, optional
|
|
340
|
+
:param _host_index: set to override the host_index for a single
|
|
341
|
+
request; this effectively ignores the host_index
|
|
342
|
+
in the spec for a single request.
|
|
343
|
+
:type _host_index: int, optional
|
|
344
|
+
:return: Returns the result object.
|
|
345
|
+
""" # noqa: E501
|
|
346
|
+
|
|
347
|
+
_param = self._metadata_get_dataset_metadata_by_code_serialize(
|
|
348
|
+
dataset_code=dataset_code,
|
|
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': "DatasetMetadataDto",
|
|
357
|
+
'422': "ValidationProblemDetails",
|
|
358
|
+
}
|
|
359
|
+
response_data = self.api_client.call_api(
|
|
360
|
+
*_param,
|
|
361
|
+
_request_timeout=_request_timeout
|
|
362
|
+
)
|
|
363
|
+
response_data.read()
|
|
364
|
+
return self.api_client.response_deserialize(
|
|
365
|
+
response_data=response_data,
|
|
366
|
+
response_types_map=_response_types_map,
|
|
367
|
+
).data
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
@validate_call
|
|
371
|
+
def metadata_get_dataset_metadata_by_code_with_http_info(
|
|
372
|
+
self,
|
|
373
|
+
dataset_code: Annotated[StrictStr, Field(description="The code of the dataset")],
|
|
374
|
+
_request_timeout: Union[
|
|
375
|
+
None,
|
|
376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
377
|
+
Tuple[
|
|
378
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
379
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
380
|
+
]
|
|
381
|
+
] = None,
|
|
382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
383
|
+
_content_type: Optional[StrictStr] = None,
|
|
384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
386
|
+
) -> ApiResponse[DatasetMetadataDto]:
|
|
387
|
+
"""Get the metadata behind a dataset
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
:param dataset_code: The code of the dataset (required)
|
|
391
|
+
:type dataset_code: str
|
|
392
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
393
|
+
number provided, it will be total request
|
|
394
|
+
timeout. It can also be a pair (tuple) of
|
|
395
|
+
(connection, read) timeouts.
|
|
396
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
397
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
398
|
+
request; this effectively ignores the
|
|
399
|
+
authentication in the spec for a single request.
|
|
400
|
+
:type _request_auth: dict, optional
|
|
401
|
+
:param _content_type: force content-type for the request.
|
|
402
|
+
:type _content_type: str, Optional
|
|
403
|
+
:param _headers: set to override the headers for a single
|
|
404
|
+
request; this effectively ignores the headers
|
|
405
|
+
in the spec for a single request.
|
|
406
|
+
:type _headers: dict, optional
|
|
407
|
+
:param _host_index: set to override the host_index for a single
|
|
408
|
+
request; this effectively ignores the host_index
|
|
409
|
+
in the spec for a single request.
|
|
410
|
+
:type _host_index: int, optional
|
|
411
|
+
:return: Returns the result object.
|
|
412
|
+
""" # noqa: E501
|
|
413
|
+
|
|
414
|
+
_param = self._metadata_get_dataset_metadata_by_code_serialize(
|
|
415
|
+
dataset_code=dataset_code,
|
|
416
|
+
_request_auth=_request_auth,
|
|
417
|
+
_content_type=_content_type,
|
|
418
|
+
_headers=_headers,
|
|
419
|
+
_host_index=_host_index
|
|
420
|
+
)
|
|
421
|
+
|
|
422
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
423
|
+
'200': "DatasetMetadataDto",
|
|
424
|
+
'422': "ValidationProblemDetails",
|
|
425
|
+
}
|
|
426
|
+
response_data = self.api_client.call_api(
|
|
427
|
+
*_param,
|
|
428
|
+
_request_timeout=_request_timeout
|
|
429
|
+
)
|
|
430
|
+
response_data.read()
|
|
431
|
+
return self.api_client.response_deserialize(
|
|
432
|
+
response_data=response_data,
|
|
433
|
+
response_types_map=_response_types_map,
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
@validate_call
|
|
438
|
+
def metadata_get_dataset_metadata_by_code_without_preload_content(
|
|
439
|
+
self,
|
|
440
|
+
dataset_code: Annotated[StrictStr, Field(description="The code of the dataset")],
|
|
441
|
+
_request_timeout: Union[
|
|
442
|
+
None,
|
|
443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
444
|
+
Tuple[
|
|
445
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
446
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
447
|
+
]
|
|
448
|
+
] = None,
|
|
449
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
450
|
+
_content_type: Optional[StrictStr] = None,
|
|
451
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
452
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
453
|
+
) -> RESTResponseType:
|
|
454
|
+
"""Get the metadata behind a dataset
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
:param dataset_code: The code of the dataset (required)
|
|
458
|
+
:type dataset_code: str
|
|
459
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
460
|
+
number provided, it will be total request
|
|
461
|
+
timeout. It can also be a pair (tuple) of
|
|
462
|
+
(connection, read) timeouts.
|
|
463
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
464
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
465
|
+
request; this effectively ignores the
|
|
466
|
+
authentication in the spec for a single request.
|
|
467
|
+
:type _request_auth: dict, optional
|
|
468
|
+
:param _content_type: force content-type for the request.
|
|
469
|
+
:type _content_type: str, Optional
|
|
470
|
+
:param _headers: set to override the headers for a single
|
|
471
|
+
request; this effectively ignores the headers
|
|
472
|
+
in the spec for a single request.
|
|
473
|
+
:type _headers: dict, optional
|
|
474
|
+
:param _host_index: set to override the host_index for a single
|
|
475
|
+
request; this effectively ignores the host_index
|
|
476
|
+
in the spec for a single request.
|
|
477
|
+
:type _host_index: int, optional
|
|
478
|
+
:return: Returns the result object.
|
|
479
|
+
""" # noqa: E501
|
|
480
|
+
|
|
481
|
+
_param = self._metadata_get_dataset_metadata_by_code_serialize(
|
|
482
|
+
dataset_code=dataset_code,
|
|
483
|
+
_request_auth=_request_auth,
|
|
484
|
+
_content_type=_content_type,
|
|
485
|
+
_headers=_headers,
|
|
486
|
+
_host_index=_host_index
|
|
487
|
+
)
|
|
488
|
+
|
|
489
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
490
|
+
'200': "DatasetMetadataDto",
|
|
491
|
+
'422': "ValidationProblemDetails",
|
|
492
|
+
}
|
|
493
|
+
response_data = self.api_client.call_api(
|
|
494
|
+
*_param,
|
|
495
|
+
_request_timeout=_request_timeout
|
|
496
|
+
)
|
|
497
|
+
return response_data.response
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
def _metadata_get_dataset_metadata_by_code_serialize(
|
|
501
|
+
self,
|
|
502
|
+
dataset_code,
|
|
503
|
+
_request_auth,
|
|
504
|
+
_content_type,
|
|
505
|
+
_headers,
|
|
506
|
+
_host_index,
|
|
507
|
+
) -> RequestSerialized:
|
|
508
|
+
|
|
509
|
+
_host = None
|
|
510
|
+
|
|
511
|
+
_collection_formats: Dict[str, str] = {
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
_path_params: Dict[str, str] = {}
|
|
515
|
+
_query_params: List[Tuple[str, str]] = []
|
|
516
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
517
|
+
_form_params: List[Tuple[str, str]] = []
|
|
518
|
+
_files: Dict[
|
|
519
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
520
|
+
] = {}
|
|
521
|
+
_body_params: Optional[bytes] = None
|
|
522
|
+
|
|
523
|
+
# process the path parameters
|
|
524
|
+
if dataset_code is not None:
|
|
525
|
+
_path_params['DatasetCode'] = dataset_code
|
|
526
|
+
# process the query parameters
|
|
527
|
+
# process the header parameters
|
|
528
|
+
# process the form parameters
|
|
529
|
+
# process the body parameter
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
# set the HTTP header `Accept`
|
|
533
|
+
if 'Accept' not in _header_params:
|
|
534
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
535
|
+
[
|
|
536
|
+
'application/json'
|
|
537
|
+
]
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
# authentication setting
|
|
542
|
+
_auth_settings: List[str] = [
|
|
543
|
+
'oauth2'
|
|
544
|
+
]
|
|
545
|
+
|
|
546
|
+
return self.api_client.param_serialize(
|
|
547
|
+
method='GET',
|
|
548
|
+
resource_path='/Metadata/Dataset/ByCode/{DatasetCode}',
|
|
549
|
+
path_params=_path_params,
|
|
550
|
+
query_params=_query_params,
|
|
551
|
+
header_params=_header_params,
|
|
552
|
+
body=_body_params,
|
|
553
|
+
post_params=_form_params,
|
|
554
|
+
files=_files,
|
|
555
|
+
auth_settings=_auth_settings,
|
|
556
|
+
collection_formats=_collection_formats,
|
|
557
|
+
_host=_host,
|
|
558
|
+
_request_auth=_request_auth
|
|
559
|
+
)
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
@validate_call
|
|
565
|
+
def metadata_searchdatasets(
|
|
566
|
+
self,
|
|
567
|
+
search_string: Annotated[Optional[StrictStr], Field(description="Search for datasets with all of this keyword(s) (separate keywords by a space)")] = None,
|
|
568
|
+
_request_timeout: Union[
|
|
569
|
+
None,
|
|
570
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
571
|
+
Tuple[
|
|
572
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
573
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
574
|
+
]
|
|
575
|
+
] = None,
|
|
576
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
577
|
+
_content_type: Optional[StrictStr] = None,
|
|
578
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
579
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
580
|
+
) -> List[DatasetMetadataDto]:
|
|
581
|
+
"""Search datasets by specifying keywords
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
:param search_string: Search for datasets with all of this keyword(s) (separate keywords by a space)
|
|
585
|
+
:type search_string: str
|
|
586
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
587
|
+
number provided, it will be total request
|
|
588
|
+
timeout. It can also be a pair (tuple) of
|
|
589
|
+
(connection, read) timeouts.
|
|
590
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
591
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
592
|
+
request; this effectively ignores the
|
|
593
|
+
authentication in the spec for a single request.
|
|
594
|
+
:type _request_auth: dict, optional
|
|
595
|
+
:param _content_type: force content-type for the request.
|
|
596
|
+
:type _content_type: str, Optional
|
|
597
|
+
:param _headers: set to override the headers for a single
|
|
598
|
+
request; this effectively ignores the headers
|
|
599
|
+
in the spec for a single request.
|
|
600
|
+
:type _headers: dict, optional
|
|
601
|
+
:param _host_index: set to override the host_index for a single
|
|
602
|
+
request; this effectively ignores the host_index
|
|
603
|
+
in the spec for a single request.
|
|
604
|
+
:type _host_index: int, optional
|
|
605
|
+
:return: Returns the result object.
|
|
606
|
+
""" # noqa: E501
|
|
607
|
+
|
|
608
|
+
_param = self._metadata_searchdatasets_serialize(
|
|
609
|
+
search_string=search_string,
|
|
610
|
+
_request_auth=_request_auth,
|
|
611
|
+
_content_type=_content_type,
|
|
612
|
+
_headers=_headers,
|
|
613
|
+
_host_index=_host_index
|
|
614
|
+
)
|
|
615
|
+
|
|
616
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
617
|
+
'200': "List[DatasetMetadataDto]",
|
|
618
|
+
'422': "ValidationProblemDetails",
|
|
619
|
+
}
|
|
620
|
+
response_data = self.api_client.call_api(
|
|
621
|
+
*_param,
|
|
622
|
+
_request_timeout=_request_timeout
|
|
623
|
+
)
|
|
624
|
+
response_data.read()
|
|
625
|
+
return self.api_client.response_deserialize(
|
|
626
|
+
response_data=response_data,
|
|
627
|
+
response_types_map=_response_types_map,
|
|
628
|
+
).data
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
@validate_call
|
|
632
|
+
def metadata_searchdatasets_with_http_info(
|
|
633
|
+
self,
|
|
634
|
+
search_string: Annotated[Optional[StrictStr], Field(description="Search for datasets with all of this keyword(s) (separate keywords by a space)")] = None,
|
|
635
|
+
_request_timeout: Union[
|
|
636
|
+
None,
|
|
637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
638
|
+
Tuple[
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
641
|
+
]
|
|
642
|
+
] = None,
|
|
643
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
644
|
+
_content_type: Optional[StrictStr] = None,
|
|
645
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
647
|
+
) -> ApiResponse[List[DatasetMetadataDto]]:
|
|
648
|
+
"""Search datasets by specifying keywords
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
:param search_string: Search for datasets with all of this keyword(s) (separate keywords by a space)
|
|
652
|
+
:type search_string: str
|
|
653
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
654
|
+
number provided, it will be total request
|
|
655
|
+
timeout. It can also be a pair (tuple) of
|
|
656
|
+
(connection, read) timeouts.
|
|
657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
659
|
+
request; this effectively ignores the
|
|
660
|
+
authentication in the spec for a single request.
|
|
661
|
+
:type _request_auth: dict, optional
|
|
662
|
+
:param _content_type: force content-type for the request.
|
|
663
|
+
:type _content_type: str, Optional
|
|
664
|
+
:param _headers: set to override the headers for a single
|
|
665
|
+
request; this effectively ignores the headers
|
|
666
|
+
in the spec for a single request.
|
|
667
|
+
:type _headers: dict, optional
|
|
668
|
+
:param _host_index: set to override the host_index for a single
|
|
669
|
+
request; this effectively ignores the host_index
|
|
670
|
+
in the spec for a single request.
|
|
671
|
+
:type _host_index: int, optional
|
|
672
|
+
:return: Returns the result object.
|
|
673
|
+
""" # noqa: E501
|
|
674
|
+
|
|
675
|
+
_param = self._metadata_searchdatasets_serialize(
|
|
676
|
+
search_string=search_string,
|
|
677
|
+
_request_auth=_request_auth,
|
|
678
|
+
_content_type=_content_type,
|
|
679
|
+
_headers=_headers,
|
|
680
|
+
_host_index=_host_index
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
684
|
+
'200': "List[DatasetMetadataDto]",
|
|
685
|
+
'422': "ValidationProblemDetails",
|
|
686
|
+
}
|
|
687
|
+
response_data = self.api_client.call_api(
|
|
688
|
+
*_param,
|
|
689
|
+
_request_timeout=_request_timeout
|
|
690
|
+
)
|
|
691
|
+
response_data.read()
|
|
692
|
+
return self.api_client.response_deserialize(
|
|
693
|
+
response_data=response_data,
|
|
694
|
+
response_types_map=_response_types_map,
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
@validate_call
|
|
699
|
+
def metadata_searchdatasets_without_preload_content(
|
|
700
|
+
self,
|
|
701
|
+
search_string: Annotated[Optional[StrictStr], Field(description="Search for datasets with all of this keyword(s) (separate keywords by a space)")] = None,
|
|
702
|
+
_request_timeout: Union[
|
|
703
|
+
None,
|
|
704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
705
|
+
Tuple[
|
|
706
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
707
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
708
|
+
]
|
|
709
|
+
] = None,
|
|
710
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
711
|
+
_content_type: Optional[StrictStr] = None,
|
|
712
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
713
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
714
|
+
) -> RESTResponseType:
|
|
715
|
+
"""Search datasets by specifying keywords
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
:param search_string: Search for datasets with all of this keyword(s) (separate keywords by a space)
|
|
719
|
+
:type search_string: str
|
|
720
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
721
|
+
number provided, it will be total request
|
|
722
|
+
timeout. It can also be a pair (tuple) of
|
|
723
|
+
(connection, read) timeouts.
|
|
724
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
725
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
726
|
+
request; this effectively ignores the
|
|
727
|
+
authentication in the spec for a single request.
|
|
728
|
+
:type _request_auth: dict, optional
|
|
729
|
+
:param _content_type: force content-type for the request.
|
|
730
|
+
:type _content_type: str, Optional
|
|
731
|
+
:param _headers: set to override the headers for a single
|
|
732
|
+
request; this effectively ignores the headers
|
|
733
|
+
in the spec for a single request.
|
|
734
|
+
:type _headers: dict, optional
|
|
735
|
+
:param _host_index: set to override the host_index for a single
|
|
736
|
+
request; this effectively ignores the host_index
|
|
737
|
+
in the spec for a single request.
|
|
738
|
+
:type _host_index: int, optional
|
|
739
|
+
:return: Returns the result object.
|
|
740
|
+
""" # noqa: E501
|
|
741
|
+
|
|
742
|
+
_param = self._metadata_searchdatasets_serialize(
|
|
743
|
+
search_string=search_string,
|
|
744
|
+
_request_auth=_request_auth,
|
|
745
|
+
_content_type=_content_type,
|
|
746
|
+
_headers=_headers,
|
|
747
|
+
_host_index=_host_index
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
751
|
+
'200': "List[DatasetMetadataDto]",
|
|
752
|
+
'422': "ValidationProblemDetails",
|
|
753
|
+
}
|
|
754
|
+
response_data = self.api_client.call_api(
|
|
755
|
+
*_param,
|
|
756
|
+
_request_timeout=_request_timeout
|
|
757
|
+
)
|
|
758
|
+
return response_data.response
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
def _metadata_searchdatasets_serialize(
|
|
762
|
+
self,
|
|
763
|
+
search_string,
|
|
764
|
+
_request_auth,
|
|
765
|
+
_content_type,
|
|
766
|
+
_headers,
|
|
767
|
+
_host_index,
|
|
768
|
+
) -> RequestSerialized:
|
|
769
|
+
|
|
770
|
+
_host = None
|
|
771
|
+
|
|
772
|
+
_collection_formats: Dict[str, str] = {
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
_path_params: Dict[str, str] = {}
|
|
776
|
+
_query_params: List[Tuple[str, str]] = []
|
|
777
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
778
|
+
_form_params: List[Tuple[str, str]] = []
|
|
779
|
+
_files: Dict[
|
|
780
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
781
|
+
] = {}
|
|
782
|
+
_body_params: Optional[bytes] = None
|
|
783
|
+
|
|
784
|
+
# process the path parameters
|
|
785
|
+
# process the query parameters
|
|
786
|
+
if search_string is not None:
|
|
787
|
+
|
|
788
|
+
_query_params.append(('SearchString', search_string))
|
|
789
|
+
|
|
790
|
+
# process the header parameters
|
|
791
|
+
# process the form parameters
|
|
792
|
+
# process the body parameter
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
# set the HTTP header `Accept`
|
|
796
|
+
if 'Accept' not in _header_params:
|
|
797
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
798
|
+
[
|
|
799
|
+
'application/json'
|
|
800
|
+
]
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
# authentication setting
|
|
805
|
+
_auth_settings: List[str] = [
|
|
806
|
+
'oauth2'
|
|
807
|
+
]
|
|
808
|
+
|
|
809
|
+
return self.api_client.param_serialize(
|
|
810
|
+
method='GET',
|
|
811
|
+
resource_path='/Metadata/Dataset/Search',
|
|
812
|
+
path_params=_path_params,
|
|
813
|
+
query_params=_query_params,
|
|
814
|
+
header_params=_header_params,
|
|
815
|
+
body=_body_params,
|
|
816
|
+
post_params=_form_params,
|
|
817
|
+
files=_files,
|
|
818
|
+
auth_settings=_auth_settings,
|
|
819
|
+
collection_formats=_collection_formats,
|
|
820
|
+
_host=_host,
|
|
821
|
+
_request_auth=_request_auth
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
|