dapla-toolbelt-metadata 0.7.1__py3-none-any.whl → 0.8.0__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 dapla-toolbelt-metadata might be problematic. Click here for more details.
- dapla_metadata/datasets/core.py +24 -123
- dapla_metadata/datasets/model_backwards_compatibility.py +113 -6
- dapla_metadata/datasets/utility/utils.py +4 -9
- dapla_metadata/variable_definitions/_generated/.openapi-generator/FILES +3 -0
- dapla_metadata/variable_definitions/_generated/vardef_client/api/data_migration_api.py +468 -15
- dapla_metadata/variable_definitions/_generated/vardef_client/api/draft_variable_definitions_api.py +20 -51
- dapla_metadata/variable_definitions/_generated/vardef_client/api/patches_api.py +21 -52
- dapla_metadata/variable_definitions/_generated/vardef_client/api/validity_periods_api.py +13 -33
- dapla_metadata/variable_definitions/_generated/vardef_client/api/variable_definitions_api.py +16 -33
- dapla_metadata/variable_definitions/_generated/vardef_client/models/__init__.py +5 -0
- dapla_metadata/variable_definitions/_generated/vardef_client/models/get_vardok_vardef_mapping_by_id200_response.py +158 -0
- dapla_metadata/variable_definitions/_generated/vardef_client/models/language_string_type.py +1 -5
- dapla_metadata/variable_definitions/_generated/vardef_client/models/owner.py +1 -4
- dapla_metadata/variable_definitions/_generated/vardef_client/models/vardok_id_response.py +81 -0
- dapla_metadata/variable_definitions/_generated/vardef_client/models/vardok_vardef_id_pair_response.py +84 -0
- dapla_metadata/variable_definitions/_utils/variable_definition_files.py +23 -0
- dapla_metadata/variable_definitions/vardef.py +79 -1
- dapla_metadata/variable_definitions/vardok_id.py +44 -0
- dapla_metadata/variable_definitions/vardok_vardef_id_pair.py +43 -0
- dapla_metadata/variable_definitions/variable_definition.py +5 -18
- {dapla_toolbelt_metadata-0.7.1.dist-info → dapla_toolbelt_metadata-0.8.0.dist-info}/METADATA +2 -2
- {dapla_toolbelt_metadata-0.7.1.dist-info → dapla_toolbelt_metadata-0.8.0.dist-info}/RECORD +24 -19
- {dapla_toolbelt_metadata-0.7.1.dist-info → dapla_toolbelt_metadata-0.8.0.dist-info}/LICENSE +0 -0
- {dapla_toolbelt_metadata-0.7.1.dist-info → dapla_toolbelt_metadata-0.8.0.dist-info}/WHEEL +0 -0
|
@@ -22,6 +22,10 @@ from ..api_client import ApiClient
|
|
|
22
22
|
from ..api_client import RequestSerialized
|
|
23
23
|
from ..api_response import ApiResponse
|
|
24
24
|
from ..models.complete_response import CompleteResponse
|
|
25
|
+
from ..models.get_vardok_vardef_mapping_by_id200_response import (
|
|
26
|
+
GetVardokVardefMappingById200Response,
|
|
27
|
+
)
|
|
28
|
+
from ..models.vardok_vardef_id_pair_response import VardokVardefIdPairResponse
|
|
25
29
|
from ..rest import RESTResponseType
|
|
26
30
|
|
|
27
31
|
|
|
@@ -100,8 +104,7 @@ class DataMigrationApi:
|
|
|
100
104
|
"400": "Problem",
|
|
101
105
|
}
|
|
102
106
|
response_data = self.api_client.call_api(
|
|
103
|
-
*_param,
|
|
104
|
-
_request_timeout=_request_timeout,
|
|
107
|
+
*_param, _request_timeout=_request_timeout
|
|
105
108
|
)
|
|
106
109
|
response_data.read()
|
|
107
110
|
return self.api_client.response_deserialize(
|
|
@@ -172,8 +175,7 @@ class DataMigrationApi:
|
|
|
172
175
|
"400": "Problem",
|
|
173
176
|
}
|
|
174
177
|
response_data = self.api_client.call_api(
|
|
175
|
-
*_param,
|
|
176
|
-
_request_timeout=_request_timeout,
|
|
178
|
+
*_param, _request_timeout=_request_timeout
|
|
177
179
|
)
|
|
178
180
|
response_data.read()
|
|
179
181
|
return self.api_client.response_deserialize(
|
|
@@ -244,8 +246,7 @@ class DataMigrationApi:
|
|
|
244
246
|
"400": "Problem",
|
|
245
247
|
}
|
|
246
248
|
response_data = self.api_client.call_api(
|
|
247
|
-
*_param,
|
|
248
|
-
_request_timeout=_request_timeout,
|
|
249
|
+
*_param, _request_timeout=_request_timeout
|
|
249
250
|
)
|
|
250
251
|
return response_data.response
|
|
251
252
|
|
|
@@ -267,8 +268,7 @@ class DataMigrationApi:
|
|
|
267
268
|
_header_params: dict[str, str | None] = _headers or {}
|
|
268
269
|
_form_params: list[tuple[str, str]] = []
|
|
269
270
|
_files: dict[
|
|
270
|
-
str,
|
|
271
|
-
str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]],
|
|
271
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
272
272
|
] = {}
|
|
273
273
|
_body_params: bytes | None = None
|
|
274
274
|
|
|
@@ -286,16 +286,11 @@ class DataMigrationApi:
|
|
|
286
286
|
# set the HTTP header `Accept`
|
|
287
287
|
if "Accept" not in _header_params:
|
|
288
288
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
289
|
-
[
|
|
290
|
-
"application/json",
|
|
291
|
-
"application/problem+json",
|
|
292
|
-
],
|
|
289
|
+
["application/json", "application/problem+json"]
|
|
293
290
|
)
|
|
294
291
|
|
|
295
292
|
# authentication setting
|
|
296
|
-
_auth_settings: list[str] = [
|
|
297
|
-
"keycloak_token",
|
|
298
|
-
]
|
|
293
|
+
_auth_settings: list[str] = ["keycloak_token"]
|
|
299
294
|
|
|
300
295
|
return self.api_client.param_serialize(
|
|
301
296
|
method="POST",
|
|
@@ -311,3 +306,461 @@ class DataMigrationApi:
|
|
|
311
306
|
_host=_host,
|
|
312
307
|
_request_auth=_request_auth,
|
|
313
308
|
)
|
|
309
|
+
|
|
310
|
+
@validate_call
|
|
311
|
+
def get_vardok_vardef_mapping(
|
|
312
|
+
self,
|
|
313
|
+
_request_timeout: None
|
|
314
|
+
| Annotated[StrictFloat, Field(gt=0)]
|
|
315
|
+
| tuple[
|
|
316
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
317
|
+
] = None,
|
|
318
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
319
|
+
_content_type: StrictStr | None = None,
|
|
320
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
321
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
322
|
+
) -> list[VardokVardefIdPairResponse]:
|
|
323
|
+
"""Get a list of all vardok and vardef id mappings
|
|
324
|
+
|
|
325
|
+
Get a list of all vardok and vardef id mappings
|
|
326
|
+
|
|
327
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
328
|
+
number provided, it will be total request
|
|
329
|
+
timeout. It can also be a pair (tuple) of
|
|
330
|
+
(connection, read) timeouts.
|
|
331
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
332
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
333
|
+
request; this effectively ignores the
|
|
334
|
+
authentication in the spec for a single request.
|
|
335
|
+
:type _request_auth: dict, optional
|
|
336
|
+
:param _content_type: force content-type for the request.
|
|
337
|
+
:type _content_type: str, Optional
|
|
338
|
+
:param _headers: set to override the headers for a single
|
|
339
|
+
request; this effectively ignores the headers
|
|
340
|
+
in the spec for a single request.
|
|
341
|
+
:type _headers: dict, optional
|
|
342
|
+
:param _host_index: set to override the host_index for a single
|
|
343
|
+
request; this effectively ignores the host_index
|
|
344
|
+
in the spec for a single request.
|
|
345
|
+
:type _host_index: int, optional
|
|
346
|
+
:return: Returns the result object.
|
|
347
|
+
"""
|
|
348
|
+
_param = self._get_vardok_vardef_mapping_serialize(
|
|
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, str | None] = {
|
|
356
|
+
"200": "List[VardokVardefIdPairResponse]",
|
|
357
|
+
}
|
|
358
|
+
response_data = self.api_client.call_api(
|
|
359
|
+
*_param, _request_timeout=_request_timeout
|
|
360
|
+
)
|
|
361
|
+
response_data.read()
|
|
362
|
+
return self.api_client.response_deserialize(
|
|
363
|
+
response_data=response_data,
|
|
364
|
+
response_types_map=_response_types_map,
|
|
365
|
+
).data
|
|
366
|
+
|
|
367
|
+
@validate_call
|
|
368
|
+
def get_vardok_vardef_mapping_with_http_info(
|
|
369
|
+
self,
|
|
370
|
+
_request_timeout: None
|
|
371
|
+
| Annotated[StrictFloat, Field(gt=0)]
|
|
372
|
+
| tuple[
|
|
373
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
374
|
+
] = None,
|
|
375
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
376
|
+
_content_type: StrictStr | None = None,
|
|
377
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
378
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
379
|
+
) -> ApiResponse[list[VardokVardefIdPairResponse]]:
|
|
380
|
+
"""Get a list of all vardok and vardef id mappings
|
|
381
|
+
|
|
382
|
+
Get a list of all vardok and vardef id mappings
|
|
383
|
+
|
|
384
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
385
|
+
number provided, it will be total request
|
|
386
|
+
timeout. It can also be a pair (tuple) of
|
|
387
|
+
(connection, read) timeouts.
|
|
388
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
389
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
390
|
+
request; this effectively ignores the
|
|
391
|
+
authentication in the spec for a single request.
|
|
392
|
+
:type _request_auth: dict, optional
|
|
393
|
+
:param _content_type: force content-type for the request.
|
|
394
|
+
:type _content_type: str, Optional
|
|
395
|
+
:param _headers: set to override the headers for a single
|
|
396
|
+
request; this effectively ignores the headers
|
|
397
|
+
in the spec for a single request.
|
|
398
|
+
:type _headers: dict, optional
|
|
399
|
+
:param _host_index: set to override the host_index for a single
|
|
400
|
+
request; this effectively ignores the host_index
|
|
401
|
+
in the spec for a single request.
|
|
402
|
+
:type _host_index: int, optional
|
|
403
|
+
:return: Returns the result object.
|
|
404
|
+
"""
|
|
405
|
+
_param = self._get_vardok_vardef_mapping_serialize(
|
|
406
|
+
_request_auth=_request_auth,
|
|
407
|
+
_content_type=_content_type,
|
|
408
|
+
_headers=_headers,
|
|
409
|
+
_host_index=_host_index,
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
_response_types_map: dict[str, str | None] = {
|
|
413
|
+
"200": "List[VardokVardefIdPairResponse]",
|
|
414
|
+
}
|
|
415
|
+
response_data = self.api_client.call_api(
|
|
416
|
+
*_param, _request_timeout=_request_timeout
|
|
417
|
+
)
|
|
418
|
+
response_data.read()
|
|
419
|
+
return self.api_client.response_deserialize(
|
|
420
|
+
response_data=response_data,
|
|
421
|
+
response_types_map=_response_types_map,
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
@validate_call
|
|
425
|
+
def get_vardok_vardef_mapping_without_preload_content(
|
|
426
|
+
self,
|
|
427
|
+
_request_timeout: None
|
|
428
|
+
| Annotated[StrictFloat, Field(gt=0)]
|
|
429
|
+
| tuple[
|
|
430
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
431
|
+
] = None,
|
|
432
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
433
|
+
_content_type: StrictStr | None = None,
|
|
434
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
435
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
436
|
+
) -> RESTResponseType:
|
|
437
|
+
"""Get a list of all vardok and vardef id mappings
|
|
438
|
+
|
|
439
|
+
Get a list of all vardok and vardef id mappings
|
|
440
|
+
|
|
441
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
442
|
+
number provided, it will be total request
|
|
443
|
+
timeout. It can also be a pair (tuple) of
|
|
444
|
+
(connection, read) timeouts.
|
|
445
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
446
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
447
|
+
request; this effectively ignores the
|
|
448
|
+
authentication in the spec for a single request.
|
|
449
|
+
:type _request_auth: dict, optional
|
|
450
|
+
:param _content_type: force content-type for the request.
|
|
451
|
+
:type _content_type: str, Optional
|
|
452
|
+
:param _headers: set to override the headers for a single
|
|
453
|
+
request; this effectively ignores the headers
|
|
454
|
+
in the spec for a single request.
|
|
455
|
+
:type _headers: dict, optional
|
|
456
|
+
:param _host_index: set to override the host_index for a single
|
|
457
|
+
request; this effectively ignores the host_index
|
|
458
|
+
in the spec for a single request.
|
|
459
|
+
:type _host_index: int, optional
|
|
460
|
+
:return: Returns the result object.
|
|
461
|
+
"""
|
|
462
|
+
_param = self._get_vardok_vardef_mapping_serialize(
|
|
463
|
+
_request_auth=_request_auth,
|
|
464
|
+
_content_type=_content_type,
|
|
465
|
+
_headers=_headers,
|
|
466
|
+
_host_index=_host_index,
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
_response_types_map: dict[str, str | None] = {
|
|
470
|
+
"200": "List[VardokVardefIdPairResponse]",
|
|
471
|
+
}
|
|
472
|
+
response_data = self.api_client.call_api(
|
|
473
|
+
*_param, _request_timeout=_request_timeout
|
|
474
|
+
)
|
|
475
|
+
return response_data.response
|
|
476
|
+
|
|
477
|
+
def _get_vardok_vardef_mapping_serialize(
|
|
478
|
+
self,
|
|
479
|
+
_request_auth,
|
|
480
|
+
_content_type,
|
|
481
|
+
_headers,
|
|
482
|
+
_host_index,
|
|
483
|
+
) -> RequestSerialized:
|
|
484
|
+
_host = None
|
|
485
|
+
|
|
486
|
+
_collection_formats: dict[str, str] = {}
|
|
487
|
+
|
|
488
|
+
_path_params: dict[str, str] = {}
|
|
489
|
+
_query_params: list[tuple[str, str]] = []
|
|
490
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
491
|
+
_form_params: list[tuple[str, str]] = []
|
|
492
|
+
_files: dict[
|
|
493
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
494
|
+
] = {}
|
|
495
|
+
_body_params: bytes | None = None
|
|
496
|
+
|
|
497
|
+
# process the path parameters
|
|
498
|
+
# process the query parameters
|
|
499
|
+
# process the header parameters
|
|
500
|
+
# process the form parameters
|
|
501
|
+
# process the body parameter
|
|
502
|
+
|
|
503
|
+
# set the HTTP header `Accept`
|
|
504
|
+
if "Accept" not in _header_params:
|
|
505
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
506
|
+
["application/json"]
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
# authentication setting
|
|
510
|
+
_auth_settings: list[str] = ["keycloak_token"]
|
|
511
|
+
|
|
512
|
+
return self.api_client.param_serialize(
|
|
513
|
+
method="GET",
|
|
514
|
+
resource_path="/vardok-migration",
|
|
515
|
+
path_params=_path_params,
|
|
516
|
+
query_params=_query_params,
|
|
517
|
+
header_params=_header_params,
|
|
518
|
+
body=_body_params,
|
|
519
|
+
post_params=_form_params,
|
|
520
|
+
files=_files,
|
|
521
|
+
auth_settings=_auth_settings,
|
|
522
|
+
collection_formats=_collection_formats,
|
|
523
|
+
_host=_host,
|
|
524
|
+
_request_auth=_request_auth,
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
@validate_call
|
|
528
|
+
def get_vardok_vardef_mapping_by_id(
|
|
529
|
+
self,
|
|
530
|
+
id: Annotated[
|
|
531
|
+
StrictStr,
|
|
532
|
+
Field(description="The ID of the definition in Vardok or Vardef."),
|
|
533
|
+
],
|
|
534
|
+
_request_timeout: None
|
|
535
|
+
| Annotated[StrictFloat, Field(gt=0)]
|
|
536
|
+
| tuple[
|
|
537
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
538
|
+
] = None,
|
|
539
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
540
|
+
_content_type: StrictStr | None = None,
|
|
541
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
542
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
543
|
+
) -> GetVardokVardefMappingById200Response:
|
|
544
|
+
"""Get one variable definition by vardok id or get the vardok id by vardef id.
|
|
545
|
+
|
|
546
|
+
Get one variable definition by vardok id or get the vardok id by vardef id.
|
|
547
|
+
|
|
548
|
+
:param id: The ID of the definition in Vardok or Vardef. (required)
|
|
549
|
+
:type id: str
|
|
550
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
551
|
+
number provided, it will be total request
|
|
552
|
+
timeout. It can also be a pair (tuple) of
|
|
553
|
+
(connection, read) timeouts.
|
|
554
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
555
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
556
|
+
request; this effectively ignores the
|
|
557
|
+
authentication in the spec for a single request.
|
|
558
|
+
:type _request_auth: dict, optional
|
|
559
|
+
:param _content_type: force content-type for the request.
|
|
560
|
+
:type _content_type: str, Optional
|
|
561
|
+
:param _headers: set to override the headers for a single
|
|
562
|
+
request; this effectively ignores the headers
|
|
563
|
+
in the spec for a single request.
|
|
564
|
+
:type _headers: dict, optional
|
|
565
|
+
:param _host_index: set to override the host_index for a single
|
|
566
|
+
request; this effectively ignores the host_index
|
|
567
|
+
in the spec for a single request.
|
|
568
|
+
:type _host_index: int, optional
|
|
569
|
+
:return: Returns the result object.
|
|
570
|
+
"""
|
|
571
|
+
_param = self._get_vardok_vardef_mapping_by_id_serialize(
|
|
572
|
+
id=id,
|
|
573
|
+
_request_auth=_request_auth,
|
|
574
|
+
_content_type=_content_type,
|
|
575
|
+
_headers=_headers,
|
|
576
|
+
_host_index=_host_index,
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
_response_types_map: dict[str, str | None] = {
|
|
580
|
+
"200": "GetVardokVardefMappingById200Response",
|
|
581
|
+
}
|
|
582
|
+
response_data = self.api_client.call_api(
|
|
583
|
+
*_param, _request_timeout=_request_timeout
|
|
584
|
+
)
|
|
585
|
+
response_data.read()
|
|
586
|
+
return self.api_client.response_deserialize(
|
|
587
|
+
response_data=response_data,
|
|
588
|
+
response_types_map=_response_types_map,
|
|
589
|
+
).data
|
|
590
|
+
|
|
591
|
+
@validate_call
|
|
592
|
+
def get_vardok_vardef_mapping_by_id_with_http_info(
|
|
593
|
+
self,
|
|
594
|
+
id: Annotated[
|
|
595
|
+
StrictStr,
|
|
596
|
+
Field(description="The ID of the definition in Vardok or Vardef."),
|
|
597
|
+
],
|
|
598
|
+
_request_timeout: None
|
|
599
|
+
| Annotated[StrictFloat, Field(gt=0)]
|
|
600
|
+
| tuple[
|
|
601
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
602
|
+
] = None,
|
|
603
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
604
|
+
_content_type: StrictStr | None = None,
|
|
605
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
607
|
+
) -> ApiResponse[GetVardokVardefMappingById200Response]:
|
|
608
|
+
"""Get one variable definition by vardok id or get the vardok id by vardef id.
|
|
609
|
+
|
|
610
|
+
Get one variable definition by vardok id or get the vardok id by vardef id.
|
|
611
|
+
|
|
612
|
+
:param id: The ID of the definition in Vardok or Vardef. (required)
|
|
613
|
+
:type id: str
|
|
614
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
615
|
+
number provided, it will be total request
|
|
616
|
+
timeout. It can also be a pair (tuple) of
|
|
617
|
+
(connection, read) timeouts.
|
|
618
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
619
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
620
|
+
request; this effectively ignores the
|
|
621
|
+
authentication in the spec for a single request.
|
|
622
|
+
:type _request_auth: dict, optional
|
|
623
|
+
:param _content_type: force content-type for the request.
|
|
624
|
+
:type _content_type: str, Optional
|
|
625
|
+
:param _headers: set to override the headers for a single
|
|
626
|
+
request; this effectively ignores the headers
|
|
627
|
+
in the spec for a single request.
|
|
628
|
+
:type _headers: dict, optional
|
|
629
|
+
:param _host_index: set to override the host_index for a single
|
|
630
|
+
request; this effectively ignores the host_index
|
|
631
|
+
in the spec for a single request.
|
|
632
|
+
:type _host_index: int, optional
|
|
633
|
+
:return: Returns the result object.
|
|
634
|
+
"""
|
|
635
|
+
_param = self._get_vardok_vardef_mapping_by_id_serialize(
|
|
636
|
+
id=id,
|
|
637
|
+
_request_auth=_request_auth,
|
|
638
|
+
_content_type=_content_type,
|
|
639
|
+
_headers=_headers,
|
|
640
|
+
_host_index=_host_index,
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
_response_types_map: dict[str, str | None] = {
|
|
644
|
+
"200": "GetVardokVardefMappingById200Response",
|
|
645
|
+
}
|
|
646
|
+
response_data = self.api_client.call_api(
|
|
647
|
+
*_param, _request_timeout=_request_timeout
|
|
648
|
+
)
|
|
649
|
+
response_data.read()
|
|
650
|
+
return self.api_client.response_deserialize(
|
|
651
|
+
response_data=response_data,
|
|
652
|
+
response_types_map=_response_types_map,
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
@validate_call
|
|
656
|
+
def get_vardok_vardef_mapping_by_id_without_preload_content(
|
|
657
|
+
self,
|
|
658
|
+
id: Annotated[
|
|
659
|
+
StrictStr,
|
|
660
|
+
Field(description="The ID of the definition in Vardok or Vardef."),
|
|
661
|
+
],
|
|
662
|
+
_request_timeout: None
|
|
663
|
+
| Annotated[StrictFloat, Field(gt=0)]
|
|
664
|
+
| tuple[
|
|
665
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
666
|
+
] = None,
|
|
667
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
668
|
+
_content_type: StrictStr | None = None,
|
|
669
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
670
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
671
|
+
) -> RESTResponseType:
|
|
672
|
+
"""Get one variable definition by vardok id or get the vardok id by vardef id.
|
|
673
|
+
|
|
674
|
+
Get one variable definition by vardok id or get the vardok id by vardef id.
|
|
675
|
+
|
|
676
|
+
:param id: The ID of the definition in Vardok or Vardef. (required)
|
|
677
|
+
:type id: str
|
|
678
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
679
|
+
number provided, it will be total request
|
|
680
|
+
timeout. It can also be a pair (tuple) of
|
|
681
|
+
(connection, read) timeouts.
|
|
682
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
683
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
684
|
+
request; this effectively ignores the
|
|
685
|
+
authentication in the spec for a single request.
|
|
686
|
+
:type _request_auth: dict, optional
|
|
687
|
+
:param _content_type: force content-type for the request.
|
|
688
|
+
:type _content_type: str, Optional
|
|
689
|
+
:param _headers: set to override the headers for a single
|
|
690
|
+
request; this effectively ignores the headers
|
|
691
|
+
in the spec for a single request.
|
|
692
|
+
:type _headers: dict, optional
|
|
693
|
+
:param _host_index: set to override the host_index for a single
|
|
694
|
+
request; this effectively ignores the host_index
|
|
695
|
+
in the spec for a single request.
|
|
696
|
+
:type _host_index: int, optional
|
|
697
|
+
:return: Returns the result object.
|
|
698
|
+
"""
|
|
699
|
+
_param = self._get_vardok_vardef_mapping_by_id_serialize(
|
|
700
|
+
id=id,
|
|
701
|
+
_request_auth=_request_auth,
|
|
702
|
+
_content_type=_content_type,
|
|
703
|
+
_headers=_headers,
|
|
704
|
+
_host_index=_host_index,
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
_response_types_map: dict[str, str | None] = {
|
|
708
|
+
"200": "GetVardokVardefMappingById200Response",
|
|
709
|
+
}
|
|
710
|
+
response_data = self.api_client.call_api(
|
|
711
|
+
*_param, _request_timeout=_request_timeout
|
|
712
|
+
)
|
|
713
|
+
return response_data.response
|
|
714
|
+
|
|
715
|
+
def _get_vardok_vardef_mapping_by_id_serialize(
|
|
716
|
+
self,
|
|
717
|
+
id,
|
|
718
|
+
_request_auth,
|
|
719
|
+
_content_type,
|
|
720
|
+
_headers,
|
|
721
|
+
_host_index,
|
|
722
|
+
) -> RequestSerialized:
|
|
723
|
+
_host = None
|
|
724
|
+
|
|
725
|
+
_collection_formats: dict[str, str] = {}
|
|
726
|
+
|
|
727
|
+
_path_params: dict[str, str] = {}
|
|
728
|
+
_query_params: list[tuple[str, str]] = []
|
|
729
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
730
|
+
_form_params: list[tuple[str, str]] = []
|
|
731
|
+
_files: dict[
|
|
732
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
733
|
+
] = {}
|
|
734
|
+
_body_params: bytes | None = None
|
|
735
|
+
|
|
736
|
+
# process the path parameters
|
|
737
|
+
if id is not None:
|
|
738
|
+
_path_params["id"] = id
|
|
739
|
+
# process the query parameters
|
|
740
|
+
# process the header parameters
|
|
741
|
+
# process the form parameters
|
|
742
|
+
# process the body parameter
|
|
743
|
+
|
|
744
|
+
# set the HTTP header `Accept`
|
|
745
|
+
if "Accept" not in _header_params:
|
|
746
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
747
|
+
["application/json"]
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
# authentication setting
|
|
751
|
+
_auth_settings: list[str] = ["keycloak_token"]
|
|
752
|
+
|
|
753
|
+
return self.api_client.param_serialize(
|
|
754
|
+
method="GET",
|
|
755
|
+
resource_path="/vardok-migration/{id}",
|
|
756
|
+
path_params=_path_params,
|
|
757
|
+
query_params=_query_params,
|
|
758
|
+
header_params=_header_params,
|
|
759
|
+
body=_body_params,
|
|
760
|
+
post_params=_form_params,
|
|
761
|
+
files=_files,
|
|
762
|
+
auth_settings=_auth_settings,
|
|
763
|
+
collection_formats=_collection_formats,
|
|
764
|
+
_host=_host,
|
|
765
|
+
_request_auth=_request_auth,
|
|
766
|
+
)
|