stackit-sqlserverflex 1.3.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 (87) hide show
  1. stackit/sqlserverflex/__init__.py +128 -88
  2. stackit/sqlserverflex/api/default_api.py +1977 -1535
  3. stackit/sqlserverflex/api_client.py +1 -1
  4. stackit/sqlserverflex/configuration.py +1 -1
  5. stackit/sqlserverflex/exceptions.py +1 -1
  6. stackit/sqlserverflex/models/__init__.py +69 -47
  7. stackit/sqlserverflex/models/{restore_running_restore.py → backup_running_restore.py} +11 -11
  8. stackit/sqlserverflex/models/backup_sort.py +47 -0
  9. stackit/sqlserverflex/models/create_database_payload.py +13 -17
  10. stackit/sqlserverflex/models/create_database_response.py +3 -3
  11. stackit/sqlserverflex/models/create_instance_payload.py +39 -39
  12. stackit/sqlserverflex/models/{instance_documentation_options.py → create_instance_payload_network.py} +17 -13
  13. stackit/sqlserverflex/models/create_instance_response.py +3 -3
  14. stackit/sqlserverflex/models/create_user_payload.py +9 -5
  15. stackit/sqlserverflex/models/create_user_response.py +35 -10
  16. stackit/sqlserverflex/models/{mssql_database_collation.py → database_getcollation.py} +5 -5
  17. stackit/sqlserverflex/models/{mssql_database_compatibility.py → database_getcompatibility.py} +5 -5
  18. stackit/sqlserverflex/models/database_roles.py +84 -0
  19. stackit/sqlserverflex/models/database_sort.py +45 -0
  20. stackit/sqlserverflex/models/{instance_error.py → error.py} +12 -14
  21. stackit/sqlserverflex/models/{list_users_response.py → external_s3.py} +27 -21
  22. stackit/sqlserverflex/models/flavor_sort.py +53 -0
  23. stackit/sqlserverflex/models/{instance_flavor_entry.py → flavor_storage_classes_storage_class.py} +13 -17
  24. stackit/sqlserverflex/models/{storage_range.py → flavor_storage_range.py} +8 -8
  25. stackit/sqlserverflex/models/get_backup_response.py +12 -18
  26. stackit/sqlserverflex/models/get_database_response.py +20 -10
  27. stackit/sqlserverflex/models/get_instance_response.py +85 -10
  28. stackit/sqlserverflex/models/get_user_response.py +19 -10
  29. stackit/sqlserverflex/models/instance_edition.py +38 -0
  30. stackit/sqlserverflex/models/{database_documentation_create_database_request_options.py → instance_encryption.py} +14 -14
  31. stackit/sqlserverflex/models/{single_database.py → instance_network.py} +21 -16
  32. stackit/sqlserverflex/models/instance_network_access_scope.py +37 -0
  33. stackit/sqlserverflex/models/instance_sort.py +45 -0
  34. stackit/sqlserverflex/models/{type.py → instance_version.py} +5 -10
  35. stackit/sqlserverflex/models/instance_version_opt.py +36 -0
  36. stackit/sqlserverflex/models/{backup.py → list_backup.py} +17 -19
  37. stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py → list_backup_response.py} +18 -12
  38. stackit/sqlserverflex/models/list_backups_response.py +17 -17
  39. stackit/sqlserverflex/models/list_collations_response.py +5 -5
  40. stackit/sqlserverflex/models/list_compatibility_response.py +6 -6
  41. stackit/sqlserverflex/models/{list_restore_jobs_response.py → list_current_running_restore_jobs.py} +10 -8
  42. stackit/sqlserverflex/models/{flavor.py → list_database.py} +12 -17
  43. stackit/sqlserverflex/models/list_databases_response.py +13 -7
  44. stackit/sqlserverflex/models/{instance.py → list_flavors.py} +45 -45
  45. stackit/sqlserverflex/models/list_flavors_response.py +13 -7
  46. stackit/sqlserverflex/models/{user_response_user.py → list_instance.py} +22 -18
  47. stackit/sqlserverflex/models/list_instances_response.py +20 -16
  48. stackit/sqlserverflex/models/list_roles_response.py +3 -3
  49. stackit/sqlserverflex/models/list_storages_response.py +23 -7
  50. stackit/sqlserverflex/models/list_user.py +85 -0
  51. stackit/sqlserverflex/models/list_user_response.py +104 -0
  52. stackit/sqlserverflex/models/list_versions_response.py +19 -4
  53. stackit/sqlserverflex/models/{instance_documentation_storage.py → pagination.py} +15 -11
  54. stackit/sqlserverflex/models/partial_update_instance_payload.py +42 -20
  55. stackit/sqlserverflex/models/{database.py → partial_update_instance_payload_network.py} +8 -10
  56. stackit/sqlserverflex/models/replicas.py +37 -0
  57. stackit/sqlserverflex/models/reset_user_response.py +15 -10
  58. stackit/sqlserverflex/models/{host.py → restore_database_from_backup_payload.py} +18 -20
  59. stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py +150 -0
  60. stackit/sqlserverflex/models/s3file_info.py +84 -0
  61. stackit/sqlserverflex/models/source_backup.py +90 -0
  62. stackit/sqlserverflex/models/source_external_s3.py +107 -0
  63. stackit/sqlserverflex/models/state.py +41 -0
  64. stackit/sqlserverflex/models/storage.py +6 -4
  65. stackit/sqlserverflex/models/storage_create.py +84 -0
  66. stackit/sqlserverflex/models/{acl.py → storage_update.py} +9 -9
  67. stackit/sqlserverflex/models/{trigger_database_restore_payload.py → trigger_restore_payload.py} +8 -7
  68. stackit/sqlserverflex/models/update_instance_payload.py +43 -19
  69. stackit/sqlserverflex/models/{instance_documentation_acl.py → update_instance_payload_network.py} +8 -8
  70. stackit/sqlserverflex/models/{instance_list_instance.py → update_instance_protection_payload.py} +9 -11
  71. stackit/sqlserverflex/models/update_instance_protection_response.py +83 -0
  72. stackit/sqlserverflex/models/user_sort.py +43 -0
  73. stackit/sqlserverflex/models/{host_metric.py → validation_error.py} +24 -22
  74. stackit/sqlserverflex/models/{instance_list_user.py → validation_error_validation_inner.py} +10 -10
  75. stackit/sqlserverflex/models/{database_options.py → version.py} +23 -15
  76. stackit/sqlserverflex/rest.py +1 -1
  77. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/METADATA +1 -1
  78. stackit_sqlserverflex-1.4.0.dist-info/RECORD +84 -0
  79. stackit/sqlserverflex/models/data_point.py +0 -90
  80. stackit/sqlserverflex/models/list_metrics_response.py +0 -94
  81. stackit/sqlserverflex/models/single_user.py +0 -110
  82. stackit/sqlserverflex/models/update_instance_response.py +0 -88
  83. stackit/sqlserverflex/models/user.py +0 -101
  84. stackit_sqlserverflex-1.3.0.dist-info/RECORD +0 -70
  85. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/WHEEL +0 -0
  86. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/licenses/LICENSE.md +0 -0
  87. {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/licenses/NOTICE.txt +0 -0
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -23,20 +23,20 @@ from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class Backup(BaseModel):
26
+ class ListBackup(BaseModel):
27
27
  """
28
- Backup
28
+ ListBackup
29
29
  """ # noqa: E501
30
30
 
31
- end_time: Optional[StrictStr] = Field(default=None, alias="endTime")
32
- error: Optional[StrictStr] = None
33
- id: Optional[StrictStr] = None
34
- labels: Optional[List[StrictStr]] = None
35
- name: Optional[StrictStr] = None
36
- options: Optional[Dict[str, StrictStr]] = None
37
- size: Optional[StrictInt] = None
38
- start_time: Optional[StrictStr] = Field(default=None, alias="startTime")
39
- __properties: ClassVar[List[str]] = ["endTime", "error", "id", "labels", "name", "options", "size", "startTime"]
31
+ completion_time: StrictStr = Field(
32
+ description="The time when the backup was completed in RFC3339 format.", alias="completionTime"
33
+ )
34
+ id: StrictInt = Field(description="The ID of the backup.")
35
+ name: StrictStr = Field(description="The name of the backup.")
36
+ retained_until: StrictStr = Field(description="The time until the backup will be retained.", alias="retainedUntil")
37
+ size: StrictInt = Field(description="The size of the backup in bytes.")
38
+ type: StrictStr = Field(description="The type of the backup, which can be automated or manual triggered.")
39
+ __properties: ClassVar[List[str]] = ["completionTime", "id", "name", "retainedUntil", "size", "type"]
40
40
 
41
41
  model_config = ConfigDict(
42
42
  validate_by_name=True,
@@ -55,7 +55,7 @@ class Backup(BaseModel):
55
55
 
56
56
  @classmethod
57
57
  def from_json(cls, json_str: str) -> Optional[Self]:
58
- """Create an instance of Backup from a JSON string"""
58
+ """Create an instance of ListBackup from a JSON string"""
59
59
  return cls.from_dict(json.loads(json_str))
60
60
 
61
61
  def to_dict(self) -> Dict[str, Any]:
@@ -79,7 +79,7 @@ class Backup(BaseModel):
79
79
 
80
80
  @classmethod
81
81
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
- """Create an instance of Backup from a dict"""
82
+ """Create an instance of ListBackup from a dict"""
83
83
  if obj is None:
84
84
  return None
85
85
 
@@ -88,14 +88,12 @@ class Backup(BaseModel):
88
88
 
89
89
  _obj = cls.model_validate(
90
90
  {
91
- "endTime": obj.get("endTime"),
92
- "error": obj.get("error"),
91
+ "completionTime": obj.get("completionTime"),
93
92
  "id": obj.get("id"),
94
- "labels": obj.get("labels"),
95
93
  "name": obj.get("name"),
96
- "options": obj.get("options"),
94
+ "retainedUntil": obj.get("retainedUntil"),
97
95
  "size": obj.get("size"),
98
- "startTime": obj.get("startTime"),
96
+ "type": obj.get("type"),
99
97
  }
100
98
  )
101
99
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,21 +18,22 @@ 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, StrictStr
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.backup import Backup
25
+ from stackit.sqlserverflex.models.list_backups_response import ListBackupsResponse
26
+ from stackit.sqlserverflex.models.pagination import Pagination
26
27
 
27
28
 
28
- class BackupListBackupsResponseGrouped(BaseModel):
29
+ class ListBackupResponse(BaseModel):
29
30
  """
30
- BackupListBackupsResponseGrouped
31
+ ListBackupResponse
31
32
  """ # noqa: E501
32
33
 
33
- backups: Optional[List[Backup]] = None
34
- name: Optional[StrictStr] = None
35
- __properties: ClassVar[List[str]] = ["backups", "name"]
34
+ backups: List[ListBackupsResponse] = Field(description="The list containing the information about the backups.")
35
+ pagination: Pagination
36
+ __properties: ClassVar[List[str]] = ["backups", "pagination"]
36
37
 
37
38
  model_config = ConfigDict(
38
39
  validate_by_name=True,
@@ -51,7 +52,7 @@ class BackupListBackupsResponseGrouped(BaseModel):
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of BackupListBackupsResponseGrouped from a JSON string"""
55
+ """Create an instance of ListBackupResponse from a JSON string"""
55
56
  return cls.from_dict(json.loads(json_str))
56
57
 
57
58
  def to_dict(self) -> Dict[str, Any]:
@@ -78,11 +79,14 @@ class BackupListBackupsResponseGrouped(BaseModel):
78
79
  if _item_backups:
79
80
  _items.append(_item_backups.to_dict())
80
81
  _dict["backups"] = _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
84
88
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
- """Create an instance of BackupListBackupsResponseGrouped from a dict"""
89
+ """Create an instance of ListBackupResponse from a dict"""
86
90
  if obj is None:
87
91
  return None
88
92
 
@@ -92,9 +96,11 @@ class BackupListBackupsResponseGrouped(BaseModel):
92
96
  _obj = cls.model_validate(
93
97
  {
94
98
  "backups": (
95
- [Backup.from_dict(_item) for _item in obj["backups"]] if obj.get("backups") is not None else None
99
+ [ListBackupsResponse.from_dict(_item) for _item in obj["backups"]]
100
+ if obj.get("backups") is not None
101
+ else None
96
102
  ),
97
- "name": obj.get("name"),
103
+ "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
98
104
  }
99
105
  )
100
106
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,13 +18,11 @@ 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, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
- from stackit.sqlserverflex.models.backup_list_backups_response_grouped import (
26
- BackupListBackupsResponseGrouped,
27
- )
25
+ from stackit.sqlserverflex.models.list_backup import ListBackup
28
26
 
29
27
 
30
28
  class ListBackupsResponse(BaseModel):
@@ -32,8 +30,9 @@ class ListBackupsResponse(BaseModel):
32
30
  ListBackupsResponse
33
31
  """ # noqa: E501
34
32
 
35
- databases: Optional[List[BackupListBackupsResponseGrouped]] = None
36
- __properties: ClassVar[List[str]] = ["databases"]
33
+ backups: List[ListBackup] = Field(description="List of the backups beloning to that database")
34
+ database_name: StrictStr = Field(description="Name of the database the backups belong to", alias="databaseName")
35
+ __properties: ClassVar[List[str]] = ["backups", "databaseName"]
37
36
 
38
37
  model_config = ConfigDict(
39
38
  validate_by_name=True,
@@ -72,13 +71,13 @@ class ListBackupsResponse(BaseModel):
72
71
  exclude=excluded_fields,
73
72
  exclude_none=True,
74
73
  )
75
- # override the default output from pydantic by calling `to_dict()` of each item in databases (list)
74
+ # override the default output from pydantic by calling `to_dict()` of each item in backups (list)
76
75
  _items = []
77
- if self.databases:
78
- for _item_databases in self.databases:
79
- if _item_databases:
80
- _items.append(_item_databases.to_dict())
81
- _dict["databases"] = _items
76
+ if self.backups:
77
+ for _item_backups in self.backups:
78
+ if _item_backups:
79
+ _items.append(_item_backups.to_dict())
80
+ _dict["backups"] = _items
82
81
  return _dict
83
82
 
84
83
  @classmethod
@@ -92,11 +91,12 @@ class ListBackupsResponse(BaseModel):
92
91
 
93
92
  _obj = cls.model_validate(
94
93
  {
95
- "databases": (
96
- [BackupListBackupsResponseGrouped.from_dict(_item) for _item in obj["databases"]]
97
- if obj.get("databases") is not None
94
+ "backups": (
95
+ [ListBackup.from_dict(_item) for _item in obj["backups"]]
96
+ if obj.get("backups") is not None
98
97
  else None
99
- )
98
+ ),
99
+ "databaseName": obj.get("databaseName"),
100
100
  }
101
101
  )
102
102
  return _obj
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,11 +18,11 @@ 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_collation import MssqlDatabaseCollation
25
+ from stackit.sqlserverflex.models.database_getcollation import DatabaseGetcollation
26
26
 
27
27
 
28
28
  class ListCollationsResponse(BaseModel):
@@ -30,7 +30,7 @@ class ListCollationsResponse(BaseModel):
30
30
  ListCollationsResponse
31
31
  """ # noqa: E501
32
32
 
33
- collations: Optional[List[MssqlDatabaseCollation]] = None
33
+ collations: List[DatabaseGetcollation] = Field(description="List of collations available for the instance.")
34
34
  __properties: ClassVar[List[str]] = ["collations"]
35
35
 
36
36
  model_config = ConfigDict(
@@ -91,7 +91,7 @@ class ListCollationsResponse(BaseModel):
91
91
  _obj = cls.model_validate(
92
92
  {
93
93
  "collations": (
94
- [MssqlDatabaseCollation.from_dict(_item) for _item in obj["collations"]]
94
+ [DatabaseGetcollation.from_dict(_item) for _item in obj["collations"]]
95
95
  if obj.get("collations") is not None
96
96
  else None
97
97
  )
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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
  )
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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
  )
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
5
5
 
6
6
  This is the documentation for the STACKIT MSSQL service
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 3.0.0
9
9
  Contact: support@stackit.cloud
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -22,37 +22,37 @@ 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
- from stackit.sqlserverflex.models.acl import ACL
26
- from stackit.sqlserverflex.models.flavor import Flavor
27
- from stackit.sqlserverflex.models.storage import Storage
25
+ from stackit.sqlserverflex.models.flavor_storage_classes_storage_class import (
26
+ FlavorStorageClassesStorageClass,
27
+ )
28
28
 
29
29
 
30
- class Instance(BaseModel):
30
+ class ListFlavors(BaseModel):
31
31
  """
32
- Instance
32
+ The flavor of the instance containing the technical features.
33
33
  """ # noqa: E501
34
34
 
35
- acl: Optional[ACL] = None
36
- backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule")
37
- flavor: Optional[Flavor] = None
38
- id: Optional[StrictStr] = None
39
- name: Optional[StrictStr] = None
40
- options: Optional[Dict[str, StrictStr]] = None
41
- replicas: Optional[StrictInt] = None
42
- status: Optional[StrictStr] = None
43
- storage: Optional[Storage] = None
44
- version: Optional[StrictStr] = None
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
+ )
45
47
  __properties: ClassVar[List[str]] = [
46
- "acl",
47
- "backupSchedule",
48
- "flavor",
48
+ "cpu",
49
+ "description",
49
50
  "id",
50
- "name",
51
- "options",
52
- "replicas",
53
- "status",
54
- "storage",
55
- "version",
51
+ "maxGB",
52
+ "memory",
53
+ "minGB",
54
+ "nodeType",
55
+ "storageClasses",
56
56
  ]
57
57
 
58
58
  model_config = ConfigDict(
@@ -72,7 +72,7 @@ class Instance(BaseModel):
72
72
 
73
73
  @classmethod
74
74
  def from_json(cls, json_str: str) -> Optional[Self]:
75
- """Create an instance of Instance from a JSON string"""
75
+ """Create an instance of ListFlavors from a JSON string"""
76
76
  return cls.from_dict(json.loads(json_str))
77
77
 
78
78
  def to_dict(self) -> Dict[str, Any]:
@@ -92,20 +92,18 @@ class Instance(BaseModel):
92
92
  exclude=excluded_fields,
93
93
  exclude_none=True,
94
94
  )
95
- # override the default output from pydantic by calling `to_dict()` of acl
96
- if self.acl:
97
- _dict["acl"] = self.acl.to_dict()
98
- # override the default output from pydantic by calling `to_dict()` of flavor
99
- if self.flavor:
100
- _dict["flavor"] = self.flavor.to_dict()
101
- # override the default output from pydantic by calling `to_dict()` of storage
102
- if self.storage:
103
- _dict["storage"] = self.storage.to_dict()
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
104
102
  return _dict
105
103
 
106
104
  @classmethod
107
105
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
108
- """Create an instance of Instance from a dict"""
106
+ """Create an instance of ListFlavors from a dict"""
109
107
  if obj is None:
110
108
  return None
111
109
 
@@ -114,16 +112,18 @@ class Instance(BaseModel):
114
112
 
115
113
  _obj = cls.model_validate(
116
114
  {
117
- "acl": ACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None,
118
- "backupSchedule": obj.get("backupSchedule"),
119
- "flavor": Flavor.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None,
115
+ "cpu": obj.get("cpu"),
116
+ "description": obj.get("description"),
120
117
  "id": obj.get("id"),
121
- "name": obj.get("name"),
122
- "options": obj.get("options"),
123
- "replicas": obj.get("replicas"),
124
- "status": obj.get("status"),
125
- "storage": Storage.from_dict(obj["storage"]) if obj.get("storage") is not None else None,
126
- "version": obj.get("version"),
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
127
  }
128
128
  )
129
129
  return _obj