stackit-objectstorage 1.3.0__tar.gz → 1.4.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 (45) hide show
  1. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/PKG-INFO +1 -1
  2. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/pyproject.toml +1 -1
  3. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/api_client.py +15 -17
  4. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/access_key.py +4 -3
  5. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/bucket.py +4 -3
  6. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/compliance_lock_response.py +4 -3
  7. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/create_access_key_payload.py +4 -3
  8. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/create_access_key_response.py +4 -3
  9. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/create_bucket_response.py +4 -3
  10. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/create_credentials_group_payload.py +4 -3
  11. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/create_credentials_group_response.py +4 -3
  12. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/credentials_group.py +4 -3
  13. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/credentials_group_extended.py +4 -3
  14. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/default_retention_response.py +4 -3
  15. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/delete_access_key_response.py +4 -3
  16. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/delete_bucket_response.py +4 -3
  17. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/delete_credentials_group_response.py +4 -3
  18. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/delete_default_retention_response.py +4 -3
  19. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/detailed_error.py +4 -3
  20. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/error_message.py +4 -3
  21. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/get_bucket_response.py +4 -3
  22. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/get_credentials_group_response.py +4 -3
  23. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/http_validation_error.py +4 -3
  24. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/list_access_keys_response.py +4 -3
  25. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/list_buckets_response.py +4 -3
  26. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/list_credentials_groups_response.py +4 -3
  27. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/project_status.py +4 -3
  28. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/set_default_retention_payload.py +4 -3
  29. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/validation_error.py +4 -3
  30. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/.gitignore +0 -0
  31. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/LICENSE.md +0 -0
  32. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/NOTICE.txt +0 -0
  33. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/README.md +0 -0
  34. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/__init__.py +0 -0
  35. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/api/__init__.py +0 -0
  36. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/api/default_api.py +0 -0
  37. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/api_response.py +0 -0
  38. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/configuration.py +0 -0
  39. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/exceptions.py +0 -0
  40. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/__init__.py +0 -0
  41. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/location_inner.py +0 -0
  42. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/project_scope.py +0 -0
  43. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/models/retention_mode.py +0 -0
  44. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/py.typed +0 -0
  45. {stackit_objectstorage-1.3.0 → stackit_objectstorage-1.4.0}/src/stackit/objectstorage/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-objectstorage
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: STACKIT Object Storage 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-objectstorage"
3
- version = "v1.3.0"
3
+ version = "v1.4.0"
4
4
  description = "STACKIT Object Storage 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, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -34,7 +35,8 @@ class AccessKey(BaseModel):
34
35
  __properties: ClassVar[List[str]] = ["displayName", "expires", "keyId"]
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 AccessKey(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]:
@@ -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
 
@@ -44,7 +45,8 @@ class Bucket(BaseModel):
44
45
  __properties: ClassVar[List[str]] = ["name", "objectLockEnabled", "region", "urlPathStyle", "urlVirtualHostedStyle"]
45
46
 
46
47
  model_config = ConfigDict(
47
- populate_by_name=True,
48
+ validate_by_name=True,
49
+ validate_by_alias=True,
48
50
  validate_assignment=True,
49
51
  protected_namespaces=(),
50
52
  )
@@ -55,8 +57,7 @@ class Bucket(BaseModel):
55
57
 
56
58
  def to_json(self) -> str:
57
59
  """Returns the JSON representation of the model using alias"""
58
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
- return json.dumps(self.to_dict())
60
+ return json.dumps(to_jsonable_python(self.to_dict()))
60
61
 
61
62
  @classmethod
62
63
  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, StrictInt, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -31,7 +32,8 @@ class ComplianceLockResponse(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["maxRetentionDays", "project"]
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 ComplianceLockResponse(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 datetime import datetime
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 Self
24
25
 
25
26
 
@@ -45,7 +46,8 @@ class CreateAccessKeyPayload(BaseModel):
45
46
  return value
46
47
 
47
48
  model_config = ConfigDict(
48
- populate_by_name=True,
49
+ validate_by_name=True,
50
+ validate_by_alias=True,
49
51
  validate_assignment=True,
50
52
  protected_namespaces=(),
51
53
  )
@@ -56,8 +58,7 @@ class CreateAccessKeyPayload(BaseModel):
56
58
 
57
59
  def to_json(self) -> str:
58
60
  """Returns the JSON representation of the model using alias"""
59
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
- return json.dumps(self.to_dict())
61
+ return json.dumps(to_jsonable_python(self.to_dict()))
61
62
 
62
63
  @classmethod
63
64
  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
 
@@ -37,7 +38,8 @@ class CreateAccessKeyResponse(BaseModel):
37
38
  __properties: ClassVar[List[str]] = ["accessKey", "displayName", "expires", "keyId", "project", "secretAccessKey"]
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 CreateAccessKeyResponse(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, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -31,7 +32,8 @@ class CreateBucketResponse(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["bucket", "project"]
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 CreateBucketResponse(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]:
@@ -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
 
@@ -32,7 +33,8 @@ class CreateCredentialsGroupPayload(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["displayName"]
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 CreateCredentialsGroupPayload(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]:
@@ -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
  from stackit.objectstorage.models.credentials_group import CredentialsGroup
@@ -33,7 +34,8 @@ class CreateCredentialsGroupResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["credentialsGroup", "project"]
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 CreateCredentialsGroupResponse(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]:
@@ -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
 
@@ -32,7 +33,8 @@ class CredentialsGroup(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["credentialsGroupId", "displayName", "urn"]
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 CredentialsGroup(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]:
@@ -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
 
@@ -33,7 +34,8 @@ class CredentialsGroupExtended(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["credentialsGroupId", "displayName", "urn", "userUrn"]
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 CredentialsGroupExtended(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]:
@@ -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, StrictInt, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.objectstorage.models.retention_mode import RetentionMode
@@ -35,7 +36,8 @@ class DefaultRetentionResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["bucket", "days", "mode", "project"]
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 DefaultRetentionResponse(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]:
@@ -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
 
@@ -33,7 +34,8 @@ class DeleteAccessKeyResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["keyId", "project"]
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 DeleteAccessKeyResponse(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]:
@@ -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
 
@@ -31,7 +32,8 @@ class DeleteBucketResponse(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["bucket", "project"]
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 DeleteBucketResponse(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]:
@@ -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
 
@@ -31,7 +32,8 @@ class DeleteCredentialsGroupResponse(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["credentialsGroupId", "project"]
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 DeleteCredentialsGroupResponse(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]:
@@ -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
 
@@ -31,7 +32,8 @@ class DeleteDefaultRetentionResponse(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["bucket", "project"]
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 DeleteDefaultRetentionResponse(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]:
@@ -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
 
@@ -31,7 +32,8 @@ class DetailedError(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["key", "msg"]
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 DetailedError(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]:
@@ -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.objectstorage.models.detailed_error import DetailedError
@@ -32,7 +33,8 @@ class ErrorMessage(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["detail"]
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 ErrorMessage(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]:
@@ -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
  from stackit.objectstorage.models.bucket import Bucket
@@ -33,7 +34,8 @@ class GetBucketResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["bucket", "project"]
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 GetBucketResponse(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]:
@@ -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
  from stackit.objectstorage.models.credentials_group_extended import (
@@ -35,7 +36,8 @@ class GetCredentialsGroupResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["credentialsGroup", "project"]
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 GetCredentialsGroupResponse(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]:
@@ -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.objectstorage.models.validation_error import ValidationError
@@ -32,7 +33,8 @@ class HTTPValidationError(BaseModel):
32
33
  __properties: ClassVar[List[str]] = ["detail"]
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 HTTPValidationError(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]:
@@ -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
  from stackit.objectstorage.models.access_key import AccessKey
@@ -33,7 +34,8 @@ class ListAccessKeysResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["accessKeys", "project"]
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 ListAccessKeysResponse(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]:
@@ -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
  from stackit.objectstorage.models.bucket import Bucket
@@ -33,7 +34,8 @@ class ListBucketsResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["buckets", "project"]
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 ListBucketsResponse(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]:
@@ -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
  from stackit.objectstorage.models.credentials_group import CredentialsGroup
@@ -33,7 +34,8 @@ class ListCredentialsGroupsResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["credentialsGroups", "project"]
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 ListCredentialsGroupsResponse(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]:
@@ -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
  from stackit.objectstorage.models.project_scope import ProjectScope
@@ -33,7 +34,8 @@ class ProjectStatus(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["project", "scope"]
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 ProjectStatus(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]:
@@ -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.objectstorage.models.retention_mode import RetentionMode
@@ -33,7 +34,8 @@ class SetDefaultRetentionPayload(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["days", "mode"]
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 SetDefaultRetentionPayload(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]:
@@ -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
  from stackit.objectstorage.models.location_inner import LocationInner
@@ -34,7 +35,8 @@ class ValidationError(BaseModel):
34
35
  __properties: ClassVar[List[str]] = ["loc", "msg", "type"]
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 ValidationError(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]: