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
@@ -22,19 +22,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.instance_network_access_scope import (
26
+ InstanceNetworkAccessScope,
27
+ )
25
28
 
26
- class InstanceDocumentationOptions(BaseModel):
29
+
30
+ class CreateInstancePayloadNetwork(BaseModel):
27
31
  """
28
- InstanceDocumentationOptions
32
+ the network configuration of the instance.
29
33
  """ # noqa: E501
30
34
 
31
- edition: Optional[StrictStr] = Field(default="developer", description="Edition of the MSSQL server instance")
32
- retention_days: Optional[StrictStr] = Field(
33
- default="32",
34
- description="The days for how long the backup files should be stored before cleaned up. 30 to 365",
35
- alias="retentionDays",
35
+ access_scope: Optional[InstanceNetworkAccessScope] = Field(
36
+ default=InstanceNetworkAccessScope.PUBLIC, alias="accessScope"
36
37
  )
37
- __properties: ClassVar[List[str]] = ["edition", "retentionDays"]
38
+ acl: List[StrictStr] = Field(description="List of IPV4 cidr.")
39
+ __properties: ClassVar[List[str]] = ["accessScope", "acl"]
38
40
 
39
41
  model_config = ConfigDict(
40
42
  validate_by_name=True,
@@ -53,7 +55,7 @@ class InstanceDocumentationOptions(BaseModel):
53
55
 
54
56
  @classmethod
55
57
  def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of InstanceDocumentationOptions from a JSON string"""
58
+ """Create an instance of CreateInstancePayloadNetwork from a JSON string"""
57
59
  return cls.from_dict(json.loads(json_str))
58
60
 
59
61
  def to_dict(self) -> Dict[str, Any]:
@@ -77,7 +79,7 @@ class InstanceDocumentationOptions(BaseModel):
77
79
 
78
80
  @classmethod
79
81
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of InstanceDocumentationOptions from a dict"""
82
+ """Create an instance of CreateInstancePayloadNetwork from a dict"""
81
83
  if obj is None:
82
84
  return None
83
85
 
@@ -86,8 +88,10 @@ class InstanceDocumentationOptions(BaseModel):
86
88
 
87
89
  _obj = cls.model_validate(
88
90
  {
89
- "edition": obj.get("edition") if obj.get("edition") is not None else "developer",
90
- "retentionDays": obj.get("retentionDays") if obj.get("retentionDays") is not None else "32",
91
+ "accessScope": (
92
+ obj.get("accessScope") if obj.get("accessScope") is not None else InstanceNetworkAccessScope.PUBLIC
93
+ ),
94
+ "acl": obj.get("acl"),
91
95
  }
92
96
  )
93
97
  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,7 +18,7 @@ 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, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
@@ -28,7 +28,7 @@ class CreateInstanceResponse(BaseModel):
28
28
  CreateInstanceResponse
29
29
  """ # noqa: E501
30
30
 
31
- id: Optional[StrictStr] = None
31
+ id: StrictStr = Field(description="The ID of the instance.")
32
32
  __properties: ClassVar[List[str]] = ["id"]
33
33
 
34
34
  model_config = ConfigDict(
@@ -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,7 +18,7 @@ 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, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
@@ -28,9 +28,13 @@ class CreateUserPayload(BaseModel):
28
28
  CreateUserPayload
29
29
  """ # noqa: E501
30
30
 
31
- default_database: Optional[StrictStr] = None
32
- roles: List[StrictStr]
33
- username: StrictStr
31
+ default_database: Optional[StrictStr] = Field(
32
+ default=None, description="The default database for a user of the instance."
33
+ )
34
+ roles: List[StrictStr] = Field(
35
+ description="A list containing the user roles for the instance. A list with the valid user roles can be retrieved using the List Roles endpoint."
36
+ )
37
+ username: StrictStr = Field(description="The name of the user.")
34
38
  __properties: ClassVar[List[str]] = ["default_database", "roles", "username"]
35
39
 
36
40
  model_config = ConfigDict(
@@ -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,20 +18,36 @@ 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, 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.single_user import SingleUser
26
-
27
25
 
28
26
  class CreateUserResponse(BaseModel):
29
27
  """
30
28
  CreateUserResponse
31
29
  """ # noqa: E501
32
30
 
33
- item: Optional[SingleUser] = None
34
- __properties: ClassVar[List[str]] = ["item"]
31
+ default_database: StrictStr = Field(description="The default database for a user of the instance.")
32
+ host: StrictStr = Field(description="The host of the instance in which the user belongs to.")
33
+ id: StrictInt = Field(description="The ID of the user.")
34
+ password: StrictStr = Field(description="The password for the user.")
35
+ port: StrictInt = Field(description="The port of the instance in which the user belongs to.")
36
+ roles: List[StrictStr]
37
+ status: StrictStr = Field(description="The current status of the user.")
38
+ uri: StrictStr = Field(description="The connection string for the user to the instance.")
39
+ username: StrictStr = Field(description="The name of the user.")
40
+ __properties: ClassVar[List[str]] = [
41
+ "default_database",
42
+ "host",
43
+ "id",
44
+ "password",
45
+ "port",
46
+ "roles",
47
+ "status",
48
+ "uri",
49
+ "username",
50
+ ]
35
51
 
36
52
  model_config = ConfigDict(
37
53
  validate_by_name=True,
@@ -70,9 +86,6 @@ class CreateUserResponse(BaseModel):
70
86
  exclude=excluded_fields,
71
87
  exclude_none=True,
72
88
  )
73
- # override the default output from pydantic by calling `to_dict()` of item
74
- if self.item:
75
- _dict["item"] = self.item.to_dict()
76
89
  return _dict
77
90
 
78
91
  @classmethod
@@ -84,5 +97,17 @@ class CreateUserResponse(BaseModel):
84
97
  if not isinstance(obj, dict):
85
98
  return cls.model_validate(obj)
86
99
 
87
- _obj = cls.model_validate({"item": SingleUser.from_dict(obj["item"]) if obj.get("item") is not None else None})
100
+ _obj = cls.model_validate(
101
+ {
102
+ "default_database": obj.get("default_database"),
103
+ "host": obj.get("host"),
104
+ "id": obj.get("id"),
105
+ "password": obj.get("password"),
106
+ "port": obj.get("port"),
107
+ "roles": obj.get("roles"),
108
+ "status": obj.get("status"),
109
+ "uri": obj.get("uri"),
110
+ "username": obj.get("username"),
111
+ }
112
+ )
88
113
  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
@@ -23,9 +23,9 @@ from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class MssqlDatabaseCollation(BaseModel):
26
+ class DatabaseGetcollation(BaseModel):
27
27
  """
28
- MssqlDatabaseCollation
28
+ DatabaseGetcollation
29
29
  """ # noqa: E501
30
30
 
31
31
  collation_name: Optional[StrictStr] = None
@@ -49,7 +49,7 @@ class MssqlDatabaseCollation(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of MssqlDatabaseCollation from a JSON string"""
52
+ """Create an instance of DatabaseGetcollation from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +73,7 @@ class MssqlDatabaseCollation(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of MssqlDatabaseCollation from a dict"""
76
+ """Create an instance of DatabaseGetcollation from a dict"""
77
77
  if obj is None:
78
78
  return None
79
79
 
@@ -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
@@ -23,9 +23,9 @@ from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class MssqlDatabaseCompatibility(BaseModel):
26
+ class DatabaseGetcompatibility(BaseModel):
27
27
  """
28
- MssqlDatabaseCompatibility
28
+ DatabaseGetcompatibility
29
29
  """ # noqa: E501
30
30
 
31
31
  compatibility_level: Optional[StrictInt] = None
@@ -49,7 +49,7 @@ class MssqlDatabaseCompatibility(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of MssqlDatabaseCompatibility from a JSON string"""
52
+ """Create an instance of DatabaseGetcompatibility from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +73,7 @@ class MssqlDatabaseCompatibility(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of MssqlDatabaseCompatibility from a dict"""
76
+ """Create an instance of DatabaseGetcompatibility from a dict"""
77
77
  if obj is None:
78
78
  return None
79
79
 
@@ -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
@@ -23,15 +23,14 @@ from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class Database(BaseModel):
26
+ class DatabaseRoles(BaseModel):
27
27
  """
28
- Database
28
+ The name and the roles for a database for a user.
29
29
  """ # noqa: E501
30
30
 
31
- id: Optional[StrictStr] = None
32
- name: Optional[StrictStr] = None
33
- options: Optional[Dict[str, Any]] = Field(default=None, description="Database specific options")
34
- __properties: ClassVar[List[str]] = ["id", "name", "options"]
31
+ name: StrictStr = Field(description="The name of the database.")
32
+ roles: List[StrictStr] = Field(description="The name and the roles for a database")
33
+ __properties: ClassVar[List[str]] = ["name", "roles"]
35
34
 
36
35
  model_config = ConfigDict(
37
36
  validate_by_name=True,
@@ -50,7 +49,7 @@ class Database(BaseModel):
50
49
 
51
50
  @classmethod
52
51
  def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of Database from a JSON string"""
52
+ """Create an instance of DatabaseRoles from a JSON string"""
54
53
  return cls.from_dict(json.loads(json_str))
55
54
 
56
55
  def to_dict(self) -> Dict[str, Any]:
@@ -74,12 +73,12 @@ class Database(BaseModel):
74
73
 
75
74
  @classmethod
76
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of Database from a dict"""
76
+ """Create an instance of DatabaseRoles from a dict"""
78
77
  if obj is None:
79
78
  return None
80
79
 
81
80
  if not isinstance(obj, dict):
82
81
  return cls.model_validate(obj)
83
82
 
84
- _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "options": obj.get("options")})
83
+ _obj = cls.model_validate({"name": obj.get("name"), "roles": obj.get("roles")})
85
84
  return _obj
@@ -0,0 +1,45 @@
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
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class DatabaseSort(str, Enum):
24
+ """
25
+ DatabaseSort
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ CREATED_AT_DOT_DESC = "created_at.desc"
32
+ CREATED_AT_DOT_ASC = "created_at.asc"
33
+ DATABASE_ID_DOT_DESC = "database_id.desc"
34
+ DATABASE_ID_DOT_ASC = "database_id.asc"
35
+ DATABASE_NAME_DOT_DESC = "database_name.desc"
36
+ DATABASE_NAME_DOT_ASC = "database_name.asc"
37
+ DATABASE_OWNER_DOT_DESC = "database_owner.desc"
38
+ DATABASE_OWNER_DOT_ASC = "database_owner.asc"
39
+ INDEX_DOT_ASC = "index.asc"
40
+ INDEX_DOT_DESC = "index.desc"
41
+
42
+ @classmethod
43
+ def from_json(cls, json_str: str) -> Self:
44
+ """Create an instance of DatabaseSort from a JSON string"""
45
+ return cls(json.loads(json_str))
@@ -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,23 +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
- from stackit.sqlserverflex.models.type import Type
26
25
 
27
-
28
- class InstanceError(BaseModel):
26
+ class Error(BaseModel):
29
27
  """
30
- InstanceError
28
+ Error
31
29
  """ # noqa: E501
32
30
 
33
- code: Optional[StrictInt] = None
34
- fields: Optional[Dict[str, List[StrictStr]]] = None
35
- message: Optional[StrictStr] = None
36
- type: Optional[Type] = None
37
- __properties: ClassVar[List[str]] = ["code", "fields", "message", "type"]
31
+ code: StrictInt = Field(description="The http error code of the error.")
32
+ message: StrictStr = Field(description="More detailed information about the error.")
33
+ trace_id: StrictStr = Field(description="The trace id of the request.", alias="traceId")
34
+ type: StrictStr = Field(description="Describes in which state the api was when the error happened.")
35
+ __properties: ClassVar[List[str]] = ["code", "message", "traceId", "type"]
38
36
 
39
37
  model_config = ConfigDict(
40
38
  validate_by_name=True,
@@ -53,7 +51,7 @@ class InstanceError(BaseModel):
53
51
 
54
52
  @classmethod
55
53
  def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of InstanceError from a JSON string"""
54
+ """Create an instance of Error from a JSON string"""
57
55
  return cls.from_dict(json.loads(json_str))
58
56
 
59
57
  def to_dict(self) -> Dict[str, Any]:
@@ -77,7 +75,7 @@ class InstanceError(BaseModel):
77
75
 
78
76
  @classmethod
79
77
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of InstanceError from a dict"""
78
+ """Create an instance of Error from a dict"""
81
79
  if obj is None:
82
80
  return None
83
81
 
@@ -87,8 +85,8 @@ class InstanceError(BaseModel):
87
85
  _obj = cls.model_validate(
88
86
  {
89
87
  "code": obj.get("code"),
90
- "fields": obj.get("fields"),
91
88
  "message": obj.get("message"),
89
+ "traceId": obj.get("traceId"),
92
90
  "type": obj.get("type"),
93
91
  }
94
92
  )
@@ -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,25 @@ 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, StrictStr
22
22
  from pydantic_core import to_jsonable_python
23
- from typing_extensions import Self
23
+ from typing_extensions import Annotated, Self
24
24
 
25
- from stackit.sqlserverflex.models.instance_list_user import InstanceListUser
25
+ from stackit.sqlserverflex.models.s3file_info import S3fileInfo
26
26
 
27
27
 
28
- class ListUsersResponse(BaseModel):
28
+ class ExternalS3(BaseModel):
29
29
  """
30
- ListUsersResponse
30
+ The external S3 information
31
31
  """ # noqa: E501
32
32
 
33
- count: Optional[StrictInt] = None
34
- items: Optional[List[InstanceListUser]] = None
35
- __properties: ClassVar[List[str]] = ["count", "items"]
33
+ s3_access_key: StrictStr = Field(description="The s3 access key id")
34
+ s3_access_secret: StrictStr = Field(description="The s3 access secret")
35
+ s3_bucket: StrictStr = Field(description="The s3 bucket address")
36
+ s3_files: Annotated[List[S3fileInfo], Field(min_length=1)] = Field(
37
+ description="The backup files from which the database should be restored"
38
+ )
39
+ __properties: ClassVar[List[str]] = ["s3_access_key", "s3_access_secret", "s3_bucket", "s3_files"]
36
40
 
37
41
  model_config = ConfigDict(
38
42
  validate_by_name=True,
@@ -51,7 +55,7 @@ class ListUsersResponse(BaseModel):
51
55
 
52
56
  @classmethod
53
57
  def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of ListUsersResponse from a JSON string"""
58
+ """Create an instance of ExternalS3 from a JSON string"""
55
59
  return cls.from_dict(json.loads(json_str))
56
60
 
57
61
  def to_dict(self) -> Dict[str, Any]:
@@ -71,18 +75,18 @@ class ListUsersResponse(BaseModel):
71
75
  exclude=excluded_fields,
72
76
  exclude_none=True,
73
77
  )
74
- # override the default output from pydantic by calling `to_dict()` of each item in items (list)
78
+ # override the default output from pydantic by calling `to_dict()` of each item in s3_files (list)
75
79
  _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
80
+ if self.s3_files:
81
+ for _item_s3_files in self.s3_files:
82
+ if _item_s3_files:
83
+ _items.append(_item_s3_files.to_dict())
84
+ _dict["s3_files"] = _items
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 ListUsersResponse from a dict"""
89
+ """Create an instance of ExternalS3 from a dict"""
86
90
  if obj is None:
87
91
  return None
88
92
 
@@ -91,10 +95,12 @@ class ListUsersResponse(BaseModel):
91
95
 
92
96
  _obj = cls.model_validate(
93
97
  {
94
- "count": obj.get("count"),
95
- "items": (
96
- [InstanceListUser.from_dict(_item) for _item in obj["items"]]
97
- if obj.get("items") is not None
98
+ "s3_access_key": obj.get("s3_access_key"),
99
+ "s3_access_secret": obj.get("s3_access_secret"),
100
+ "s3_bucket": obj.get("s3_bucket"),
101
+ "s3_files": (
102
+ [S3fileInfo.from_dict(_item) for _item in obj["s3_files"]]
103
+ if obj.get("s3_files") is not None
98
104
  else None
99
105
  ),
100
106
  }