dapla-toolbelt-metadata 0.4.2__py3-none-any.whl → 0.5.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.

Files changed (81) hide show
  1. dapla_metadata/__init__.py +7 -0
  2. dapla_metadata/dapla/__init__.py +1 -0
  3. dapla_metadata/{_shared → dapla}/user_info.py +55 -8
  4. dapla_metadata/datasets/code_list.py +1 -1
  5. dapla_metadata/datasets/core.py +1 -1
  6. dapla_metadata/datasets/dataset_parser.py +1 -1
  7. dapla_metadata/datasets/model_backwards_compatibility.py +6 -6
  8. dapla_metadata/datasets/model_validation.py +2 -2
  9. dapla_metadata/datasets/utility/constants.py +1 -0
  10. dapla_metadata/datasets/utility/enums.py +1 -1
  11. dapla_metadata/datasets/utility/utils.py +7 -11
  12. dapla_metadata/variable_definitions/__init__.py +5 -3
  13. dapla_metadata/variable_definitions/{generated → _generated}/.openapi-generator/FILES +0 -5
  14. dapla_metadata/variable_definitions/_generated/.openapi-generator/VERSION +1 -0
  15. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/__init__.py +0 -5
  16. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api/__init__.py +0 -1
  17. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api/data_migration_api.py +2 -2
  18. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api/draft_variable_definitions_api.py +14 -14
  19. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api/patches_api.py +15 -15
  20. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api/validity_periods_api.py +8 -281
  21. dapla_metadata/variable_definitions/{generated/vardef_client/api/public_api.py → _generated/vardef_client/api/variable_definitions_api.py} +73 -358
  22. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/__init__.py +2 -6
  23. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/complete_response.py +8 -32
  24. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/contact.py +2 -2
  25. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/draft.py +8 -23
  26. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/language_string_type.py +7 -6
  27. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/owner.py +2 -2
  28. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/patch.py +16 -61
  29. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/problem.py +2 -2
  30. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/update_draft.py +22 -55
  31. dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/models/validity_period.py +14 -48
  32. dapla_metadata/variable_definitions/_generated/vardef_client/models/variable_status.py +33 -0
  33. dapla_metadata/variable_definitions/_utils/__init__.py +1 -0
  34. dapla_metadata/variable_definitions/{_client.py → _utils/_client.py} +5 -3
  35. dapla_metadata/variable_definitions/{config.py → _utils/config.py} +25 -1
  36. dapla_metadata/variable_definitions/_utils/constants.py +41 -0
  37. dapla_metadata/variable_definitions/_utils/descriptions.py +86 -0
  38. dapla_metadata/variable_definitions/_utils/files.py +273 -0
  39. dapla_metadata/variable_definitions/_utils/template_files.py +112 -0
  40. dapla_metadata/variable_definitions/_utils/variable_definition_files.py +93 -0
  41. dapla_metadata/variable_definitions/exceptions.py +141 -11
  42. dapla_metadata/variable_definitions/resources/vardef_model_descriptions_nb.yaml +63 -0
  43. dapla_metadata/variable_definitions/vardef.py +131 -10
  44. dapla_metadata/variable_definitions/variable_definition.py +241 -43
  45. {dapla_toolbelt_metadata-0.4.2.dist-info → dapla_toolbelt_metadata-0.5.0.dist-info}/METADATA +5 -7
  46. dapla_toolbelt_metadata-0.5.0.dist-info/RECORD +84 -0
  47. {dapla_toolbelt_metadata-0.4.2.dist-info → dapla_toolbelt_metadata-0.5.0.dist-info}/WHEEL +1 -1
  48. dapla_metadata/variable_definitions/generated/.openapi-generator/VERSION +0 -1
  49. dapla_metadata/variable_definitions/generated/vardef_client/api/variable_definitions_api.py +0 -1205
  50. dapla_metadata/variable_definitions/generated/vardef_client/models/klass_reference.py +0 -99
  51. dapla_metadata/variable_definitions/generated/vardef_client/models/rendered_contact.py +0 -92
  52. dapla_metadata/variable_definitions/generated/vardef_client/models/rendered_variable_definition.py +0 -235
  53. dapla_metadata/variable_definitions/generated/vardef_client/models/supported_languages.py +0 -33
  54. dapla_metadata/variable_definitions/generated/vardef_client/models/variable_status.py +0 -33
  55. dapla_toolbelt_metadata-0.4.2.dist-info/RECORD +0 -81
  56. /dapla_metadata/variable_definitions/{generated → _generated}/.openapi-generator-ignore +0 -0
  57. /dapla_metadata/variable_definitions/{generated → _generated}/README.md +0 -0
  58. /dapla_metadata/variable_definitions/{generated → _generated}/__init__.py +0 -0
  59. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api_client.py +0 -0
  60. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/api_response.py +0 -0
  61. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/configuration.py +0 -0
  62. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/CompleteResponse.md +0 -0
  63. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/Contact.md +0 -0
  64. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/DataMigrationApi.md +0 -0
  65. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/Draft.md +0 -0
  66. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/DraftVariableDefinitionsApi.md +0 -0
  67. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/LanguageStringType.md +0 -0
  68. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/Owner.md +0 -0
  69. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/Patch.md +0 -0
  70. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/PatchesApi.md +0 -0
  71. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/PublicApi.md +0 -0
  72. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/SupportedLanguages.md +0 -0
  73. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/UpdateDraft.md +0 -0
  74. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/ValidityPeriod.md +0 -0
  75. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/ValidityPeriodsApi.md +0 -0
  76. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/VariableDefinitionsApi.md +0 -0
  77. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/docs/VariableStatus.md +0 -0
  78. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/exceptions.py +0 -0
  79. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/py.typed +0 -0
  80. /dapla_metadata/variable_definitions/{generated → _generated}/vardef_client/rest.py +0 -0
  81. {dapla_toolbelt_metadata-0.4.2.dist-info → dapla_toolbelt_metadata-0.5.0.dist-info}/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
- """Variable Definitions
1
+ """Internal Variable Definitions Administration API
2
2
 
3
- ## Introduction Variable Definitions are centralized definitions of concrete variables which are typically present in multiple datasets. Variable Definitions support standardization of data and metadata and facilitate sharing and joining of data by clarifying when variables have an identical definition. ## Maintenance of Variable Definitions This API allows for creation, maintenance and access of Variable Definitions. ### Ownership Creation and maintenance of variables may only be performed by Statistics Norway employees representing a specific Dapla team, who are defined as the owners of a given Variable Definition. The team an owner represents must be specified when making a request through the `active_group` query parameter. All maintenance is to be performed by the owners, with no intervention from administrators. ### Status All Variable Definitions have an associated status. The possible values for status are `DRAFT`, `PUBLISHED_INTERNAL` and `PUBLISHED_EXTERNAL`. #### Draft When a Variable Definition is created it is assigned the status `DRAFT`. Under this status the Variable Definition is: - Only visible to Statistics Norway employees. - Mutable (it may be changed directly without need for versioning). - Not suitable to refer to from other systems. This status may be changed to `PUBLISHED_INTERNAL` or `PUBLISHED_EXTERNAL` with a direct update. #### Published Internal Under this status the Variable Definition is: - Only visible to Statistics Norway employees. - Immutable (all changes are versioned). - Suitable to refer to in internal systems for statistics production. - Not suitable to refer to for external use (for example in Statistikkbanken). This status may be changed to `PUBLISHED_EXTERNAL` by creating a Patch version. #### Published External Under this status the Variable Definition is: - Visible to the general public. - Immutable (all changes are versioned). - Suitable to refer to from any system. This status may not be changed as it would break immutability. If a Variable Definition is no longer relevant then its period of validity should be ended by specifying a `valid_until` date in a Patch version. ### Immutability Variable Definitions are immutable. This means that any changes must be performed in a strict versioning system. Consumers can avoid being exposed to breaking changes by specifying a `date_of_validity` when they request a Variable Definition. #### Patches Patches are for changes which do not affect the fundamental meaning of the Variable Definition. #### Validity Periods Validity Periods are versions with a period defined by a `valid_from` date and optionally a `valid_until` date. If the fundamental meaning of a Variable Definition is to be changed, it should be done by creating a new Validity Period.
3
+ ## Introduction Variable Definitions are centralized definitions of concrete variables which are typically present in multiple datasets. Variable Definitions support standardization of data and metadata and facilitate sharing and joining of data by clarifying when variables have an identical definition. ## Maintenance of Variable Definitions This API allows for creation, maintenance and access of Variable Definitions. ### Ownership Creation and maintenance of variables may only be performed by Statistics Norway employees representing a specific Dapla team, who are defined as the owners of a given Variable Definition. The team an owner represents must be specified when making a request through the `active_group` query parameter. All maintenance is to be performed by the owners, with no intervention from administrators. ### Status All Variable Definitions have an associated status. The possible values for status are `DRAFT`, `PUBLISHED_INTERNAL` and `PUBLISHED_EXTERNAL`. #### Draft When a Variable Definition is created it is assigned the status `DRAFT`. Under this status the Variable Definition is: - Only visible to Statistics Norway employees. - Mutable (it may be changed directly without need for versioning). - Not suitable to refer to from other systems. This status may be changed to `PUBLISHED_INTERNAL` or `PUBLISHED_EXTERNAL` with a direct update. #### Published Internal Under this status the Variable Definition is: - Only visible to Statistics Norway employees. - Immutable (all changes are versioned). - Suitable to refer to in internal systems for statistics production. - Not suitable to refer to for external use (for example in Statistikkbanken). This status may be changed to `PUBLISHED_EXTERNAL` by creating a Patch version. #### Published External Under this status the Variable Definition is: - Visible to the general public. - Immutable (all changes are versioned). - Suitable to refer to from any system. This status may not be changed as it would break immutability. If a Variable Definition is no longer relevant then its period of validity should be ended by specifying a `valid_until` date in a Patch version. ### Immutability Variable Definitions are immutable. This means that any changes must be performed in a strict versioning system. Consumers can avoid being exposed to breaking changes by specifying a `date_of_validity` when they request a Variable Definition. #### Patches Patches are for changes which do not affect the fundamental meaning of the Variable Definition. #### Validity Periods Validity Periods are versions with a period defined by a `valid_from` date and optionally a `valid_until` date. If the fundamental meaning of a Variable Definition is to be changed, it should be done by creating a new Validity Period.
4
4
 
5
5
  The version of the OpenAPI document: 0.1
6
6
  Contact: metadata@ssb.no
@@ -22,12 +22,11 @@ from pydantic import validate_call
22
22
  from ..api_client import ApiClient
23
23
  from ..api_client import RequestSerialized
24
24
  from ..api_response import ApiResponse
25
- from ..models.rendered_variable_definition import RenderedVariableDefinition
26
- from ..models.supported_languages import SupportedLanguages
25
+ from ..models.complete_response import CompleteResponse
27
26
  from ..rest import RESTResponseType
28
27
 
29
28
 
30
- class PublicApi:
29
+ class VariableDefinitionsApi:
31
30
  """NOTE: This class is auto generated by OpenAPI Generator
32
31
  Ref: https://openapi-generator.tech
33
32
 
@@ -40,16 +39,12 @@ class PublicApi:
40
39
  self.api_client = api_client
41
40
 
42
41
  @validate_call
43
- def get_public_variable_definition_by_id(
42
+ def get_variable_definition_by_id(
44
43
  self,
45
44
  variable_definition_id: Annotated[
46
45
  StrictStr,
47
46
  Field(description="Unique identifier for the variable definition."),
48
47
  ],
49
- accept_language: Annotated[
50
- SupportedLanguages,
51
- Field(description="Render the variable definition in the given language."),
52
- ],
53
48
  date_of_validity: Annotated[
54
49
  date | None,
55
50
  Field(
@@ -65,15 +60,13 @@ class PublicApi:
65
60
  _content_type: StrictStr | None = None,
66
61
  _headers: dict[StrictStr, Any] | None = None,
67
62
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
- ) -> RenderedVariableDefinition:
63
+ ) -> CompleteResponse:
69
64
  """Get one variable definition.
70
65
 
71
- Get one variable definition. This is rendered in the given language, with the default being Norwegian Bokmål.
66
+ Get one variable definition.
72
67
 
73
68
  :param variable_definition_id: Unique identifier for the variable definition. (required)
74
69
  :type variable_definition_id: str
75
- :param accept_language: Render the variable definition in the given language. (required)
76
- :type accept_language: SupportedLanguages
77
70
  :param date_of_validity: List only variable definitions which are valid on this date.
78
71
  :type date_of_validity: date
79
72
  :param _request_timeout: timeout setting for this request. If one
@@ -97,9 +90,8 @@ class PublicApi:
97
90
  :type _host_index: int, optional
98
91
  :return: Returns the result object.
99
92
  """
100
- _param = self._get_public_variable_definition_by_id_serialize(
93
+ _param = self._get_variable_definition_by_id_serialize(
101
94
  variable_definition_id=variable_definition_id,
102
- accept_language=accept_language,
103
95
  date_of_validity=date_of_validity,
104
96
  _request_auth=_request_auth,
105
97
  _content_type=_content_type,
@@ -108,7 +100,7 @@ class PublicApi:
108
100
  )
109
101
 
110
102
  _response_types_map: dict[str, str | None] = {
111
- "200": "RenderedVariableDefinition",
103
+ "200": "CompleteResponse",
112
104
  "404": "Problem",
113
105
  }
114
106
  response_data = self.api_client.call_api(
@@ -122,16 +114,12 @@ class PublicApi:
122
114
  ).data
123
115
 
124
116
  @validate_call
125
- def get_public_variable_definition_by_id_with_http_info(
117
+ def get_variable_definition_by_id_with_http_info(
126
118
  self,
127
119
  variable_definition_id: Annotated[
128
120
  StrictStr,
129
121
  Field(description="Unique identifier for the variable definition."),
130
122
  ],
131
- accept_language: Annotated[
132
- SupportedLanguages,
133
- Field(description="Render the variable definition in the given language."),
134
- ],
135
123
  date_of_validity: Annotated[
136
124
  date | None,
137
125
  Field(
@@ -147,15 +135,13 @@ class PublicApi:
147
135
  _content_type: StrictStr | None = None,
148
136
  _headers: dict[StrictStr, Any] | None = None,
149
137
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
150
- ) -> ApiResponse[RenderedVariableDefinition]:
138
+ ) -> ApiResponse[CompleteResponse]:
151
139
  """Get one variable definition.
152
140
 
153
- Get one variable definition. This is rendered in the given language, with the default being Norwegian Bokmål.
141
+ Get one variable definition.
154
142
 
155
143
  :param variable_definition_id: Unique identifier for the variable definition. (required)
156
144
  :type variable_definition_id: str
157
- :param accept_language: Render the variable definition in the given language. (required)
158
- :type accept_language: SupportedLanguages
159
145
  :param date_of_validity: List only variable definitions which are valid on this date.
160
146
  :type date_of_validity: date
161
147
  :param _request_timeout: timeout setting for this request. If one
@@ -179,9 +165,8 @@ class PublicApi:
179
165
  :type _host_index: int, optional
180
166
  :return: Returns the result object.
181
167
  """
182
- _param = self._get_public_variable_definition_by_id_serialize(
168
+ _param = self._get_variable_definition_by_id_serialize(
183
169
  variable_definition_id=variable_definition_id,
184
- accept_language=accept_language,
185
170
  date_of_validity=date_of_validity,
186
171
  _request_auth=_request_auth,
187
172
  _content_type=_content_type,
@@ -190,7 +175,7 @@ class PublicApi:
190
175
  )
191
176
 
192
177
  _response_types_map: dict[str, str | None] = {
193
- "200": "RenderedVariableDefinition",
178
+ "200": "CompleteResponse",
194
179
  "404": "Problem",
195
180
  }
196
181
  response_data = self.api_client.call_api(
@@ -204,16 +189,12 @@ class PublicApi:
204
189
  )
205
190
 
206
191
  @validate_call
207
- def get_public_variable_definition_by_id_without_preload_content(
192
+ def get_variable_definition_by_id_without_preload_content(
208
193
  self,
209
194
  variable_definition_id: Annotated[
210
195
  StrictStr,
211
196
  Field(description="Unique identifier for the variable definition."),
212
197
  ],
213
- accept_language: Annotated[
214
- SupportedLanguages,
215
- Field(description="Render the variable definition in the given language."),
216
- ],
217
198
  date_of_validity: Annotated[
218
199
  date | None,
219
200
  Field(
@@ -232,12 +213,10 @@ class PublicApi:
232
213
  ) -> RESTResponseType:
233
214
  """Get one variable definition.
234
215
 
235
- Get one variable definition. This is rendered in the given language, with the default being Norwegian Bokmål.
216
+ Get one variable definition.
236
217
 
237
218
  :param variable_definition_id: Unique identifier for the variable definition. (required)
238
219
  :type variable_definition_id: str
239
- :param accept_language: Render the variable definition in the given language. (required)
240
- :type accept_language: SupportedLanguages
241
220
  :param date_of_validity: List only variable definitions which are valid on this date.
242
221
  :type date_of_validity: date
243
222
  :param _request_timeout: timeout setting for this request. If one
@@ -261,9 +240,8 @@ class PublicApi:
261
240
  :type _host_index: int, optional
262
241
  :return: Returns the result object.
263
242
  """
264
- _param = self._get_public_variable_definition_by_id_serialize(
243
+ _param = self._get_variable_definition_by_id_serialize(
265
244
  variable_definition_id=variable_definition_id,
266
- accept_language=accept_language,
267
245
  date_of_validity=date_of_validity,
268
246
  _request_auth=_request_auth,
269
247
  _content_type=_content_type,
@@ -272,7 +250,7 @@ class PublicApi:
272
250
  )
273
251
 
274
252
  _response_types_map: dict[str, str | None] = {
275
- "200": "RenderedVariableDefinition",
253
+ "200": "CompleteResponse",
276
254
  "404": "Problem",
277
255
  }
278
256
  response_data = self.api_client.call_api(
@@ -281,10 +259,9 @@ class PublicApi:
281
259
  )
282
260
  return response_data.response
283
261
 
284
- def _get_public_variable_definition_by_id_serialize(
262
+ def _get_variable_definition_by_id_serialize(
285
263
  self,
286
264
  variable_definition_id,
287
- accept_language,
288
265
  date_of_validity,
289
266
  _request_auth,
290
267
  _content_type,
@@ -323,8 +300,6 @@ class PublicApi:
323
300
  _query_params.append(("date_of_validity", date_of_validity))
324
301
 
325
302
  # process the header parameters
326
- if accept_language is not None:
327
- _header_params["Accept-Language"] = accept_language
328
303
  # process the form parameters
329
304
  # process the body parameter
330
305
 
@@ -338,282 +313,13 @@ class PublicApi:
338
313
  )
339
314
 
340
315
  # authentication setting
341
- _auth_settings: list[str] = []
342
-
343
- return self.api_client.param_serialize(
344
- method="GET",
345
- resource_path="/public/variable-definitions/{variable-definition-id}",
346
- path_params=_path_params,
347
- query_params=_query_params,
348
- header_params=_header_params,
349
- body=_body_params,
350
- post_params=_form_params,
351
- files=_files,
352
- auth_settings=_auth_settings,
353
- collection_formats=_collection_formats,
354
- _host=_host,
355
- _request_auth=_request_auth,
356
- )
357
-
358
- @validate_call
359
- def list_public_validity_periods(
360
- self,
361
- variable_definition_id: Annotated[
362
- StrictStr,
363
- Field(description="Unique identifier for the variable definition."),
364
- ],
365
- accept_language: Annotated[
366
- SupportedLanguages,
367
- Field(description="Render the variable definition in the given language."),
368
- ],
369
- _request_timeout: None
370
- | Annotated[StrictFloat, Field(gt=0)]
371
- | tuple[
372
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
373
- ] = None,
374
- _request_auth: dict[StrictStr, Any] | None = None,
375
- _content_type: StrictStr | None = None,
376
- _headers: dict[StrictStr, Any] | None = None,
377
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
- ) -> list[RenderedVariableDefinition]:
379
- """List all validity periods.
380
-
381
- List all validity periods. These are rendered in the given language, with the default being Norwegian Bokmål.
382
-
383
- :param variable_definition_id: Unique identifier for the variable definition. (required)
384
- :type variable_definition_id: str
385
- :param accept_language: Render the variable definition in the given language. (required)
386
- :type accept_language: SupportedLanguages
387
- :param _request_timeout: timeout setting for this request. If one
388
- number provided, it will be total request
389
- timeout. It can also be a pair (tuple) of
390
- (connection, read) timeouts.
391
- :type _request_timeout: int, tuple(int, int), optional
392
- :param _request_auth: set to override the auth_settings for an a single
393
- request; this effectively ignores the
394
- authentication in the spec for a single request.
395
- :type _request_auth: dict, optional
396
- :param _content_type: force content-type for the request.
397
- :type _content_type: str, Optional
398
- :param _headers: set to override the headers for a single
399
- request; this effectively ignores the headers
400
- in the spec for a single request.
401
- :type _headers: dict, optional
402
- :param _host_index: set to override the host_index for a single
403
- request; this effectively ignores the host_index
404
- in the spec for a single request.
405
- :type _host_index: int, optional
406
- :return: Returns the result object.
407
- """
408
- _param = self._list_public_validity_periods_serialize(
409
- variable_definition_id=variable_definition_id,
410
- accept_language=accept_language,
411
- _request_auth=_request_auth,
412
- _content_type=_content_type,
413
- _headers=_headers,
414
- _host_index=_host_index,
415
- )
416
-
417
- _response_types_map: dict[str, str | None] = {
418
- "200": "List[RenderedVariableDefinition]",
419
- }
420
- response_data = self.api_client.call_api(
421
- *_param,
422
- _request_timeout=_request_timeout,
423
- )
424
- response_data.read()
425
- return self.api_client.response_deserialize(
426
- response_data=response_data,
427
- response_types_map=_response_types_map,
428
- ).data
429
-
430
- @validate_call
431
- def list_public_validity_periods_with_http_info(
432
- self,
433
- variable_definition_id: Annotated[
434
- StrictStr,
435
- Field(description="Unique identifier for the variable definition."),
436
- ],
437
- accept_language: Annotated[
438
- SupportedLanguages,
439
- Field(description="Render the variable definition in the given language."),
440
- ],
441
- _request_timeout: None
442
- | Annotated[StrictFloat, Field(gt=0)]
443
- | tuple[
444
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
445
- ] = None,
446
- _request_auth: dict[StrictStr, Any] | None = None,
447
- _content_type: StrictStr | None = None,
448
- _headers: dict[StrictStr, Any] | None = None,
449
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
450
- ) -> ApiResponse[list[RenderedVariableDefinition]]:
451
- """List all validity periods.
452
-
453
- List all validity periods. These are rendered in the given language, with the default being Norwegian Bokmål.
454
-
455
- :param variable_definition_id: Unique identifier for the variable definition. (required)
456
- :type variable_definition_id: str
457
- :param accept_language: Render the variable definition in the given language. (required)
458
- :type accept_language: SupportedLanguages
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
- """
480
- _param = self._list_public_validity_periods_serialize(
481
- variable_definition_id=variable_definition_id,
482
- accept_language=accept_language,
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, str | None] = {
490
- "200": "List[RenderedVariableDefinition]",
491
- }
492
- response_data = self.api_client.call_api(
493
- *_param,
494
- _request_timeout=_request_timeout,
495
- )
496
- response_data.read()
497
- return self.api_client.response_deserialize(
498
- response_data=response_data,
499
- response_types_map=_response_types_map,
500
- )
501
-
502
- @validate_call
503
- def list_public_validity_periods_without_preload_content(
504
- self,
505
- variable_definition_id: Annotated[
506
- StrictStr,
507
- Field(description="Unique identifier for the variable definition."),
508
- ],
509
- accept_language: Annotated[
510
- SupportedLanguages,
511
- Field(description="Render the variable definition in the given language."),
512
- ],
513
- _request_timeout: None
514
- | Annotated[StrictFloat, Field(gt=0)]
515
- | tuple[
516
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
517
- ] = None,
518
- _request_auth: dict[StrictStr, Any] | None = None,
519
- _content_type: StrictStr | None = None,
520
- _headers: dict[StrictStr, Any] | None = None,
521
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
522
- ) -> RESTResponseType:
523
- """List all validity periods.
524
-
525
- List all validity periods. These are rendered in the given language, with the default being Norwegian Bokmål.
526
-
527
- :param variable_definition_id: Unique identifier for the variable definition. (required)
528
- :type variable_definition_id: str
529
- :param accept_language: Render the variable definition in the given language. (required)
530
- :type accept_language: SupportedLanguages
531
- :param _request_timeout: timeout setting for this request. If one
532
- number provided, it will be total request
533
- timeout. It can also be a pair (tuple) of
534
- (connection, read) timeouts.
535
- :type _request_timeout: int, tuple(int, int), optional
536
- :param _request_auth: set to override the auth_settings for an a single
537
- request; this effectively ignores the
538
- authentication in the spec for a single request.
539
- :type _request_auth: dict, optional
540
- :param _content_type: force content-type for the request.
541
- :type _content_type: str, Optional
542
- :param _headers: set to override the headers for a single
543
- request; this effectively ignores the headers
544
- in the spec for a single request.
545
- :type _headers: dict, optional
546
- :param _host_index: set to override the host_index for a single
547
- request; this effectively ignores the host_index
548
- in the spec for a single request.
549
- :type _host_index: int, optional
550
- :return: Returns the result object.
551
- """
552
- _param = self._list_public_validity_periods_serialize(
553
- variable_definition_id=variable_definition_id,
554
- accept_language=accept_language,
555
- _request_auth=_request_auth,
556
- _content_type=_content_type,
557
- _headers=_headers,
558
- _host_index=_host_index,
559
- )
560
-
561
- _response_types_map: dict[str, str | None] = {
562
- "200": "List[RenderedVariableDefinition]",
563
- }
564
- response_data = self.api_client.call_api(
565
- *_param,
566
- _request_timeout=_request_timeout,
567
- )
568
- return response_data.response
569
-
570
- def _list_public_validity_periods_serialize(
571
- self,
572
- variable_definition_id,
573
- accept_language,
574
- _request_auth,
575
- _content_type,
576
- _headers,
577
- _host_index,
578
- ) -> RequestSerialized:
579
- _host = None
580
-
581
- _collection_formats: dict[str, str] = {}
582
-
583
- _path_params: dict[str, str] = {}
584
- _query_params: list[tuple[str, str]] = []
585
- _header_params: dict[str, str | None] = _headers or {}
586
- _form_params: list[tuple[str, str]] = []
587
- _files: dict[
588
- str,
589
- str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]],
590
- ] = {}
591
- _body_params: bytes | None = None
592
-
593
- # process the path parameters
594
- if variable_definition_id is not None:
595
- _path_params["variable-definition-id"] = variable_definition_id
596
- # process the query parameters
597
- # process the header parameters
598
- if accept_language is not None:
599
- _header_params["Accept-Language"] = accept_language
600
- # process the form parameters
601
- # process the body parameter
602
-
603
- # set the HTTP header `Accept`
604
- if "Accept" not in _header_params:
605
- _header_params["Accept"] = self.api_client.select_header_accept(
606
- [
607
- "application/json",
608
- ],
609
- )
610
-
611
- # authentication setting
612
- _auth_settings: list[str] = []
316
+ _auth_settings: list[str] = [
317
+ "keycloak_token",
318
+ ]
613
319
 
614
320
  return self.api_client.param_serialize(
615
321
  method="GET",
616
- resource_path="/public/variable-definitions/{variable-definition-id}/validity-periods",
322
+ resource_path="/variable-definitions/{variable-definition-id}",
617
323
  path_params=_path_params,
618
324
  query_params=_query_params,
619
325
  header_params=_header_params,
@@ -627,18 +333,20 @@ class PublicApi:
627
333
  )
628
334
 
629
335
  @validate_call
630
- def list_public_variable_definitions(
336
+ def list_variable_definitions(
631
337
  self,
632
- accept_language: Annotated[
633
- SupportedLanguages,
634
- Field(description="Render the variable definition in the given language."),
635
- ],
636
338
  date_of_validity: Annotated[
637
339
  date | None,
638
340
  Field(
639
341
  description="List only variable definitions which are valid on this date."
640
342
  ),
641
343
  ] = None,
344
+ short_name: Annotated[
345
+ StrictStr | None,
346
+ Field(
347
+ description="List only the variable definition with the given short name."
348
+ ),
349
+ ] = None,
642
350
  _request_timeout: None
643
351
  | Annotated[StrictFloat, Field(gt=0)]
644
352
  | tuple[
@@ -648,15 +356,15 @@ class PublicApi:
648
356
  _content_type: StrictStr | None = None,
649
357
  _headers: dict[StrictStr, Any] | None = None,
650
358
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
651
- ) -> list[RenderedVariableDefinition]:
359
+ ) -> list[CompleteResponse]:
652
360
  """List all variable definitions.
653
361
 
654
- List all variable definitions. These are rendered in the given language, with the default being Norwegian Bokmål.
362
+ List all variable definitions.
655
363
 
656
- :param accept_language: Render the variable definition in the given language. (required)
657
- :type accept_language: SupportedLanguages
658
364
  :param date_of_validity: List only variable definitions which are valid on this date.
659
365
  :type date_of_validity: date
366
+ :param short_name: List only the variable definition with the given short name.
367
+ :type short_name: str
660
368
  :param _request_timeout: timeout setting for this request. If one
661
369
  number provided, it will be total request
662
370
  timeout. It can also be a pair (tuple) of
@@ -678,9 +386,9 @@ class PublicApi:
678
386
  :type _host_index: int, optional
679
387
  :return: Returns the result object.
680
388
  """
681
- _param = self._list_public_variable_definitions_serialize(
682
- accept_language=accept_language,
389
+ _param = self._list_variable_definitions_serialize(
683
390
  date_of_validity=date_of_validity,
391
+ short_name=short_name,
684
392
  _request_auth=_request_auth,
685
393
  _content_type=_content_type,
686
394
  _headers=_headers,
@@ -688,7 +396,7 @@ class PublicApi:
688
396
  )
689
397
 
690
398
  _response_types_map: dict[str, str | None] = {
691
- "200": "List[RenderedVariableDefinition]",
399
+ "200": "List[CompleteResponse]",
692
400
  }
693
401
  response_data = self.api_client.call_api(
694
402
  *_param,
@@ -701,18 +409,20 @@ class PublicApi:
701
409
  ).data
702
410
 
703
411
  @validate_call
704
- def list_public_variable_definitions_with_http_info(
412
+ def list_variable_definitions_with_http_info(
705
413
  self,
706
- accept_language: Annotated[
707
- SupportedLanguages,
708
- Field(description="Render the variable definition in the given language."),
709
- ],
710
414
  date_of_validity: Annotated[
711
415
  date | None,
712
416
  Field(
713
417
  description="List only variable definitions which are valid on this date."
714
418
  ),
715
419
  ] = None,
420
+ short_name: Annotated[
421
+ StrictStr | None,
422
+ Field(
423
+ description="List only the variable definition with the given short name."
424
+ ),
425
+ ] = None,
716
426
  _request_timeout: None
717
427
  | Annotated[StrictFloat, Field(gt=0)]
718
428
  | tuple[
@@ -722,15 +432,15 @@ class PublicApi:
722
432
  _content_type: StrictStr | None = None,
723
433
  _headers: dict[StrictStr, Any] | None = None,
724
434
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
725
- ) -> ApiResponse[list[RenderedVariableDefinition]]:
435
+ ) -> ApiResponse[list[CompleteResponse]]:
726
436
  """List all variable definitions.
727
437
 
728
- List all variable definitions. These are rendered in the given language, with the default being Norwegian Bokmål.
438
+ List all variable definitions.
729
439
 
730
- :param accept_language: Render the variable definition in the given language. (required)
731
- :type accept_language: SupportedLanguages
732
440
  :param date_of_validity: List only variable definitions which are valid on this date.
733
441
  :type date_of_validity: date
442
+ :param short_name: List only the variable definition with the given short name.
443
+ :type short_name: str
734
444
  :param _request_timeout: timeout setting for this request. If one
735
445
  number provided, it will be total request
736
446
  timeout. It can also be a pair (tuple) of
@@ -752,9 +462,9 @@ class PublicApi:
752
462
  :type _host_index: int, optional
753
463
  :return: Returns the result object.
754
464
  """
755
- _param = self._list_public_variable_definitions_serialize(
756
- accept_language=accept_language,
465
+ _param = self._list_variable_definitions_serialize(
757
466
  date_of_validity=date_of_validity,
467
+ short_name=short_name,
758
468
  _request_auth=_request_auth,
759
469
  _content_type=_content_type,
760
470
  _headers=_headers,
@@ -762,7 +472,7 @@ class PublicApi:
762
472
  )
763
473
 
764
474
  _response_types_map: dict[str, str | None] = {
765
- "200": "List[RenderedVariableDefinition]",
475
+ "200": "List[CompleteResponse]",
766
476
  }
767
477
  response_data = self.api_client.call_api(
768
478
  *_param,
@@ -775,18 +485,20 @@ class PublicApi:
775
485
  )
776
486
 
777
487
  @validate_call
778
- def list_public_variable_definitions_without_preload_content(
488
+ def list_variable_definitions_without_preload_content(
779
489
  self,
780
- accept_language: Annotated[
781
- SupportedLanguages,
782
- Field(description="Render the variable definition in the given language."),
783
- ],
784
490
  date_of_validity: Annotated[
785
491
  date | None,
786
492
  Field(
787
493
  description="List only variable definitions which are valid on this date."
788
494
  ),
789
495
  ] = None,
496
+ short_name: Annotated[
497
+ StrictStr | None,
498
+ Field(
499
+ description="List only the variable definition with the given short name."
500
+ ),
501
+ ] = None,
790
502
  _request_timeout: None
791
503
  | Annotated[StrictFloat, Field(gt=0)]
792
504
  | tuple[
@@ -799,12 +511,12 @@ class PublicApi:
799
511
  ) -> RESTResponseType:
800
512
  """List all variable definitions.
801
513
 
802
- List all variable definitions. These are rendered in the given language, with the default being Norwegian Bokmål.
514
+ List all variable definitions.
803
515
 
804
- :param accept_language: Render the variable definition in the given language. (required)
805
- :type accept_language: SupportedLanguages
806
516
  :param date_of_validity: List only variable definitions which are valid on this date.
807
517
  :type date_of_validity: date
518
+ :param short_name: List only the variable definition with the given short name.
519
+ :type short_name: str
808
520
  :param _request_timeout: timeout setting for this request. If one
809
521
  number provided, it will be total request
810
522
  timeout. It can also be a pair (tuple) of
@@ -826,9 +538,9 @@ class PublicApi:
826
538
  :type _host_index: int, optional
827
539
  :return: Returns the result object.
828
540
  """
829
- _param = self._list_public_variable_definitions_serialize(
830
- accept_language=accept_language,
541
+ _param = self._list_variable_definitions_serialize(
831
542
  date_of_validity=date_of_validity,
543
+ short_name=short_name,
832
544
  _request_auth=_request_auth,
833
545
  _content_type=_content_type,
834
546
  _headers=_headers,
@@ -836,7 +548,7 @@ class PublicApi:
836
548
  )
837
549
 
838
550
  _response_types_map: dict[str, str | None] = {
839
- "200": "List[RenderedVariableDefinition]",
551
+ "200": "List[CompleteResponse]",
840
552
  }
841
553
  response_data = self.api_client.call_api(
842
554
  *_param,
@@ -844,10 +556,10 @@ class PublicApi:
844
556
  )
845
557
  return response_data.response
846
558
 
847
- def _list_public_variable_definitions_serialize(
559
+ def _list_variable_definitions_serialize(
848
560
  self,
849
- accept_language,
850
561
  date_of_validity,
562
+ short_name,
851
563
  _request_auth,
852
564
  _content_type,
853
565
  _headers,
@@ -882,9 +594,10 @@ class PublicApi:
882
594
  else:
883
595
  _query_params.append(("date_of_validity", date_of_validity))
884
596
 
597
+ if short_name is not None:
598
+ _query_params.append(("short_name", short_name))
599
+
885
600
  # process the header parameters
886
- if accept_language is not None:
887
- _header_params["Accept-Language"] = accept_language
888
601
  # process the form parameters
889
602
  # process the body parameter
890
603
 
@@ -897,11 +610,13 @@ class PublicApi:
897
610
  )
898
611
 
899
612
  # authentication setting
900
- _auth_settings: list[str] = []
613
+ _auth_settings: list[str] = [
614
+ "keycloak_token",
615
+ ]
901
616
 
902
617
  return self.api_client.param_serialize(
903
618
  method="GET",
904
- resource_path="/public/variable-definitions",
619
+ resource_path="/variable-definitions",
905
620
  path_params=_path_params,
906
621
  query_params=_query_params,
907
622
  header_params=_header_params,