stackit-resourcemanager 0.7.1__tar.gz → 0.9.0__tar.gz

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.
Files changed (38) hide show
  1. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/PKG-INFO +3 -4
  2. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/pyproject.toml +7 -7
  3. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/__init__.py +5 -6
  4. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/api/default_api.py +5 -5
  5. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/api_client.py +20 -23
  6. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/api_response.py +0 -1
  7. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/configuration.py +5 -6
  8. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/exceptions.py +5 -5
  9. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/__init__.py +5 -5
  10. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/container_search_result.py +9 -8
  11. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/create_folder_payload.py +13 -9
  12. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/create_project_payload.py +13 -9
  13. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/error_response.py +9 -8
  14. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/folder_response.py +10 -9
  15. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/get_folder_details_response.py +10 -9
  16. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/get_project_response.py +10 -9
  17. stackit_resourcemanager-0.9.0/src/stackit/resourcemanager/models/lifecycle_state.py +38 -0
  18. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/list_folders_response.py +9 -8
  19. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/list_folders_response_items_inner.py +10 -9
  20. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/list_organizations_response.py +9 -8
  21. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/list_organizations_response_items_inner.py +10 -9
  22. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/list_projects_response.py +9 -8
  23. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/member.py +9 -8
  24. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/organization_response.py +10 -9
  25. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/parent.py +9 -8
  26. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/parent_list_inner.py +9 -8
  27. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/partial_update_folder_payload.py +13 -9
  28. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/partial_update_organization_payload.py +13 -9
  29. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/partial_update_project_payload.py +13 -9
  30. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/models/project.py +10 -9
  31. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/rest.py +5 -6
  32. stackit_resourcemanager-0.7.1/src/stackit/resourcemanager/models/lifecycle_state.py +0 -38
  33. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/.gitignore +0 -0
  34. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/LICENSE.md +0 -0
  35. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/NOTICE.txt +0 -0
  36. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/README.md +0 -0
  37. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/api/__init__.py +0 -0
  38. {stackit_resourcemanager-0.7.1 → stackit_resourcemanager-0.9.0}/src/stackit/resourcemanager/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-resourcemanager
3
- Version: 0.7.1
3
+ Version: 0.9.0
4
4
  Summary: Resource Manager API
5
5
  Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
6
6
  Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
@@ -10,16 +10,15 @@ License-File: NOTICE.txt
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
19
- Requires-Python: <4.0,>=3.9
18
+ Requires-Python: <4.0,>=3.10
20
19
  Requires-Dist: pydantic>=2.9.2
21
20
  Requires-Dist: python-dateutil>=2.9.0.post0
22
- Requires-Dist: requests>=2.32.3
21
+ Requires-Dist: requests>=2.33.0
23
22
  Requires-Dist: stackit-core>=0.0.1a
24
23
  Description-Content-Type: text/markdown
25
24
 
@@ -1,15 +1,14 @@
1
1
  [project]
2
2
  name = "stackit-resourcemanager"
3
- version = "v0.7.1"
3
+ version = "v0.9.0"
4
4
  description = "Resource Manager API"
5
5
  authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
6
- requires-python = ">=3.9,<4.0"
6
+ requires-python = ">=3.10,<4.0"
7
7
  readme = "README.md"
8
8
  classifiers = [
9
9
  "Programming Language :: Python :: 3",
10
10
  "License :: OSI Approved :: Apache Software License",
11
11
  "Operating System :: OS Independent",
12
- "Programming Language :: Python :: 3.9",
13
12
  "Programming Language :: Python :: 3.10",
14
13
  "Programming Language :: Python :: 3.11",
15
14
  "Programming Language :: Python :: 3.12",
@@ -18,7 +17,7 @@ classifiers = [
18
17
  ]
19
18
  dependencies = [
20
19
  "stackit-core>=0.0.1a",
21
- "requests>=2.32.3",
20
+ "requests>=2.33.0",
22
21
  "pydantic>=2.9.2",
23
22
  "python-dateutil>=2.9.0.post0",
24
23
  ]
@@ -29,8 +28,8 @@ Issues = "https://github.com/stackitcloud/stackit-sdk-python/issues"
29
28
 
30
29
  [dependency-groups]
31
30
  dev = [
32
- "black>=24.8.0",
33
- "pytest>=8.3.3",
31
+ "black>=26.3.1",
32
+ "pytest>=9.1.1",
34
33
  "flake8>=5.0.3 ; python_full_version < '3.12'",
35
34
  "flake8>=6.0.1 ; python_full_version >= '3.12'",
36
35
  "flake8-black>=0.3.6",
@@ -102,7 +101,8 @@ show-source = false
102
101
  max-line-length = 120
103
102
  # E203,W503 and E704 are incompatible with the formatter black
104
103
  # W291 needs to be disabled because some doc-strings get generated with trailing whitespace but black won't re-format comments
105
- ignore = ["E203", "W503", "E704", "W291"]
104
+ # fixing B042 in upstream exceptions.mustache would be a breaking change
105
+ ignore = ["E203", "W503", "E704", "W291", "B042"]
106
106
  inline-quotes = '"'
107
107
  docstring-quotes = '"""'
108
108
  multiline-quotes = '"""'
@@ -3,17 +3,16 @@
3
3
  # flake8: noqa
4
4
 
5
5
  """
6
- STACKIT Resource Manager API
6
+ STACKIT Resource Manager API
7
7
 
8
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
8
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
9
9
 
10
- The version of the OpenAPI document: 2.0
11
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+ The version of the OpenAPI document: 2.0
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
13
- Do not edit the class manually.
13
+ Do not edit the class manually.
14
14
  """ # noqa: E501
15
15
 
16
-
17
16
  __version__ = "1.0.0"
18
17
 
19
18
  # Define package exports
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from datetime import datetime
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  import datetime
@@ -36,7 +36,6 @@ from stackit.resourcemanager.exceptions import (
36
36
  ApiException,
37
37
  )
38
38
 
39
-
40
39
  RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
41
40
 
42
41
 
@@ -66,6 +65,7 @@ class ApiClient:
66
65
  "date": datetime.date,
67
66
  "datetime": datetime.datetime,
68
67
  "decimal": decimal.Decimal,
68
+ "UUID": uuid.UUID,
69
69
  "object": object,
70
70
  }
71
71
  _pool = None
@@ -265,7 +265,7 @@ class ApiClient:
265
265
  response_text = None
266
266
  return_data = None
267
267
  try:
268
- if response_type == "bytearray":
268
+ if response_type in ("bytearray", "bytes"):
269
269
  return_data = response_data.data
270
270
  elif response_type == "file":
271
271
  return_data = self.__deserialize_file(response_data)
@@ -326,25 +326,20 @@ class ApiClient:
326
326
  return obj.isoformat()
327
327
  elif isinstance(obj, decimal.Decimal):
328
328
  return str(obj)
329
-
330
329
  elif isinstance(obj, dict):
331
- obj_dict = obj
330
+ return {key: self.sanitize_for_serialization(val) for key, val in obj.items()}
331
+
332
+ # Convert model obj to dict except
333
+ # attributes `openapi_types`, `attribute_map`
334
+ # and attributes which value is not None.
335
+ # Convert attribute name to json key in
336
+ # model definition for request.
337
+ if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
338
+ obj_dict = obj.to_dict()
332
339
  else:
333
- # Convert model obj to dict except
334
- # attributes `openapi_types`, `attribute_map`
335
- # and attributes which value is not None.
336
- # Convert attribute name to json key in
337
- # model definition for request.
338
- if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
339
- obj_dict = obj.to_dict()
340
- else:
341
- obj_dict = obj.__dict__
342
-
343
- if isinstance(obj_dict, list):
344
- # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() # noqa: E501
345
- return self.sanitize_for_serialization(obj_dict)
340
+ obj_dict = obj.__dict__
346
341
 
347
- return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()}
342
+ return self.sanitize_for_serialization(obj_dict)
348
343
 
349
344
  def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
350
345
  """Deserializes response into an object.
@@ -417,6 +412,8 @@ class ApiClient:
417
412
  return self.__deserialize_datetime(data)
418
413
  elif klass is decimal.Decimal:
419
414
  return decimal.Decimal(data)
415
+ elif klass is uuid.UUID:
416
+ return uuid.UUID(data)
420
417
  elif issubclass(klass, Enum):
421
418
  return self.__deserialize_enum(data, klass)
422
419
  else:
@@ -6,7 +6,6 @@ from typing import Generic, Mapping, Optional, TypeVar
6
6
 
7
7
  from pydantic import BaseModel, Field, StrictBytes, StrictInt
8
8
 
9
-
10
9
  T = TypeVar("T")
11
10
 
12
11
 
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  import sys
@@ -18,7 +18,6 @@ from typing_extensions import NotRequired
18
18
 
19
19
  import os
20
20
 
21
-
22
21
  ServerVariablesT = Dict[str, str]
23
22
 
24
23
 
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from typing import Any, Optional
@@ -2,14 +2,14 @@
2
2
 
3
3
  # flake8: noqa
4
4
  """
5
- STACKIT Resource Manager API
5
+ STACKIT Resource Manager API
6
6
 
7
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
8
8
 
9
- The version of the OpenAPI document: 2.0
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+ The version of the OpenAPI document: 2.0
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  # import models into model package
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -19,6 +19,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
  from uuid import UUID
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Self
23
24
 
24
25
  from stackit.resourcemanager.models.lifecycle_state import LifecycleState
@@ -54,7 +55,8 @@ class ContainerSearchResult(BaseModel):
54
55
  return value
55
56
 
56
57
  model_config = ConfigDict(
57
- populate_by_name=True,
58
+ validate_by_name=True,
59
+ validate_by_alias=True,
58
60
  validate_assignment=True,
59
61
  protected_namespaces=(),
60
62
  )
@@ -65,8 +67,7 @@ class ContainerSearchResult(BaseModel):
65
67
 
66
68
  def to_json(self) -> str:
67
69
  """Returns the JSON representation of the model using alias"""
68
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
69
- return json.dumps(self.to_dict())
70
+ return json.dumps(to_jsonable_python(self.to_dict()))
70
71
 
71
72
  @classmethod
72
73
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
  from stackit.resourcemanager.models.member import Member
@@ -35,7 +36,7 @@ class CreateFolderPayload(BaseModel):
35
36
  )
36
37
  labels: Optional[Dict[str, StrictStr]] = Field(
37
38
  default=None,
38
- description="Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.",
39
+ description='Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - To create a project within a STACKIT Network Area, setting the label `"networkArea": "<networkAreaID>"` is required. This can not be changed after project creation.',
39
40
  )
40
41
  members: Optional[Annotated[List[Member], Field(min_length=1)]] = Field(
41
42
  default=None,
@@ -49,6 +50,9 @@ class CreateFolderPayload(BaseModel):
49
50
  @field_validator("name")
50
51
  def name_validate_regular_expression(cls, value):
51
52
  """Validates the regular expression"""
53
+ if not isinstance(value, str):
54
+ value = str(value)
55
+
52
56
  if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$", value):
53
57
  raise ValueError(
54
58
  r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$/"
@@ -56,7 +60,8 @@ class CreateFolderPayload(BaseModel):
56
60
  return value
57
61
 
58
62
  model_config = ConfigDict(
59
- populate_by_name=True,
63
+ validate_by_name=True,
64
+ validate_by_alias=True,
60
65
  validate_assignment=True,
61
66
  protected_namespaces=(),
62
67
  )
@@ -67,8 +72,7 @@ class CreateFolderPayload(BaseModel):
67
72
 
68
73
  def to_json(self) -> str:
69
74
  """Returns the JSON representation of the model using alias"""
70
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
71
- return json.dumps(self.to_dict())
75
+ return json.dumps(to_jsonable_python(self.to_dict()))
72
76
 
73
77
  @classmethod
74
78
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
  from stackit.resourcemanager.models.member import Member
@@ -35,7 +36,7 @@ class CreateProjectPayload(BaseModel):
35
36
  )
36
37
  labels: Optional[Dict[str, StrictStr]] = Field(
37
38
  default=None,
38
- description="Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.",
39
+ description='Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - To create a project within a STACKIT Network Area, setting the label `"networkArea": "<networkAreaID>"` is required. This can not be changed after project creation.',
39
40
  )
40
41
  members: Annotated[List[Member], Field(min_length=1)] = Field(
41
42
  description="The initial members assigned to the project. At least one subject needs to be a user, and not a client or service account."
@@ -48,6 +49,9 @@ class CreateProjectPayload(BaseModel):
48
49
  @field_validator("name")
49
50
  def name_validate_regular_expression(cls, value):
50
51
  """Validates the regular expression"""
52
+ if not isinstance(value, str):
53
+ value = str(value)
54
+
51
55
  if not re.match(r"^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$", value):
52
56
  raise ValueError(
53
57
  r"must validate the regular expression /^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$/"
@@ -55,7 +59,8 @@ class CreateProjectPayload(BaseModel):
55
59
  return value
56
60
 
57
61
  model_config = ConfigDict(
58
- populate_by_name=True,
62
+ validate_by_name=True,
63
+ validate_by_alias=True,
59
64
  validate_assignment=True,
60
65
  protected_namespaces=(),
61
66
  )
@@ -66,8 +71,7 @@ class CreateProjectPayload(BaseModel):
66
71
 
67
72
  def to_json(self) -> str:
68
73
  """Returns the JSON representation of the model using alias"""
69
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
70
- return json.dumps(self.to_dict())
74
+ return json.dumps(to_jsonable_python(self.to_dict()))
71
75
 
72
76
  @classmethod
73
77
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -28,6 +28,7 @@ from pydantic import (
28
28
  StrictStr,
29
29
  field_validator,
30
30
  )
31
+ from pydantic_core import to_jsonable_python
31
32
  from typing_extensions import Self
32
33
 
33
34
 
@@ -57,7 +58,8 @@ class ErrorResponse(BaseModel):
57
58
  return value
58
59
 
59
60
  model_config = ConfigDict(
60
- populate_by_name=True,
61
+ validate_by_name=True,
62
+ validate_by_alias=True,
61
63
  validate_assignment=True,
62
64
  protected_namespaces=(),
63
65
  )
@@ -68,8 +70,7 @@ class ErrorResponse(BaseModel):
68
70
 
69
71
  def to_json(self) -> str:
70
72
  """Returns the JSON representation of the model using alias"""
71
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
72
- return json.dumps(self.to_dict())
73
+ return json.dumps(to_jsonable_python(self.to_dict()))
73
74
 
74
75
  @classmethod
75
76
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Resource Manager API
4
+ STACKIT Resource Manager API
5
5
 
6
- API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
6
+ API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
7
7
 
8
- The version of the OpenAPI document: 2.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Self
25
26
 
26
27
  from stackit.resourcemanager.models.parent import Parent
@@ -36,7 +37,7 @@ class FolderResponse(BaseModel):
36
37
  folder_id: UUID = Field(description="Globally unique folder identifier.", alias="folderId")
37
38
  labels: Optional[Dict[str, StrictStr]] = Field(
38
39
  default=None,
39
- description="Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`.",
40
+ description='Labels are key-value string pairs that can be attached to a resource container. Some labels may be enforced via policies. - A label key must match the regex `[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - A label value must match the regex `^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`. - To create a project within a STACKIT Network Area, setting the label `"networkArea": "<networkAreaID>"` is required. This can not be changed after project creation.',
40
41
  )
41
42
  name: StrictStr = Field(description="Folder name.")
42
43
  parent: Parent
@@ -78,7 +79,8 @@ class FolderResponse(BaseModel):
78
79
  return value
79
80
 
80
81
  model_config = ConfigDict(
81
- populate_by_name=True,
82
+ validate_by_name=True,
83
+ validate_by_alias=True,
82
84
  validate_assignment=True,
83
85
  protected_namespaces=(),
84
86
  )
@@ -89,8 +91,7 @@ class FolderResponse(BaseModel):
89
91
 
90
92
  def to_json(self) -> str:
91
93
  """Returns the JSON representation of the model using alias"""
92
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
93
- return json.dumps(self.to_dict())
94
+ return json.dumps(to_jsonable_python(self.to_dict()))
94
95
 
95
96
  @classmethod
96
97
  def from_json(cls, json_str: str) -> Optional[Self]: