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
@@ -0,0 +1,53 @@
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 FlavorSort(str, Enum):
24
+ """
25
+ FlavorSort
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ INDEX_DOT_DESC = "index.desc"
32
+ INDEX_DOT_ASC = "index.asc"
33
+ CPU_DOT_DESC = "cpu.desc"
34
+ CPU_DOT_ASC = "cpu.asc"
35
+ FLAVOR_DESCRIPTION_DOT_ASC = "flavor_description.asc"
36
+ FLAVOR_DESCRIPTION_DOT_DESC = "flavor_description.desc"
37
+ ID_DOT_DESC = "id.desc"
38
+ ID_DOT_ASC = "id.asc"
39
+ SIZE_MAX_DOT_DESC = "size_max.desc"
40
+ SIZE_MAX_DOT_ASC = "size_max.asc"
41
+ RAM_DOT_DESC = "ram.desc"
42
+ RAM_DOT_ASC = "ram.asc"
43
+ SIZE_MIN_DOT_DESC = "size_min.desc"
44
+ SIZE_MIN_DOT_ASC = "size_min.asc"
45
+ STORAGE_CLASS_DOT_ASC = "storage_class.asc"
46
+ STORAGE_CLASS_DOT_DESC = "storage_class.desc"
47
+ NODE_TYPE_DOT_ASC = "node_type.asc"
48
+ NODE_TYPE_DOT_DESC = "node_type.desc"
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Self:
52
+ """Create an instance of FlavorSort from a JSON string"""
53
+ return cls(json.loads(json_str))
@@ -0,0 +1,91 @@
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
+
26
+ class FlavorStorageClassesStorageClass(BaseModel):
27
+ """
28
+ a storageClass defines how efficient the storage can work
29
+ """ # noqa: E501
30
+
31
+ var_class: StrictStr = Field(alias="class")
32
+ max_io_per_sec: StrictInt = Field(alias="maxIoPerSec")
33
+ max_through_in_mb: StrictInt = Field(alias="maxThroughInMb")
34
+ __properties: ClassVar[List[str]] = ["class", "maxIoPerSec", "maxThroughInMb"]
35
+
36
+ model_config = ConfigDict(
37
+ validate_by_name=True,
38
+ validate_by_alias=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of FlavorStorageClassesStorageClass from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of FlavorStorageClassesStorageClass from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate(
85
+ {
86
+ "class": obj.get("class"),
87
+ "maxIoPerSec": obj.get("maxIoPerSec"),
88
+ "maxThroughInMb": obj.get("maxThroughInMb"),
89
+ }
90
+ )
91
+ 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,18 +18,18 @@ 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, StrictInt
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Self
24
24
 
25
25
 
26
- class StorageRange(BaseModel):
26
+ class FlavorStorageRange(BaseModel):
27
27
  """
28
- StorageRange
28
+ range of maximum and minimum storage which can be ordered for the flavor in Gigabyte.
29
29
  """ # noqa: E501
30
30
 
31
- max: Optional[StrictInt] = None
32
- min: Optional[StrictInt] = None
31
+ max: StrictInt = Field(description="maximum storage which can be ordered for the flavor in Gigabyte.")
32
+ min: StrictInt = Field(description="minimum storage which is required to order in Gigabyte.")
33
33
  __properties: ClassVar[List[str]] = ["max", "min"]
34
34
 
35
35
  model_config = ConfigDict(
@@ -49,7 +49,7 @@ class StorageRange(BaseModel):
49
49
 
50
50
  @classmethod
51
51
  def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of StorageRange from a JSON string"""
52
+ """Create an instance of FlavorStorageRange 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 StorageRange(BaseModel):
73
73
 
74
74
  @classmethod
75
75
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of StorageRange from a dict"""
76
+ """Create an instance of FlavorStorageRange 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
@@ -28,19 +28,15 @@ class GetBackupResponse(BaseModel):
28
28
  GetBackupResponse
29
29
  """ # noqa: E501
30
30
 
31
- end_time: Optional[StrictStr] = Field(
32
- default=None, description="Backup end time represents local server time", alias="endTime"
31
+ completion_time: StrictStr = Field(
32
+ description="The time when the backup was completed in RFC3339 format.", alias="completionTime"
33
33
  )
34
- error: Optional[StrictStr] = Field(default=None, description="Backup error")
35
- id: Optional[StrictStr] = Field(default=None, description="Backup id")
36
- labels: Optional[List[StrictStr]] = Field(default=None, description="Backup labels")
37
- name: Optional[StrictStr] = Field(default=None, description="Backup name")
38
- options: Optional[Dict[str, StrictStr]] = Field(default=None, description="Backup specific options")
39
- size: Optional[StrictInt] = Field(default=None, description="Backup size in byte")
40
- start_time: Optional[StrictStr] = Field(
41
- default=None, description="Backup start time represents local server time", alias="startTime"
42
- )
43
- __properties: ClassVar[List[str]] = ["endTime", "error", "id", "labels", "name", "options", "size", "startTime"]
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"]
44
40
 
45
41
  model_config = ConfigDict(
46
42
  validate_by_name=True,
@@ -92,14 +88,12 @@ class GetBackupResponse(BaseModel):
92
88
 
93
89
  _obj = cls.model_validate(
94
90
  {
95
- "endTime": obj.get("endTime"),
96
- "error": obj.get("error"),
91
+ "completionTime": obj.get("completionTime"),
97
92
  "id": obj.get("id"),
98
- "labels": obj.get("labels"),
99
93
  "name": obj.get("name"),
100
- "options": obj.get("options"),
94
+ "retainedUntil": obj.get("retainedUntil"),
101
95
  "size": obj.get("size"),
102
- "startTime": obj.get("startTime"),
96
+ "type": obj.get("type"),
103
97
  }
104
98
  )
105
99
  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,20 +18,27 @@ 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_database import SingleDatabase
26
-
27
25
 
28
26
  class GetDatabaseResponse(BaseModel):
29
27
  """
30
28
  GetDatabaseResponse
31
29
  """ # noqa: E501
32
30
 
33
- database: Optional[SingleDatabase] = None
34
- __properties: ClassVar[List[str]] = ["database"]
31
+ collation_name: StrictStr = Field(
32
+ description="The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. ",
33
+ alias="collationName",
34
+ )
35
+ compatibility_level: StrictInt = Field(
36
+ description="CompatibilityLevel of the Database.", alias="compatibilityLevel"
37
+ )
38
+ id: StrictInt = Field(description="The id of the database.")
39
+ name: StrictStr = Field(description="The name of the database.")
40
+ owner: StrictStr = Field(description="The owner of the database.")
41
+ __properties: ClassVar[List[str]] = ["collationName", "compatibilityLevel", "id", "name", "owner"]
35
42
 
36
43
  model_config = ConfigDict(
37
44
  validate_by_name=True,
@@ -70,9 +77,6 @@ class GetDatabaseResponse(BaseModel):
70
77
  exclude=excluded_fields,
71
78
  exclude_none=True,
72
79
  )
73
- # override the default output from pydantic by calling `to_dict()` of database
74
- if self.database:
75
- _dict["database"] = self.database.to_dict()
76
80
  return _dict
77
81
 
78
82
  @classmethod
@@ -85,6 +89,12 @@ class GetDatabaseResponse(BaseModel):
85
89
  return cls.model_validate(obj)
86
90
 
87
91
  _obj = cls.model_validate(
88
- {"database": SingleDatabase.from_dict(obj["database"]) if obj.get("database") is not None else None}
92
+ {
93
+ "collationName": obj.get("collationName"),
94
+ "compatibilityLevel": obj.get("compatibilityLevel"),
95
+ "id": obj.get("id"),
96
+ "name": obj.get("name"),
97
+ "owner": obj.get("owner"),
98
+ }
89
99
  )
90
100
  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,24 @@ 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 (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictInt,
27
+ StrictStr,
28
+ )
22
29
  from pydantic_core import to_jsonable_python
23
- from typing_extensions import Self
30
+ from typing_extensions import Annotated, Self
24
31
 
25
- from stackit.sqlserverflex.models.instance import Instance
32
+ from stackit.sqlserverflex.models.instance_edition import InstanceEdition
33
+ from stackit.sqlserverflex.models.instance_encryption import InstanceEncryption
34
+ from stackit.sqlserverflex.models.instance_network import InstanceNetwork
35
+ from stackit.sqlserverflex.models.instance_version import InstanceVersion
36
+ from stackit.sqlserverflex.models.replicas import Replicas
37
+ from stackit.sqlserverflex.models.state import State
38
+ from stackit.sqlserverflex.models.storage import Storage
26
39
 
27
40
 
28
41
  class GetInstanceResponse(BaseModel):
@@ -30,8 +43,45 @@ class GetInstanceResponse(BaseModel):
30
43
  GetInstanceResponse
31
44
  """ # noqa: E501
32
45
 
33
- item: Optional[Instance] = None
34
- __properties: ClassVar[List[str]] = ["item"]
46
+ backup_schedule: StrictStr = Field(
47
+ description="The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.",
48
+ alias="backupSchedule",
49
+ )
50
+ edition: InstanceEdition
51
+ encryption: Optional[InstanceEncryption] = None
52
+ flavor_id: StrictStr = Field(description="The id of the instance flavor.", alias="flavorId")
53
+ id: StrictStr = Field(description="The ID of the instance.")
54
+ is_deletable: StrictBool = Field(description="Whether the instance can be deleted or not.", alias="isDeletable")
55
+ labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field(
56
+ default=None,
57
+ description="A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` ",
58
+ )
59
+ name: StrictStr = Field(description="The name of the instance.")
60
+ network: InstanceNetwork
61
+ replicas: Replicas
62
+ retention_days: StrictInt = Field(
63
+ description="The days for how long the backup files should be stored before cleaned up. 30 to 90",
64
+ alias="retentionDays",
65
+ )
66
+ state: State
67
+ storage: Storage
68
+ version: InstanceVersion
69
+ __properties: ClassVar[List[str]] = [
70
+ "backupSchedule",
71
+ "edition",
72
+ "encryption",
73
+ "flavorId",
74
+ "id",
75
+ "isDeletable",
76
+ "labels",
77
+ "name",
78
+ "network",
79
+ "replicas",
80
+ "retentionDays",
81
+ "state",
82
+ "storage",
83
+ "version",
84
+ ]
35
85
 
36
86
  model_config = ConfigDict(
37
87
  validate_by_name=True,
@@ -70,9 +120,15 @@ class GetInstanceResponse(BaseModel):
70
120
  exclude=excluded_fields,
71
121
  exclude_none=True,
72
122
  )
73
- # override the default output from pydantic by calling `to_dict()` of item
74
- if self.item:
75
- _dict["item"] = self.item.to_dict()
123
+ # override the default output from pydantic by calling `to_dict()` of encryption
124
+ if self.encryption:
125
+ _dict["encryption"] = self.encryption.to_dict()
126
+ # override the default output from pydantic by calling `to_dict()` of network
127
+ if self.network:
128
+ _dict["network"] = self.network.to_dict()
129
+ # override the default output from pydantic by calling `to_dict()` of storage
130
+ if self.storage:
131
+ _dict["storage"] = self.storage.to_dict()
76
132
  return _dict
77
133
 
78
134
  @classmethod
@@ -84,5 +140,24 @@ class GetInstanceResponse(BaseModel):
84
140
  if not isinstance(obj, dict):
85
141
  return cls.model_validate(obj)
86
142
 
87
- _obj = cls.model_validate({"item": Instance.from_dict(obj["item"]) if obj.get("item") is not None else None})
143
+ _obj = cls.model_validate(
144
+ {
145
+ "backupSchedule": obj.get("backupSchedule"),
146
+ "edition": obj.get("edition"),
147
+ "encryption": (
148
+ InstanceEncryption.from_dict(obj["encryption"]) if obj.get("encryption") is not None else None
149
+ ),
150
+ "flavorId": obj.get("flavorId"),
151
+ "id": obj.get("id"),
152
+ "isDeletable": obj.get("isDeletable"),
153
+ "labels": obj.get("labels"),
154
+ "name": obj.get("name"),
155
+ "network": InstanceNetwork.from_dict(obj["network"]) if obj.get("network") is not None else None,
156
+ "replicas": obj.get("replicas"),
157
+ "retentionDays": obj.get("retentionDays"),
158
+ "state": obj.get("state"),
159
+ "storage": Storage.from_dict(obj["storage"]) if obj.get("storage") is not None else None,
160
+ "version": obj.get("version"),
161
+ }
162
+ )
88
163
  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,20 +18,24 @@ 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.user_response_user import UserResponseUser
26
-
27
25
 
28
26
  class GetUserResponse(BaseModel):
29
27
  """
30
28
  GetUserResponse
31
29
  """ # noqa: E501
32
30
 
33
- item: Optional[UserResponseUser] = 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
+ port: StrictInt = Field(description="The port of the instance in which the user belongs to.")
35
+ roles: List[StrictStr] = Field(description="A list of user roles.")
36
+ status: StrictStr = Field(description="The current status of the user.")
37
+ username: StrictStr = Field(description="The name of the user.")
38
+ __properties: ClassVar[List[str]] = ["default_database", "host", "id", "port", "roles", "status", "username"]
35
39
 
36
40
  model_config = ConfigDict(
37
41
  validate_by_name=True,
@@ -70,9 +74,6 @@ class GetUserResponse(BaseModel):
70
74
  exclude=excluded_fields,
71
75
  exclude_none=True,
72
76
  )
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
77
  return _dict
77
78
 
78
79
  @classmethod
@@ -85,6 +86,14 @@ class GetUserResponse(BaseModel):
85
86
  return cls.model_validate(obj)
86
87
 
87
88
  _obj = cls.model_validate(
88
- {"item": UserResponseUser.from_dict(obj["item"]) if obj.get("item") is not None else None}
89
+ {
90
+ "default_database": obj.get("default_database"),
91
+ "host": obj.get("host"),
92
+ "id": obj.get("id"),
93
+ "port": obj.get("port"),
94
+ "roles": obj.get("roles"),
95
+ "status": obj.get("status"),
96
+ "username": obj.get("username"),
97
+ }
89
98
  )
90
99
  return _obj
@@ -0,0 +1,38 @@
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 InstanceEdition(str, Enum):
24
+ """
25
+ Edition of the MSSQL server instance
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ STANDARD = "Standard"
32
+ ENTERPRISECORE = "EnterpriseCore"
33
+ DEVELOPER = "developer"
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> Self:
37
+ """Create an instance of InstanceEdition from a JSON string"""
38
+ return cls(json.loads(json_str))