stackit-ske 1.8.0__tar.gz → 1.10.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 (61) hide show
  1. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/PKG-INFO +1 -1
  2. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/pyproject.toml +1 -1
  3. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/api_client.py +15 -17
  4. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/access.py +4 -3
  5. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/acl.py +4 -3
  6. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/availability_zone.py +4 -3
  7. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/cluster.py +4 -3
  8. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/cluster_error.py +5 -4
  9. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/cluster_status.py +4 -3
  10. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/create_kubeconfig_payload.py +4 -3
  11. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/create_or_update_cluster_payload.py +4 -3
  12. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/credentials_rotation_state.py +4 -3
  13. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/cri.py +4 -3
  14. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/dns.py +14 -6
  15. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/expiration_status.py +4 -3
  16. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/expiration_status_kubernetes.py +4 -3
  17. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/expiration_status_nodepool.py +4 -3
  18. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/extension.py +4 -3
  19. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/hibernation.py +4 -3
  20. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/hibernation_schedule.py +10 -3
  21. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/idp.py +4 -3
  22. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/idp_kubeconfig.py +4 -3
  23. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/image.py +4 -3
  24. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/kubeconfig.py +4 -3
  25. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/kubernetes.py +7 -3
  26. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/kubernetes_version.py +7 -3
  27. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/list_clusters_response.py +4 -3
  28. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/login_kubeconfig.py +4 -3
  29. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/machine.py +4 -3
  30. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/machine_image.py +4 -3
  31. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/machine_image_version.py +7 -3
  32. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/machine_type.py +4 -3
  33. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/maintenance.py +4 -3
  34. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/maintenance_auto_update.py +4 -3
  35. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/network.py +4 -3
  36. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/nodepool.py +4 -3
  37. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/nodepool_kubernetes.py +7 -3
  38. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/observability.py +4 -3
  39. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/provider_options.py +4 -3
  40. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/runtime_error.py +4 -3
  41. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/taint.py +4 -3
  42. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/time_window.py +4 -3
  43. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/v2_control_plane_network.py +4 -3
  44. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/volume.py +4 -3
  45. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/volume_type.py +4 -3
  46. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/.gitignore +0 -0
  47. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/LICENSE.md +0 -0
  48. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/NOTICE.txt +0 -0
  49. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/README.md +0 -0
  50. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/__init__.py +0 -0
  51. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/api/__init__.py +0 -0
  52. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/api/default_api.py +0 -0
  53. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/api_response.py +0 -0
  54. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/configuration.py +0 -0
  55. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/exceptions.py +0 -0
  56. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/__init__.py +0 -0
  57. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/access_scope.py +0 -0
  58. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/cluster_status_state.py +0 -0
  59. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/models/get_provider_options_request_version_state.py +0 -0
  60. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/py.typed +0 -0
  61. {stackit_ske-1.8.0 → stackit_ske-1.10.0}/src/stackit/ske/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-ske
3
- Version: 1.8.0
3
+ Version: 1.10.0
4
4
  Summary: SKE-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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stackit-ske"
3
- version = "v1.8.0"
3
+ version = "v1.10.0"
4
4
  description = "SKE-API"
5
5
  authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
6
6
  requires-python = ">=3.9,<4.0"
@@ -66,6 +66,7 @@ class ApiClient:
66
66
  "date": datetime.date,
67
67
  "datetime": datetime.datetime,
68
68
  "decimal": decimal.Decimal,
69
+ "UUID": uuid.UUID,
69
70
  "object": object,
70
71
  }
71
72
  _pool = None
@@ -265,7 +266,7 @@ class ApiClient:
265
266
  response_text = None
266
267
  return_data = None
267
268
  try:
268
- if response_type == "bytearray":
269
+ if response_type in ("bytearray", "bytes"):
269
270
  return_data = response_data.data
270
271
  elif response_type == "file":
271
272
  return_data = self.__deserialize_file(response_data)
@@ -326,25 +327,20 @@ class ApiClient:
326
327
  return obj.isoformat()
327
328
  elif isinstance(obj, decimal.Decimal):
328
329
  return str(obj)
329
-
330
330
  elif isinstance(obj, dict):
331
- obj_dict = obj
331
+ return {key: self.sanitize_for_serialization(val) for key, val in obj.items()}
332
+
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()
332
340
  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)
341
+ obj_dict = obj.__dict__
346
342
 
347
- return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()}
343
+ return self.sanitize_for_serialization(obj_dict)
348
344
 
349
345
  def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
350
346
  """Deserializes response into an object.
@@ -417,6 +413,8 @@ class ApiClient:
417
413
  return self.__deserialize_datetime(data)
418
414
  elif klass is decimal.Decimal:
419
415
  return decimal.Decimal(data)
416
+ elif klass is uuid.UUID:
417
+ return uuid.UUID(data)
420
418
  elif issubclass(klass, Enum):
421
419
  return self.__deserialize_enum(data, klass)
422
420
  else:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.ske.models.idp import IDP
@@ -32,7 +33,8 @@ class Access(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["idp"]
33
34
 
34
35
  model_config = ConfigDict(
35
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
36
38
  validate_assignment=True,
37
39
  protected_namespaces=(),
38
40
  )
@@ -43,8 +45,7 @@ class Access(BaseModel):
43
45
 
44
46
  def to_json(self) -> str:
45
47
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -24,6 +24,7 @@ from pydantic import (
24
24
  StrictBool,
25
25
  StrictStr,
26
26
  )
27
+ from pydantic_core import to_jsonable_python
27
28
  from typing_extensions import Annotated, Self
28
29
 
29
30
 
@@ -39,7 +40,8 @@ class ACL(BaseModel):
39
40
  __properties: ClassVar[List[str]] = ["allowedCidrs", "enabled"]
40
41
 
41
42
  model_config = ConfigDict(
42
- populate_by_name=True,
43
+ validate_by_name=True,
44
+ validate_by_alias=True,
43
45
  validate_assignment=True,
44
46
  protected_namespaces=(),
45
47
  )
@@ -50,8 +52,7 @@ class ACL(BaseModel):
50
52
 
51
53
  def to_json(self) -> str:
52
54
  """Returns the JSON representation of the model using alias"""
53
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
- return json.dumps(self.to_dict())
55
+ return json.dumps(to_jsonable_python(self.to_dict()))
55
56
 
56
57
  @classmethod
57
58
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -30,7 +31,8 @@ class AvailabilityZone(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["name"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -41,8 +43,7 @@ class AvailabilityZone(BaseModel):
41
43
 
42
44
  def to_json(self) -> str:
43
45
  """Returns the JSON representation of the model using alias"""
44
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
45
- return json.dumps(self.to_dict())
46
+ return json.dumps(to_jsonable_python(self.to_dict()))
46
47
 
47
48
  @classmethod
48
49
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.ske.models.access import Access
@@ -57,7 +58,8 @@ class Cluster(BaseModel):
57
58
  ]
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 Cluster(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]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -28,13 +29,14 @@ class ClusterError(BaseModel):
28
29
 
29
30
  code: Optional[StrictStr] = Field(
30
31
  default=None,
31
- description='Possible values: `"SKE_INFRA_SNA_NETWORK_NOT_FOUND"`, `"SKE_INFRA_SNA_NETWORK_NO_ROUTER"`, `"SKE_NODE_NO_VALID_HOST_FOUND"`, `"SKE_NODE_MISCONFIGURED_PDB"`, `"SKE_NODE_MACHINE_TYPE_NOT_FOUND"`, `"SKE_NETWORK_NO_DNS_CONFIGURED"`, `"SKE_NETWORK_NO_AVAILABLE_IPS"`, `"SKE_NODE_MEMORY_PRESSURE"`, `"SKE_NODE_DISK_PRESSURE"`, `"SKE_NODE_PID_PRESSURE"`, `"SKE_OBSERVABILITY_INSTANCE_NOT_FOUND"`, `"SKE_OBSERVABILITY_INSTANCE_NOT_READY"`, `"SKE_DNS_ZONE_NOT_FOUND"`, `"SKE_FETCHING_ERRORS_NOT_POSSIBLE"`',
32
+ description='Possible values: `"SKE_INFRA_SNA_NETWORK_NOT_FOUND"`, `"SKE_INFRA_SNA_NETWORK_NO_ROUTER"`, `"SKE_NODE_NO_VALID_HOST_FOUND"`, `"SKE_NODE_MISCONFIGURED_PDB"`, `"SKE_NODE_MACHINE_TYPE_NOT_FOUND"`, `"SKE_NETWORK_NO_DNS_CONFIGURED"`, `"SKE_NETWORK_NO_AVAILABLE_IPS"`, `"SKE_NODE_MEMORY_PRESSURE"`, `"SKE_NODE_DISK_PRESSURE"`, `"SKE_NODE_PID_PRESSURE"`, `"SKE_OBSERVABILITY_INSTANCE_NOT_FOUND"`, `"SKE_OBSERVABILITY_INSTANCE_NOT_READY"`, `"SKE_DNS_ZONE_NOT_FOUND"`, `"SKE_SNA_DOES_NOT_SUPPORT_SERVICE_ROUTES"`, `"SKE_FETCHING_ERRORS_NOT_POSSIBLE"`',
32
33
  )
33
34
  message: Optional[StrictStr] = None
34
35
  __properties: ClassVar[List[str]] = ["code", "message"]
35
36
 
36
37
  model_config = ConfigDict(
37
- populate_by_name=True,
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
38
40
  validate_assignment=True,
39
41
  protected_namespaces=(),
40
42
  )
@@ -45,8 +47,7 @@ class ClusterError(BaseModel):
45
47
 
46
48
  def to_json(self) -> str:
47
49
  """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
51
 
51
52
  @classmethod
52
53
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -27,6 +27,7 @@ from pydantic import (
27
27
  StrictStr,
28
28
  field_validator,
29
29
  )
30
+ from pydantic_core import to_jsonable_python
30
31
  from typing_extensions import Self
31
32
 
32
33
  from stackit.ske.models.cluster_error import ClusterError
@@ -88,7 +89,8 @@ class ClusterStatus(BaseModel):
88
89
  return value
89
90
 
90
91
  model_config = ConfigDict(
91
- populate_by_name=True,
92
+ validate_by_name=True,
93
+ validate_by_alias=True,
92
94
  validate_assignment=True,
93
95
  protected_namespaces=(),
94
96
  )
@@ -99,8 +101,7 @@ class ClusterStatus(BaseModel):
99
101
 
100
102
  def to_json(self) -> str:
101
103
  """Returns the JSON representation of the model using alias"""
102
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
103
- return json.dumps(self.to_dict())
104
+ return json.dumps(to_jsonable_python(self.to_dict()))
104
105
 
105
106
  @classmethod
106
107
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -30,7 +31,8 @@ class CreateKubeconfigPayload(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["expirationSeconds"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -41,8 +43,7 @@ class CreateKubeconfigPayload(BaseModel):
41
43
 
42
44
  def to_json(self) -> str:
43
45
  """Returns the JSON representation of the model using alias"""
44
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
45
- return json.dumps(self.to_dict())
46
+ return json.dumps(to_jsonable_python(self.to_dict()))
46
47
 
47
48
  @classmethod
48
49
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.ske.models.access import Access
@@ -55,7 +56,8 @@ class CreateOrUpdateClusterPayload(BaseModel):
55
56
  ]
56
57
 
57
58
  model_config = ConfigDict(
58
- populate_by_name=True,
59
+ validate_by_name=True,
60
+ validate_by_alias=True,
59
61
  validate_assignment=True,
60
62
  protected_namespaces=(),
61
63
  )
@@ -66,8 +68,7 @@ class CreateOrUpdateClusterPayload(BaseModel):
66
68
 
67
69
  def to_json(self) -> str:
68
70
  """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())
71
+ return json.dumps(to_jsonable_python(self.to_dict()))
71
72
 
72
73
  @classmethod
73
74
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from datetime import datetime
20
20
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -77,7 +78,8 @@ class CredentialsRotationState(BaseModel):
77
78
  return value
78
79
 
79
80
  model_config = ConfigDict(
80
- populate_by_name=True,
81
+ validate_by_name=True,
82
+ validate_by_alias=True,
81
83
  validate_assignment=True,
82
84
  protected_namespaces=(),
83
85
  )
@@ -88,8 +90,7 @@ class CredentialsRotationState(BaseModel):
88
90
 
89
91
  def to_json(self) -> str:
90
92
  """Returns the JSON representation of the model using alias"""
91
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
92
- return json.dumps(self.to_dict())
93
+ return json.dumps(to_jsonable_python(self.to_dict()))
93
94
 
94
95
  @classmethod
95
96
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -40,7 +41,8 @@ class CRI(BaseModel):
40
41
  return value
41
42
 
42
43
  model_config = ConfigDict(
43
- populate_by_name=True,
44
+ validate_by_name=True,
45
+ validate_by_alias=True,
44
46
  validate_assignment=True,
45
47
  protected_namespaces=(),
46
48
  )
@@ -51,8 +53,7 @@ class CRI(BaseModel):
51
53
 
52
54
  def to_json(self) -> str:
53
55
  """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
+ return json.dumps(to_jsonable_python(self.to_dict()))
56
57
 
57
58
  @classmethod
58
59
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictBool
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
 
@@ -27,13 +28,19 @@ class DNS(BaseModel):
27
28
  """ # noqa: E501
28
29
 
29
30
  enabled: StrictBool = Field(description="Enables the dns extension.")
31
+ gateway_api: Optional[StrictBool] = Field(
32
+ default=None,
33
+ description="Enables Gateway API support for ExternalDNS. The CRDs must be installed by the user. Once installed, ExternalDNS will be configured at the next cluster reconcile.",
34
+ alias="gatewayApi",
35
+ )
30
36
  zones: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=20)]] = Field(
31
- default=None, description="Array of domain filters for externalDNS, e.g., *.runs.onstackit.cloud."
37
+ default=None, description="Array of domain filters for ExternalDNS, e.g., *.runs.onstackit.cloud."
32
38
  )
33
- __properties: ClassVar[List[str]] = ["enabled", "zones"]
39
+ __properties: ClassVar[List[str]] = ["enabled", "gatewayApi", "zones"]
34
40
 
35
41
  model_config = ConfigDict(
36
- populate_by_name=True,
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
37
44
  validate_assignment=True,
38
45
  protected_namespaces=(),
39
46
  )
@@ -44,8 +51,7 @@ class DNS(BaseModel):
44
51
 
45
52
  def to_json(self) -> str:
46
53
  """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
54
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
55
 
50
56
  @classmethod
51
57
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -80,5 +86,7 @@ class DNS(BaseModel):
80
86
  if not isinstance(obj, dict):
81
87
  return cls.model_validate(obj)
82
88
 
83
- _obj = cls.model_validate({"enabled": obj.get("enabled"), "zones": obj.get("zones")})
89
+ _obj = cls.model_validate(
90
+ {"enabled": obj.get("enabled"), "gatewayApi": obj.get("gatewayApi"), "zones": obj.get("zones")}
91
+ )
84
92
  return _obj
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.ske.models.expiration_status_kubernetes import ExpirationStatusKubernetes
@@ -34,7 +35,8 @@ class ExpirationStatus(BaseModel):
34
35
  __properties: ClassVar[List[str]] = ["kubernetes", "nodepools"]
35
36
 
36
37
  model_config = ConfigDict(
37
- populate_by_name=True,
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
38
40
  validate_assignment=True,
39
41
  protected_namespaces=(),
40
42
  )
@@ -45,8 +47,7 @@ class ExpirationStatus(BaseModel):
45
47
 
46
48
  def to_json(self) -> str:
47
49
  """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
51
 
51
52
  @classmethod
52
53
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from datetime import datetime
20
20
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -46,7 +47,8 @@ class ExpirationStatusKubernetes(BaseModel):
46
47
  return value
47
48
 
48
49
  model_config = ConfigDict(
49
- populate_by_name=True,
50
+ validate_by_name=True,
51
+ validate_by_alias=True,
50
52
  validate_assignment=True,
51
53
  protected_namespaces=(),
52
54
  )
@@ -57,8 +59,7 @@ class ExpirationStatusKubernetes(BaseModel):
57
59
 
58
60
  def to_json(self) -> str:
59
61
  """Returns the JSON representation of the model using alias"""
60
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
61
- return json.dumps(self.to_dict())
62
+ return json.dumps(to_jsonable_python(self.to_dict()))
62
63
 
63
64
  @classmethod
64
65
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from datetime import datetime
20
20
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -70,7 +71,8 @@ class ExpirationStatusNodepool(BaseModel):
70
71
  return value
71
72
 
72
73
  model_config = ConfigDict(
73
- populate_by_name=True,
74
+ validate_by_name=True,
75
+ validate_by_alias=True,
74
76
  validate_assignment=True,
75
77
  protected_namespaces=(),
76
78
  )
@@ -81,8 +83,7 @@ class ExpirationStatusNodepool(BaseModel):
81
83
 
82
84
  def to_json(self) -> str:
83
85
  """Returns the JSON representation of the model using alias"""
84
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
85
- return json.dumps(self.to_dict())
86
+ return json.dumps(to_jsonable_python(self.to_dict()))
86
87
 
87
88
  @classmethod
88
89
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.ske.models.acl import ACL
@@ -36,7 +37,8 @@ class Extension(BaseModel):
36
37
  __properties: ClassVar[List[str]] = ["acl", "dns", "observability"]
37
38
 
38
39
  model_config = ConfigDict(
39
- populate_by_name=True,
40
+ validate_by_name=True,
41
+ validate_by_alias=True,
40
42
  validate_assignment=True,
41
43
  protected_namespaces=(),
42
44
  )
@@ -47,8 +49,7 @@ class Extension(BaseModel):
47
49
 
48
50
  def to_json(self) -> str:
49
51
  """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
53
 
53
54
  @classmethod
54
55
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.ske.models.hibernation_schedule import HibernationSchedule
@@ -32,7 +33,8 @@ class Hibernation(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["schedules"]
33
34
 
34
35
  model_config = ConfigDict(
35
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
36
38
  validate_assignment=True,
37
39
  protected_namespaces=(),
38
40
  )
@@ -43,8 +45,7 @@ class Hibernation(BaseModel):
43
45
 
44
46
  def to_json(self) -> str:
45
47
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
49
 
49
50
  @classmethod
50
51
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -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
 
@@ -35,6 +36,9 @@ class HibernationSchedule(BaseModel):
35
36
  @field_validator("end")
36
37
  def end_validate_regular_expression(cls, value):
37
38
  """Validates the regular expression"""
39
+ if not isinstance(value, str):
40
+ value = str(value)
41
+
38
42
  if not re.match(
39
43
  r"(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})",
40
44
  value,
@@ -47,6 +51,9 @@ class HibernationSchedule(BaseModel):
47
51
  @field_validator("start")
48
52
  def start_validate_regular_expression(cls, value):
49
53
  """Validates the regular expression"""
54
+ if not isinstance(value, str):
55
+ value = str(value)
56
+
50
57
  if not re.match(
51
58
  r"(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})",
52
59
  value,
@@ -57,7 +64,8 @@ class HibernationSchedule(BaseModel):
57
64
  return value
58
65
 
59
66
  model_config = ConfigDict(
60
- populate_by_name=True,
67
+ validate_by_name=True,
68
+ validate_by_alias=True,
61
69
  validate_assignment=True,
62
70
  protected_namespaces=(),
63
71
  )
@@ -68,8 +76,7 @@ class HibernationSchedule(BaseModel):
68
76
 
69
77
  def to_json(self) -> str:
70
78
  """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())
79
+ return json.dumps(to_jsonable_python(self.to_dict()))
73
80
 
74
81
  @classmethod
75
82
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -24,6 +24,7 @@ from pydantic import (
24
24
  StrictBool,
25
25
  StrictStr,
26
26
  )
27
+ from pydantic_core import to_jsonable_python
27
28
  from typing_extensions import Self
28
29
 
29
30
 
@@ -37,7 +38,8 @@ class IDP(BaseModel):
37
38
  __properties: ClassVar[List[str]] = ["enabled", "type"]
38
39
 
39
40
  model_config = ConfigDict(
40
- populate_by_name=True,
41
+ validate_by_name=True,
42
+ validate_by_alias=True,
41
43
  validate_assignment=True,
42
44
  protected_namespaces=(),
43
45
  )
@@ -48,8 +50,7 @@ class IDP(BaseModel):
48
50
 
49
51
  def to_json(self) -> str:
50
52
  """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
54
 
54
55
  @classmethod
55
56
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -30,7 +31,8 @@ class IDPKubeconfig(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["kubeconfig"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -41,8 +43,7 @@ class IDPKubeconfig(BaseModel):
41
43
 
42
44
  def to_json(self) -> str:
43
45
  """Returns the JSON representation of the model using alias"""
44
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
45
- return json.dumps(self.to_dict())
46
+ return json.dumps(to_jsonable_python(self.to_dict()))
46
47
 
47
48
  @classmethod
48
49
  def from_json(cls, json_str: str) -> Optional[Self]: