stackit-sqlserverflex 1.2.0__py3-none-any.whl → 1.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. stackit/sqlserverflex/__init__.py +133 -94
  2. stackit/sqlserverflex/api/default_api.py +1982 -1540
  3. stackit/sqlserverflex/api_client.py +6 -7
  4. stackit/sqlserverflex/api_response.py +0 -1
  5. stackit/sqlserverflex/configuration.py +6 -7
  6. stackit/sqlserverflex/exceptions.py +6 -6
  7. stackit/sqlserverflex/models/__init__.py +74 -52
  8. stackit/sqlserverflex/models/{restore_running_restore.py → backup_running_restore.py} +16 -16
  9. stackit/sqlserverflex/models/backup_sort.py +47 -0
  10. stackit/sqlserverflex/models/create_database_payload.py +18 -22
  11. stackit/sqlserverflex/models/create_database_response.py +8 -8
  12. stackit/sqlserverflex/models/create_instance_payload.py +44 -44
  13. stackit/sqlserverflex/models/{instance_documentation_options.py → create_instance_payload_network.py} +22 -18
  14. stackit/sqlserverflex/models/create_instance_response.py +8 -8
  15. stackit/sqlserverflex/models/create_user_payload.py +14 -10
  16. stackit/sqlserverflex/models/create_user_response.py +40 -15
  17. stackit/sqlserverflex/models/{mssql_database_collation.py → database_getcollation.py} +10 -10
  18. stackit/sqlserverflex/models/{mssql_database_compatibility.py → database_getcompatibility.py} +10 -10
  19. stackit/sqlserverflex/models/{database.py → database_roles.py} +14 -15
  20. stackit/sqlserverflex/models/database_sort.py +45 -0
  21. stackit/sqlserverflex/models/{instance_error.py → error.py} +17 -19
  22. stackit/sqlserverflex/models/{list_users_response.py → external_s3.py} +32 -26
  23. stackit/sqlserverflex/models/flavor_sort.py +53 -0
  24. stackit/sqlserverflex/models/flavor_storage_classes_storage_class.py +91 -0
  25. stackit/sqlserverflex/models/{storage_range.py → flavor_storage_range.py} +13 -13
  26. stackit/sqlserverflex/models/get_backup_response.py +17 -23
  27. stackit/sqlserverflex/models/get_database_response.py +25 -15
  28. stackit/sqlserverflex/models/get_instance_response.py +90 -15
  29. stackit/sqlserverflex/models/get_user_response.py +24 -15
  30. stackit/sqlserverflex/models/instance_edition.py +38 -0
  31. stackit/sqlserverflex/models/{database_documentation_create_database_request_options.py → instance_encryption.py} +19 -19
  32. stackit/sqlserverflex/models/{single_database.py → instance_network.py} +26 -21
  33. stackit/sqlserverflex/models/instance_network_access_scope.py +37 -0
  34. stackit/sqlserverflex/models/instance_sort.py +45 -0
  35. stackit/sqlserverflex/models/instance_version.py +36 -0
  36. stackit/sqlserverflex/models/instance_version_opt.py +36 -0
  37. stackit/sqlserverflex/models/{backup.py → list_backup.py} +22 -24
  38. stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py → list_backup_response.py} +23 -17
  39. stackit/sqlserverflex/models/list_backups_response.py +22 -22
  40. stackit/sqlserverflex/models/list_collations_response.py +10 -10
  41. stackit/sqlserverflex/models/list_compatibility_response.py +11 -11
  42. stackit/sqlserverflex/models/{list_restore_jobs_response.py → list_current_running_restore_jobs.py} +15 -13
  43. stackit/sqlserverflex/models/{flavor.py → list_database.py} +17 -22
  44. stackit/sqlserverflex/models/list_databases_response.py +18 -12
  45. stackit/sqlserverflex/models/list_flavors.py +129 -0
  46. stackit/sqlserverflex/models/list_flavors_response.py +18 -12
  47. stackit/sqlserverflex/models/{instance_flavor_entry.py → list_instance.py} +27 -21
  48. stackit/sqlserverflex/models/list_instances_response.py +25 -21
  49. stackit/sqlserverflex/models/list_roles_response.py +8 -8
  50. stackit/sqlserverflex/models/list_storages_response.py +28 -12
  51. stackit/sqlserverflex/models/list_user.py +85 -0
  52. stackit/sqlserverflex/models/list_user_response.py +104 -0
  53. stackit/sqlserverflex/models/list_versions_response.py +24 -9
  54. stackit/sqlserverflex/models/{instance_documentation_storage.py → pagination.py} +20 -16
  55. stackit/sqlserverflex/models/partial_update_instance_payload.py +47 -25
  56. stackit/sqlserverflex/models/{instance_documentation_acl.py → partial_update_instance_payload_network.py} +13 -13
  57. stackit/sqlserverflex/models/replicas.py +37 -0
  58. stackit/sqlserverflex/models/reset_user_response.py +20 -15
  59. stackit/sqlserverflex/models/{host.py → restore_database_from_backup_payload.py} +23 -25
  60. stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py +150 -0
  61. stackit/sqlserverflex/models/s3file_info.py +84 -0
  62. stackit/sqlserverflex/models/source_backup.py +90 -0
  63. stackit/sqlserverflex/models/source_external_s3.py +107 -0
  64. stackit/sqlserverflex/models/state.py +41 -0
  65. stackit/sqlserverflex/models/storage.py +11 -9
  66. stackit/sqlserverflex/models/{instance_list_instance.py → storage_create.py} +15 -16
  67. stackit/sqlserverflex/models/{instance_list_user.py → storage_update.py} +14 -15
  68. stackit/sqlserverflex/models/{trigger_database_restore_payload.py → trigger_restore_payload.py} +13 -12
  69. stackit/sqlserverflex/models/update_instance_payload.py +48 -24
  70. stackit/sqlserverflex/models/{acl.py → update_instance_payload_network.py} +14 -14
  71. stackit/sqlserverflex/models/update_instance_protection_payload.py +83 -0
  72. stackit/sqlserverflex/models/update_instance_protection_response.py +83 -0
  73. stackit/sqlserverflex/models/user_sort.py +43 -0
  74. stackit/sqlserverflex/models/{host_metric.py → validation_error.py} +29 -27
  75. stackit/sqlserverflex/models/validation_error_validation_inner.py +84 -0
  76. stackit/sqlserverflex/models/{database_options.py → version.py} +28 -20
  77. stackit/sqlserverflex/rest.py +6 -7
  78. {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/METADATA +3 -4
  79. stackit_sqlserverflex-1.4.0.dist-info/RECORD +84 -0
  80. {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/WHEEL +1 -1
  81. stackit/sqlserverflex/models/data_point.py +0 -90
  82. stackit/sqlserverflex/models/instance.py +0 -129
  83. stackit/sqlserverflex/models/list_metrics_response.py +0 -94
  84. stackit/sqlserverflex/models/single_user.py +0 -110
  85. stackit/sqlserverflex/models/type.py +0 -41
  86. stackit/sqlserverflex/models/update_instance_response.py +0 -88
  87. stackit/sqlserverflex/models/user.py +0 -101
  88. stackit/sqlserverflex/models/user_response_user.py +0 -97
  89. stackit_sqlserverflex-1.2.0.dist-info/RECORD +0 -70
  90. {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/licenses/LICENSE.md +0 -0
  91. {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/licenses/NOTICE.txt +0 -0
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -18,12 +18,12 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict
21
+ from pydantic import BaseModel, ConfigDict, Field
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.mssql_database_compatibility import (
26
- MssqlDatabaseCompatibility,
25
+ from stackit.sqlserverflex.models.database_getcompatibility import (
26
+ DatabaseGetcompatibility,
27
27
  )
28
28
 
29
29
 
@@ -32,7 +32,7 @@ class ListCompatibilityResponse(BaseModel):
32
32
  ListCompatibilityResponse
33
33
  """ # noqa: E501
34
34
 
35
- compatibilities: Optional[List[MssqlDatabaseCompatibility]] = None
35
+ compatibilities: List[DatabaseGetcompatibility] = Field(description="List of compatibilities available for a d")
36
36
  __properties: ClassVar[List[str]] = ["compatibilities"]
37
37
 
38
38
  model_config = ConfigDict(
@@ -93,7 +93,7 @@ class ListCompatibilityResponse(BaseModel):
93
93
  _obj = cls.model_validate(
94
94
  {
95
95
  "compatibilities": (
96
- [MssqlDatabaseCompatibility.from_dict(_item) for _item in obj["compatibilities"]]
96
+ [DatabaseGetcompatibility.from_dict(_item) for _item in obj["compatibilities"]]
97
97
  if obj.get("compatibilities") is not None
98
98
  else None
99
99
  )
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -22,15 +22,17 @@ from pydantic import BaseModel, ConfigDict, Field
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.restore_running_restore import RestoreRunningRestore
25
+ from stackit.sqlserverflex.models.backup_running_restore import BackupRunningRestore
26
26
 
27
27
 
28
- class ListRestoreJobsResponse(BaseModel):
28
+ class ListCurrentRunningRestoreJobs(BaseModel):
29
29
  """
30
- ListRestoreJobsResponse
30
+ ListCurrentRunningRestoreJobs
31
31
  """ # noqa: E501
32
32
 
33
- running_restores: Optional[List[RestoreRunningRestore]] = Field(default=None, alias="runningRestores")
33
+ running_restores: List[BackupRunningRestore] = Field(
34
+ description="List of the currently running Restore jobs", alias="runningRestores"
35
+ )
34
36
  __properties: ClassVar[List[str]] = ["runningRestores"]
35
37
 
36
38
  model_config = ConfigDict(
@@ -50,7 +52,7 @@ class ListRestoreJobsResponse(BaseModel):
50
52
 
51
53
  @classmethod
52
54
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of ListRestoreJobsResponse from a JSON string"""
55
+ """Create an instance of ListCurrentRunningRestoreJobs from a JSON string"""
54
56
  return cls.from_dict(json.loads(json_str))
55
57
 
56
58
  def to_dict(self) -> Dict[str, Any]:
@@ -81,7 +83,7 @@ class ListRestoreJobsResponse(BaseModel):
81
83
 
82
84
  @classmethod
83
85
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
- """Create an instance of ListRestoreJobsResponse from a dict"""
86
+ """Create an instance of ListCurrentRunningRestoreJobs from a dict"""
85
87
  if obj is None:
86
88
  return None
87
89
 
@@ -91,7 +93,7 @@ class ListRestoreJobsResponse(BaseModel):
91
93
  _obj = cls.model_validate(
92
94
  {
93
95
  "runningRestores": (
94
- [RestoreRunningRestore.from_dict(_item) for _item in obj["runningRestores"]]
96
+ [BackupRunningRestore.from_dict(_item) for _item in obj["runningRestores"]]
95
97
  if obj.get("runningRestores") is not None
96
98
  else None
97
99
  )
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -18,21 +18,21 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class Flavor(BaseModel):
26
+ class ListDatabase(BaseModel):
27
27
  """
28
- Flavor
28
+ ListDatabase
29
29
  """ # noqa: E501
30
30
 
31
- cpu: Optional[StrictInt] = None
32
- description: Optional[StrictStr] = None
33
- id: Optional[StrictStr] = None
34
- memory: Optional[StrictInt] = None
35
- __properties: ClassVar[List[str]] = ["cpu", "description", "id", "memory"]
31
+ created: StrictStr = Field(description="The date when the database was created in RFC3339 format.")
32
+ id: StrictInt = Field(description="The id of the database.")
33
+ name: StrictStr = Field(description="The name of the database.")
34
+ owner: StrictStr = Field(description="The owner of the database.")
35
+ __properties: ClassVar[List[str]] = ["created", "id", "name", "owner"]
36
36
 
37
37
  model_config = ConfigDict(
38
38
  validate_by_name=True,
@@ -51,7 +51,7 @@ class Flavor(BaseModel):
51
51
 
52
52
  @classmethod
53
53
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of Flavor from a JSON string"""
54
+ """Create an instance of ListDatabase from a JSON string"""
55
55
  return cls.from_dict(json.loads(json_str))
56
56
 
57
57
  def to_dict(self) -> Dict[str, Any]:
@@ -75,7 +75,7 @@ class Flavor(BaseModel):
75
75
 
76
76
  @classmethod
77
77
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
- """Create an instance of Flavor from a dict"""
78
+ """Create an instance of ListDatabase from a dict"""
79
79
  if obj is None:
80
80
  return None
81
81
 
@@ -83,11 +83,6 @@ class Flavor(BaseModel):
83
83
  return cls.model_validate(obj)
84
84
 
85
85
  _obj = cls.model_validate(
86
- {
87
- "cpu": obj.get("cpu"),
88
- "description": obj.get("description"),
89
- "id": obj.get("id"),
90
- "memory": obj.get("memory"),
91
- }
86
+ {"created": obj.get("created"), "id": obj.get("id"), "name": obj.get("name"), "owner": obj.get("owner")}
92
87
  )
93
88
  return _obj
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -18,11 +18,12 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict
21
+ from pydantic import BaseModel, ConfigDict, Field
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.database import Database
25
+ from stackit.sqlserverflex.models.list_database import ListDatabase
26
+ from stackit.sqlserverflex.models.pagination import Pagination
26
27
 
27
28
 
28
29
  class ListDatabasesResponse(BaseModel):
@@ -30,8 +31,9 @@ class ListDatabasesResponse(BaseModel):
30
31
  ListDatabasesResponse
31
32
  """ # noqa: E501
32
33
 
33
- databases: Optional[List[Database]] = None
34
- __properties: ClassVar[List[str]] = ["databases"]
34
+ databases: List[ListDatabase] = Field(description="A list containing all databases for the instance.")
35
+ pagination: Pagination
36
+ __properties: ClassVar[List[str]] = ["databases", "pagination"]
35
37
 
36
38
  model_config = ConfigDict(
37
39
  validate_by_name=True,
@@ -77,6 +79,9 @@ class ListDatabasesResponse(BaseModel):
77
79
  if _item_databases:
78
80
  _items.append(_item_databases.to_dict())
79
81
  _dict["databases"] = _items
82
+ # override the default output from pydantic by calling `to_dict()` of pagination
83
+ if self.pagination:
84
+ _dict["pagination"] = self.pagination.to_dict()
80
85
  return _dict
81
86
 
82
87
  @classmethod
@@ -91,10 +96,11 @@ class ListDatabasesResponse(BaseModel):
91
96
  _obj = cls.model_validate(
92
97
  {
93
98
  "databases": (
94
- [Database.from_dict(_item) for _item in obj["databases"]]
99
+ [ListDatabase.from_dict(_item) for _item in obj["databases"]]
95
100
  if obj.get("databases") is not None
96
101
  else None
97
- )
102
+ ),
103
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
98
104
  }
99
105
  )
100
106
  return _obj
@@ -0,0 +1,129 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT MSSQL Service API
5
+
6
+ This is the documentation for the STACKIT MSSQL service
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ from typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
+ from pydantic_core import to_jsonable_python
23
+ from typing_extensions import Self
24
+
25
+ from stackit.sqlserverflex.models.flavor_storage_classes_storage_class import (
26
+ FlavorStorageClassesStorageClass,
27
+ )
28
+
29
+
30
+ class ListFlavors(BaseModel):
31
+ """
32
+ The flavor of the instance containing the technical features.
33
+ """ # noqa: E501
34
+
35
+ cpu: StrictInt = Field(description="The cpu count of the instance.")
36
+ description: StrictStr = Field(description="The flavor description.")
37
+ id: StrictStr = Field(description="The id of the instance flavor.")
38
+ max_gb: StrictInt = Field(
39
+ description="maximum storage which can be ordered for the flavor in Gigabyte.", alias="maxGB"
40
+ )
41
+ memory: StrictInt = Field(description="The memory of the instance in Gibibyte.")
42
+ min_gb: StrictInt = Field(description="minimum storage which is required to order in Gigabyte.", alias="minGB")
43
+ node_type: StrictStr = Field(description="defines the nodeType it can be either single or HA", alias="nodeType")
44
+ storage_classes: List[FlavorStorageClassesStorageClass] = Field(
45
+ description="maximum storage which can be ordered for the flavor in Gigabyte.", alias="storageClasses"
46
+ )
47
+ __properties: ClassVar[List[str]] = [
48
+ "cpu",
49
+ "description",
50
+ "id",
51
+ "maxGB",
52
+ "memory",
53
+ "minGB",
54
+ "nodeType",
55
+ "storageClasses",
56
+ ]
57
+
58
+ model_config = ConfigDict(
59
+ validate_by_name=True,
60
+ validate_by_alias=True,
61
+ validate_assignment=True,
62
+ protected_namespaces=(),
63
+ )
64
+
65
+ def to_str(self) -> str:
66
+ """Returns the string representation of the model using alias"""
67
+ return pprint.pformat(self.model_dump(by_alias=True))
68
+
69
+ def to_json(self) -> str:
70
+ """Returns the JSON representation of the model using alias"""
71
+ return json.dumps(to_jsonable_python(self.to_dict()))
72
+
73
+ @classmethod
74
+ def from_json(cls, json_str: str) -> Optional[Self]:
75
+ """Create an instance of ListFlavors from a JSON string"""
76
+ return cls.from_dict(json.loads(json_str))
77
+
78
+ def to_dict(self) -> Dict[str, Any]:
79
+ """Return the dictionary representation of the model using alias.
80
+
81
+ This has the following differences from calling pydantic's
82
+ `self.model_dump(by_alias=True)`:
83
+
84
+ * `None` is only added to the output dict for nullable fields that
85
+ were set at model initialization. Other fields with value `None`
86
+ are ignored.
87
+ """
88
+ excluded_fields: Set[str] = set([])
89
+
90
+ _dict = self.model_dump(
91
+ by_alias=True,
92
+ exclude=excluded_fields,
93
+ exclude_none=True,
94
+ )
95
+ # override the default output from pydantic by calling `to_dict()` of each item in storage_classes (list)
96
+ _items = []
97
+ if self.storage_classes:
98
+ for _item_storage_classes in self.storage_classes:
99
+ if _item_storage_classes:
100
+ _items.append(_item_storage_classes.to_dict())
101
+ _dict["storageClasses"] = _items
102
+ return _dict
103
+
104
+ @classmethod
105
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
106
+ """Create an instance of ListFlavors from a dict"""
107
+ if obj is None:
108
+ return None
109
+
110
+ if not isinstance(obj, dict):
111
+ return cls.model_validate(obj)
112
+
113
+ _obj = cls.model_validate(
114
+ {
115
+ "cpu": obj.get("cpu"),
116
+ "description": obj.get("description"),
117
+ "id": obj.get("id"),
118
+ "maxGB": obj.get("maxGB"),
119
+ "memory": obj.get("memory"),
120
+ "minGB": obj.get("minGB"),
121
+ "nodeType": obj.get("nodeType"),
122
+ "storageClasses": (
123
+ [FlavorStorageClassesStorageClass.from_dict(_item) for _item in obj["storageClasses"]]
124
+ if obj.get("storageClasses") is not None
125
+ else None
126
+ ),
127
+ }
128
+ )
129
+ return _obj
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -18,11 +18,12 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict
21
+ from pydantic import BaseModel, ConfigDict, Field
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.instance_flavor_entry import InstanceFlavorEntry
25
+ from stackit.sqlserverflex.models.list_flavors import ListFlavors
26
+ from stackit.sqlserverflex.models.pagination import Pagination
26
27
 
27
28
 
28
29
  class ListFlavorsResponse(BaseModel):
@@ -30,8 +31,9 @@ class ListFlavorsResponse(BaseModel):
30
31
  ListFlavorsResponse
31
32
  """ # noqa: E501
32
33
 
33
- flavors: Optional[List[InstanceFlavorEntry]] = None
34
- __properties: ClassVar[List[str]] = ["flavors"]
34
+ flavors: List[ListFlavors] = Field(description="List of flavors available for the project.")
35
+ pagination: Pagination
36
+ __properties: ClassVar[List[str]] = ["flavors", "pagination"]
35
37
 
36
38
  model_config = ConfigDict(
37
39
  validate_by_name=True,
@@ -77,6 +79,9 @@ class ListFlavorsResponse(BaseModel):
77
79
  if _item_flavors:
78
80
  _items.append(_item_flavors.to_dict())
79
81
  _dict["flavors"] = _items
82
+ # override the default output from pydantic by calling `to_dict()` of pagination
83
+ if self.pagination:
84
+ _dict["pagination"] = self.pagination.to_dict()
80
85
  return _dict
81
86
 
82
87
  @classmethod
@@ -91,10 +96,11 @@ class ListFlavorsResponse(BaseModel):
91
96
  _obj = cls.model_validate(
92
97
  {
93
98
  "flavors": (
94
- [InstanceFlavorEntry.from_dict(_item) for _item in obj["flavors"]]
99
+ [ListFlavors.from_dict(_item) for _item in obj["flavors"]]
95
100
  if obj.get("flavors") is not None
96
101
  else None
97
- )
102
+ ),
103
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
98
104
  }
99
105
  )
100
106
  return _obj
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -18,22 +18,29 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from pydantic import (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictStr,
27
+ )
22
28
  from pydantic_core import to_jsonable_python
23
29
  from typing_extensions import Self
24
30
 
31
+ from stackit.sqlserverflex.models.state import State
25
32
 
26
- class InstanceFlavorEntry(BaseModel):
33
+
34
+ class ListInstance(BaseModel):
27
35
  """
28
- InstanceFlavorEntry
36
+ ListInstance
29
37
  """ # noqa: E501
30
38
 
31
- categories: Optional[StrictStr] = None
32
- cpu: Optional[StrictInt] = None
33
- description: Optional[StrictStr] = None
34
- id: Optional[StrictStr] = None
35
- memory: Optional[StrictInt] = None
36
- __properties: ClassVar[List[str]] = ["categories", "cpu", "description", "id", "memory"]
39
+ id: StrictStr = Field(description="The ID of the instance.")
40
+ is_deletable: StrictBool = Field(description="Whether the instance can be deleted or not.", alias="isDeletable")
41
+ name: StrictStr = Field(description="The name of the instance.")
42
+ state: State
43
+ __properties: ClassVar[List[str]] = ["id", "isDeletable", "name", "state"]
37
44
 
38
45
  model_config = ConfigDict(
39
46
  validate_by_name=True,
@@ -52,7 +59,7 @@ class InstanceFlavorEntry(BaseModel):
52
59
 
53
60
  @classmethod
54
61
  def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of InstanceFlavorEntry from a JSON string"""
62
+ """Create an instance of ListInstance from a JSON string"""
56
63
  return cls.from_dict(json.loads(json_str))
57
64
 
58
65
  def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +83,7 @@ class InstanceFlavorEntry(BaseModel):
76
83
 
77
84
  @classmethod
78
85
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of InstanceFlavorEntry from a dict"""
86
+ """Create an instance of ListInstance from a dict"""
80
87
  if obj is None:
81
88
  return None
82
89
 
@@ -85,11 +92,10 @@ class InstanceFlavorEntry(BaseModel):
85
92
 
86
93
  _obj = cls.model_validate(
87
94
  {
88
- "categories": obj.get("categories"),
89
- "cpu": obj.get("cpu"),
90
- "description": obj.get("description"),
91
95
  "id": obj.get("id"),
92
- "memory": obj.get("memory"),
96
+ "isDeletable": obj.get("isDeletable"),
97
+ "name": obj.get("name"),
98
+ "state": obj.get("state"),
93
99
  }
94
100
  )
95
101
  return _obj
@@ -1,15 +1,15 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT MSSQL Service API
4
+ STACKIT MSSQL Service API
5
5
 
6
- This is the documentation for the STACKIT MSSQL service
6
+ This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Contact: support@stackit.cloud
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 3.0.0
9
+ Contact: support@stackit.cloud
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
@@ -18,11 +18,12 @@ import json
18
18
  import pprint
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict, StrictInt
21
+ from pydantic import BaseModel, ConfigDict, Field
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.instance_list_instance import InstanceListInstance
25
+ from stackit.sqlserverflex.models.list_instance import ListInstance
26
+ from stackit.sqlserverflex.models.pagination import Pagination
26
27
 
27
28
 
28
29
  class ListInstancesResponse(BaseModel):
@@ -30,9 +31,9 @@ class ListInstancesResponse(BaseModel):
30
31
  ListInstancesResponse
31
32
  """ # noqa: E501
32
33
 
33
- count: Optional[StrictInt] = None
34
- items: Optional[List[InstanceListInstance]] = None
35
- __properties: ClassVar[List[str]] = ["count", "items"]
34
+ instances: List[ListInstance] = Field(description="List of owned instances and their current status.")
35
+ pagination: Pagination
36
+ __properties: ClassVar[List[str]] = ["instances", "pagination"]
36
37
 
37
38
  model_config = ConfigDict(
38
39
  validate_by_name=True,
@@ -71,13 +72,16 @@ class ListInstancesResponse(BaseModel):
71
72
  exclude=excluded_fields,
72
73
  exclude_none=True,
73
74
  )
74
- # override the default output from pydantic by calling `to_dict()` of each item in items (list)
75
+ # override the default output from pydantic by calling `to_dict()` of each item in instances (list)
75
76
  _items = []
76
- if self.items:
77
- for _item_items in self.items:
78
- if _item_items:
79
- _items.append(_item_items.to_dict())
80
- _dict["items"] = _items
77
+ if self.instances:
78
+ for _item_instances in self.instances:
79
+ if _item_instances:
80
+ _items.append(_item_instances.to_dict())
81
+ _dict["instances"] = _items
82
+ # override the default output from pydantic by calling `to_dict()` of pagination
83
+ if self.pagination:
84
+ _dict["pagination"] = self.pagination.to_dict()
81
85
  return _dict
82
86
 
83
87
  @classmethod
@@ -91,12 +95,12 @@ class ListInstancesResponse(BaseModel):
91
95
 
92
96
  _obj = cls.model_validate(
93
97
  {
94
- "count": obj.get("count"),
95
- "items": (
96
- [InstanceListInstance.from_dict(_item) for _item in obj["items"]]
97
- if obj.get("items") is not None
98
+ "instances": (
99
+ [ListInstance.from_dict(_item) for _item in obj["instances"]]
100
+ if obj.get("instances") is not None
98
101
  else None
99
102
  ),
103
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
100
104
  }
101
105
  )
102
106
  return _obj