stackit-scf 0.4.1__tar.gz → 0.5.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 (58) hide show
  1. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/PKG-INFO +1 -1
  2. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/pyproject.toml +1 -1
  3. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/api_client.py +15 -17
  4. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/apply_organization_quota_payload.py +4 -3
  5. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/create_org_role_payload.py +4 -3
  6. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/create_organization_payload.py +4 -3
  7. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/create_space_payload.py +4 -3
  8. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/create_space_role_payload.py +4 -3
  9. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/error_response.py +4 -3
  10. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/isolation_segment.py +4 -3
  11. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/isolation_segments_list.py +4 -3
  12. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/org_manager.py +4 -3
  13. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/org_manager_delete_response.py +7 -3
  14. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/org_manager_response.py +4 -3
  15. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/org_role_create_bff_request.py +4 -3
  16. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/org_role_response.py +4 -3
  17. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organization.py +4 -3
  18. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organization_create_bff_response.py +4 -3
  19. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organization_create_response.py +4 -3
  20. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organization_delete_response.py +4 -3
  21. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organization_quota.py +4 -3
  22. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organization_usage_summary.py +4 -3
  23. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organizations_list.py +4 -3
  24. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/organizations_list_item.py +4 -3
  25. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/pagination.py +4 -3
  26. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/platform_list.py +4 -3
  27. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/platforms.py +4 -3
  28. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/quota.py +4 -3
  29. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/quota_apps.py +4 -3
  30. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/quota_domains.py +4 -3
  31. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/quota_routes.py +4 -3
  32. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/quota_services.py +4 -3
  33. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space.py +4 -3
  34. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_created_bff_response.py +4 -3
  35. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_delete_response.py +7 -3
  36. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_role_create_bff_request.py +4 -3
  37. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_role_create_bff_response.py +4 -3
  38. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_role_create_response.py +4 -3
  39. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_with_isolation_segment.py +4 -3
  40. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/spaces_list.py +4 -3
  41. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/update_organization_payload.py +4 -3
  42. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/update_space_payload.py +4 -3
  43. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/usage_summary.py +4 -3
  44. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/.gitignore +0 -0
  45. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/LICENSE.md +0 -0
  46. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/NOTICE.txt +0 -0
  47. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/README.md +0 -0
  48. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/__init__.py +0 -0
  49. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/api/__init__.py +0 -0
  50. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/api/default_api.py +0 -0
  51. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/api_response.py +0 -0
  52. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/configuration.py +0 -0
  53. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/exceptions.py +0 -0
  54. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/__init__.py +0 -0
  55. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/org_role_type.py +0 -0
  56. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/models/space_role_type.py +0 -0
  57. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/py.typed +0 -0
  58. {stackit_scf-0.4.1 → stackit_scf-0.5.0}/src/stackit/scf/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-scf
3
- Version: 0.4.1
3
+ Version: 0.5.0
4
4
  Summary: STACKIT Cloud Foundry 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-scf"
3
- version = "v0.4.1"
3
+ version = "v0.5.0"
4
4
  description = "STACKIT Cloud Foundry API"
5
5
  authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
6
6
  requires-python = ">=3.9,<4"
@@ -67,6 +67,7 @@ class ApiClient:
67
67
  "date": datetime.date,
68
68
  "datetime": datetime.datetime,
69
69
  "decimal": decimal.Decimal,
70
+ "UUID": uuid.UUID,
70
71
  "object": object,
71
72
  }
72
73
  _pool = None
@@ -266,7 +267,7 @@ class ApiClient:
266
267
  response_text = None
267
268
  return_data = None
268
269
  try:
269
- if response_type == "bytearray":
270
+ if response_type in ("bytearray", "bytes"):
270
271
  return_data = response_data.data
271
272
  elif response_type == "file":
272
273
  return_data = self.__deserialize_file(response_data)
@@ -327,25 +328,20 @@ class ApiClient:
327
328
  return obj.isoformat()
328
329
  elif isinstance(obj, decimal.Decimal):
329
330
  return str(obj)
330
-
331
331
  elif isinstance(obj, dict):
332
- obj_dict = obj
332
+ return {key: self.sanitize_for_serialization(val) for key, val in obj.items()}
333
+
334
+ # Convert model obj to dict except
335
+ # attributes `openapi_types`, `attribute_map`
336
+ # and attributes which value is not None.
337
+ # Convert attribute name to json key in
338
+ # model definition for request.
339
+ if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
340
+ obj_dict = obj.to_dict()
333
341
  else:
334
- # Convert model obj to dict except
335
- # attributes `openapi_types`, `attribute_map`
336
- # and attributes which value is not None.
337
- # Convert attribute name to json key in
338
- # model definition for request.
339
- if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
340
- obj_dict = obj.to_dict()
341
- else:
342
- obj_dict = obj.__dict__
343
-
344
- if isinstance(obj_dict, list):
345
- # 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
346
- return self.sanitize_for_serialization(obj_dict)
342
+ obj_dict = obj.__dict__
347
343
 
348
- return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()}
344
+ return self.sanitize_for_serialization(obj_dict)
349
345
 
350
346
  def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
351
347
  """Deserializes response into an object.
@@ -418,6 +414,8 @@ class ApiClient:
418
414
  return self.__deserialize_datetime(data)
419
415
  elif klass is decimal.Decimal:
420
416
  return decimal.Decimal(data)
417
+ elif klass is uuid.UUID:
418
+ return uuid.UUID(data)
421
419
  elif issubclass(klass, Enum):
422
420
  return self.__deserialize_enum(data, klass)
423
421
  else:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -32,7 +33,8 @@ class ApplyOrganizationQuotaPayload(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["quotaId"]
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 ApplyOrganizationQuotaPayload(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]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
  from stackit.scf.models.org_role_type import OrgRoleType
@@ -36,7 +37,8 @@ class CreateOrgRolePayload(BaseModel):
36
37
  __properties: ClassVar[List[str]] = ["type", "userGuid", "userName"]
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 CreateOrgRolePayload(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]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Annotated, Self
24
25
 
25
26
 
@@ -33,7 +34,8 @@ class CreateOrganizationPayload(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["name", "platformId"]
34
35
 
35
36
  model_config = ConfigDict(
36
- populate_by_name=True,
37
+ validate_by_name=True,
38
+ validate_by_alias=True,
37
39
  validate_assignment=True,
38
40
  protected_namespaces=(),
39
41
  )
@@ -44,8 +46,7 @@ class CreateOrganizationPayload(BaseModel):
44
46
 
45
47
  def to_json(self) -> str:
46
48
  """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())
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
50
 
50
51
  @classmethod
51
52
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
 
@@ -31,7 +32,8 @@ class CreateSpacePayload(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["name"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
35
37
  validate_assignment=True,
36
38
  protected_namespaces=(),
37
39
  )
@@ -42,8 +44,7 @@ class CreateSpacePayload(BaseModel):
42
44
 
43
45
  def to_json(self) -> str:
44
46
  """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
48
 
48
49
  @classmethod
49
50
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
  from stackit.scf.models.space_role_type import SpaceRoleType
@@ -36,7 +37,8 @@ class CreateSpaceRolePayload(BaseModel):
36
37
  __properties: ClassVar[List[str]] = ["type", "userGuid", "userName"]
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 CreateSpaceRolePayload(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]:
@@ -19,6 +19,7 @@ import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Self
23
24
 
24
25
 
@@ -32,7 +33,8 @@ class ErrorResponse(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["code", "message"]
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 ErrorResponse(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]:
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
  from uuid import UUID
23
23
 
24
24
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
25
+ from pydantic_core import to_jsonable_python
25
26
  from typing_extensions import Self
26
27
 
27
28
 
@@ -76,7 +77,8 @@ class IsolationSegment(BaseModel):
76
77
  return value
77
78
 
78
79
  model_config = ConfigDict(
79
- populate_by_name=True,
80
+ validate_by_name=True,
81
+ validate_by_alias=True,
80
82
  validate_assignment=True,
81
83
  protected_namespaces=(),
82
84
  )
@@ -87,8 +89,7 @@ class IsolationSegment(BaseModel):
87
89
 
88
90
  def to_json(self) -> str:
89
91
  """Returns the JSON representation of the model using alias"""
90
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
91
- return json.dumps(self.to_dict())
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
92
93
 
93
94
  @classmethod
94
95
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Self
23
24
 
24
25
  from stackit.scf.models.isolation_segment import IsolationSegment
@@ -35,7 +36,8 @@ class IsolationSegmentsList(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["pagination", "resources"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -46,8 +48,7 @@ class IsolationSegmentsList(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
  from uuid import UUID
23
23
 
24
24
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
25
+ from pydantic_core import to_jsonable_python
25
26
  from typing_extensions import Self
26
27
 
27
28
 
@@ -76,7 +77,8 @@ class OrgManager(BaseModel):
76
77
  return value
77
78
 
78
79
  model_config = ConfigDict(
79
- populate_by_name=True,
80
+ validate_by_name=True,
81
+ validate_by_alias=True,
80
82
  validate_assignment=True,
81
83
  protected_namespaces=(),
82
84
  )
@@ -87,8 +89,7 @@ class OrgManager(BaseModel):
87
89
 
88
90
  def to_json(self) -> str:
89
91
  """Returns the JSON representation of the model using alias"""
90
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
91
- return json.dumps(self.to_dict())
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
92
93
 
93
94
  @classmethod
94
95
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ import re # noqa: F401
20
20
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, field_validator
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Annotated, Self
24
25
 
25
26
 
@@ -34,12 +35,16 @@ class OrgManagerDeleteResponse(BaseModel):
34
35
  @field_validator("message")
35
36
  def message_validate_regular_expression(cls, value):
36
37
  """Validates the regular expression"""
38
+ if not isinstance(value, str):
39
+ value = str(value)
40
+
37
41
  if not re.match(r"^[a-zA-Z0-9\/_]+$", value):
38
42
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\/_]+$/")
39
43
  return value
40
44
 
41
45
  model_config = ConfigDict(
42
- populate_by_name=True,
46
+ validate_by_name=True,
47
+ validate_by_alias=True,
43
48
  validate_assignment=True,
44
49
  protected_namespaces=(),
45
50
  )
@@ -50,8 +55,7 @@ class OrgManagerDeleteResponse(BaseModel):
50
55
 
51
56
  def to_json(self) -> str:
52
57
  """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())
58
+ return json.dumps(to_jsonable_python(self.to_dict()))
55
59
 
56
60
  @classmethod
57
61
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
  from uuid import UUID
23
23
 
24
24
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
25
+ from pydantic_core import to_jsonable_python
25
26
  from typing_extensions import Self
26
27
 
27
28
 
@@ -78,7 +79,8 @@ class OrgManagerResponse(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 OrgManagerResponse(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]:
@@ -19,6 +19,7 @@ import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Self
23
24
 
24
25
  from stackit.scf.models.org_role_type import OrgRoleType
@@ -33,7 +34,8 @@ class OrgRoleCreateBffRequest(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["type"]
34
35
 
35
36
  model_config = ConfigDict(
36
- populate_by_name=True,
37
+ validate_by_name=True,
38
+ validate_by_alias=True,
37
39
  validate_assignment=True,
38
40
  protected_namespaces=(),
39
41
  )
@@ -44,8 +46,7 @@ class OrgRoleCreateBffRequest(BaseModel):
44
46
 
45
47
  def to_json(self) -> str:
46
48
  """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())
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
50
 
50
51
  @classmethod
51
52
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
  from stackit.scf.models.org_role_type import OrgRoleType
@@ -39,7 +40,8 @@ class OrgRoleResponse(BaseModel):
39
40
  __properties: ClassVar[List[str]] = ["guid", "orgId", "platformId", "projectId", "region", "type"]
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 OrgRoleResponse(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]:
@@ -29,6 +29,7 @@ from pydantic import (
29
29
  StrictStr,
30
30
  field_validator,
31
31
  )
32
+ from pydantic_core import to_jsonable_python
32
33
  from typing_extensions import Self
33
34
 
34
35
 
@@ -89,7 +90,8 @@ class Organization(BaseModel):
89
90
  return value
90
91
 
91
92
  model_config = ConfigDict(
92
- populate_by_name=True,
93
+ validate_by_name=True,
94
+ validate_by_alias=True,
93
95
  validate_assignment=True,
94
96
  protected_namespaces=(),
95
97
  )
@@ -100,8 +102,7 @@ class Organization(BaseModel):
100
102
 
101
103
  def to_json(self) -> str:
102
104
  """Returns the JSON representation of the model using alias"""
103
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
104
- return json.dumps(self.to_dict())
105
+ return json.dumps(to_jsonable_python(self.to_dict()))
105
106
 
106
107
  @classmethod
107
108
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Self
23
24
 
24
25
  from stackit.scf.models.org_role_response import OrgRoleResponse
@@ -35,7 +36,8 @@ class OrganizationCreateBffResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["org", "roles"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -46,8 +48,7 @@ class OrganizationCreateBffResponse(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -35,7 +36,8 @@ class OrganizationCreateResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["guid", "platformId", "projectId", "region"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -46,8 +48,7 @@ class OrganizationCreateResponse(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -35,7 +36,8 @@ class OrganizationDeleteResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["guid", "platformId", "projectId", "region"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -46,8 +48,7 @@ class OrganizationDeleteResponse(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
 
@@ -36,7 +37,8 @@ class OrganizationQuota(BaseModel):
36
37
  __properties: ClassVar[List[str]] = ["orgId", "platformId", "projectId", "quotaId", "region"]
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 OrganizationQuota(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]:
@@ -20,6 +20,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
  from uuid import UUID
21
21
 
22
22
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from pydantic_core import to_jsonable_python
23
24
  from typing_extensions import Self
24
25
 
25
26
  from stackit.scf.models.usage_summary import UsageSummary
@@ -38,7 +39,8 @@ class OrganizationUsageSummary(BaseModel):
38
39
  __properties: ClassVar[List[str]] = ["orgId", "platformId", "projectId", "region", "usageSummary"]
39
40
 
40
41
  model_config = ConfigDict(
41
- populate_by_name=True,
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
42
44
  validate_assignment=True,
43
45
  protected_namespaces=(),
44
46
  )
@@ -49,8 +51,7 @@ class OrganizationUsageSummary(BaseModel):
49
51
 
50
52
  def to_json(self) -> str:
51
53
  """Returns the JSON representation of the model using alias"""
52
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
- return json.dumps(self.to_dict())
54
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
55
 
55
56
  @classmethod
56
57
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Self
23
24
 
24
25
  from stackit.scf.models.organizations_list_item import OrganizationsListItem
@@ -35,7 +36,8 @@ class OrganizationsList(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["pagination", "resources"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -46,8 +48,7 @@ class OrganizationsList(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]: