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.
- stackit/sqlserverflex/__init__.py +133 -94
- stackit/sqlserverflex/api/default_api.py +1982 -1540
- stackit/sqlserverflex/api_client.py +6 -7
- stackit/sqlserverflex/api_response.py +0 -1
- stackit/sqlserverflex/configuration.py +6 -7
- stackit/sqlserverflex/exceptions.py +6 -6
- stackit/sqlserverflex/models/__init__.py +74 -52
- stackit/sqlserverflex/models/{restore_running_restore.py → backup_running_restore.py} +16 -16
- stackit/sqlserverflex/models/backup_sort.py +47 -0
- stackit/sqlserverflex/models/create_database_payload.py +18 -22
- stackit/sqlserverflex/models/create_database_response.py +8 -8
- stackit/sqlserverflex/models/create_instance_payload.py +44 -44
- stackit/sqlserverflex/models/{instance_documentation_options.py → create_instance_payload_network.py} +22 -18
- stackit/sqlserverflex/models/create_instance_response.py +8 -8
- stackit/sqlserverflex/models/create_user_payload.py +14 -10
- stackit/sqlserverflex/models/create_user_response.py +40 -15
- stackit/sqlserverflex/models/{mssql_database_collation.py → database_getcollation.py} +10 -10
- stackit/sqlserverflex/models/{mssql_database_compatibility.py → database_getcompatibility.py} +10 -10
- stackit/sqlserverflex/models/{database.py → database_roles.py} +14 -15
- stackit/sqlserverflex/models/database_sort.py +45 -0
- stackit/sqlserverflex/models/{instance_error.py → error.py} +17 -19
- stackit/sqlserverflex/models/{list_users_response.py → external_s3.py} +32 -26
- stackit/sqlserverflex/models/flavor_sort.py +53 -0
- stackit/sqlserverflex/models/flavor_storage_classes_storage_class.py +91 -0
- stackit/sqlserverflex/models/{storage_range.py → flavor_storage_range.py} +13 -13
- stackit/sqlserverflex/models/get_backup_response.py +17 -23
- stackit/sqlserverflex/models/get_database_response.py +25 -15
- stackit/sqlserverflex/models/get_instance_response.py +90 -15
- stackit/sqlserverflex/models/get_user_response.py +24 -15
- stackit/sqlserverflex/models/instance_edition.py +38 -0
- stackit/sqlserverflex/models/{database_documentation_create_database_request_options.py → instance_encryption.py} +19 -19
- stackit/sqlserverflex/models/{single_database.py → instance_network.py} +26 -21
- stackit/sqlserverflex/models/instance_network_access_scope.py +37 -0
- stackit/sqlserverflex/models/instance_sort.py +45 -0
- stackit/sqlserverflex/models/instance_version.py +36 -0
- stackit/sqlserverflex/models/instance_version_opt.py +36 -0
- stackit/sqlserverflex/models/{backup.py → list_backup.py} +22 -24
- stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py → list_backup_response.py} +23 -17
- stackit/sqlserverflex/models/list_backups_response.py +22 -22
- stackit/sqlserverflex/models/list_collations_response.py +10 -10
- stackit/sqlserverflex/models/list_compatibility_response.py +11 -11
- stackit/sqlserverflex/models/{list_restore_jobs_response.py → list_current_running_restore_jobs.py} +15 -13
- stackit/sqlserverflex/models/{flavor.py → list_database.py} +17 -22
- stackit/sqlserverflex/models/list_databases_response.py +18 -12
- stackit/sqlserverflex/models/list_flavors.py +129 -0
- stackit/sqlserverflex/models/list_flavors_response.py +18 -12
- stackit/sqlserverflex/models/{instance_flavor_entry.py → list_instance.py} +27 -21
- stackit/sqlserverflex/models/list_instances_response.py +25 -21
- stackit/sqlserverflex/models/list_roles_response.py +8 -8
- stackit/sqlserverflex/models/list_storages_response.py +28 -12
- stackit/sqlserverflex/models/list_user.py +85 -0
- stackit/sqlserverflex/models/list_user_response.py +104 -0
- stackit/sqlserverflex/models/list_versions_response.py +24 -9
- stackit/sqlserverflex/models/{instance_documentation_storage.py → pagination.py} +20 -16
- stackit/sqlserverflex/models/partial_update_instance_payload.py +47 -25
- stackit/sqlserverflex/models/{instance_documentation_acl.py → partial_update_instance_payload_network.py} +13 -13
- stackit/sqlserverflex/models/replicas.py +37 -0
- stackit/sqlserverflex/models/reset_user_response.py +20 -15
- stackit/sqlserverflex/models/{host.py → restore_database_from_backup_payload.py} +23 -25
- stackit/sqlserverflex/models/restore_database_from_backup_payload_source.py +150 -0
- stackit/sqlserverflex/models/s3file_info.py +84 -0
- stackit/sqlserverflex/models/source_backup.py +90 -0
- stackit/sqlserverflex/models/source_external_s3.py +107 -0
- stackit/sqlserverflex/models/state.py +41 -0
- stackit/sqlserverflex/models/storage.py +11 -9
- stackit/sqlserverflex/models/{instance_list_instance.py → storage_create.py} +15 -16
- stackit/sqlserverflex/models/{instance_list_user.py → storage_update.py} +14 -15
- stackit/sqlserverflex/models/{trigger_database_restore_payload.py → trigger_restore_payload.py} +13 -12
- stackit/sqlserverflex/models/update_instance_payload.py +48 -24
- stackit/sqlserverflex/models/{acl.py → update_instance_payload_network.py} +14 -14
- stackit/sqlserverflex/models/update_instance_protection_payload.py +83 -0
- stackit/sqlserverflex/models/update_instance_protection_response.py +83 -0
- stackit/sqlserverflex/models/user_sort.py +43 -0
- stackit/sqlserverflex/models/{host_metric.py → validation_error.py} +29 -27
- stackit/sqlserverflex/models/validation_error_validation_inner.py +84 -0
- stackit/sqlserverflex/models/{database_options.py → version.py} +28 -20
- stackit/sqlserverflex/rest.py +6 -7
- {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/METADATA +3 -4
- stackit_sqlserverflex-1.4.0.dist-info/RECORD +84 -0
- {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/WHEEL +1 -1
- stackit/sqlserverflex/models/data_point.py +0 -90
- stackit/sqlserverflex/models/instance.py +0 -129
- stackit/sqlserverflex/models/list_metrics_response.py +0 -94
- stackit/sqlserverflex/models/single_user.py +0 -110
- stackit/sqlserverflex/models/type.py +0 -41
- stackit/sqlserverflex/models/update_instance_response.py +0 -88
- stackit/sqlserverflex/models/user.py +0 -101
- stackit/sqlserverflex/models/user_response_user.py +0 -97
- stackit_sqlserverflex-1.2.0.dist-info/RECORD +0 -70
- {stackit_sqlserverflex-1.2.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/licenses/LICENSE.md +0 -0
- {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
|
-
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -23,17 +23,16 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class InstanceEncryption(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
this defines which key to use for storage encryption
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
__properties: ClassVar[List[str]] = ["collation", "compatibilityLevel", "owner"]
|
|
31
|
+
kek_key_id: StrictStr = Field(description="The key identifier", alias="kekKeyId")
|
|
32
|
+
kek_key_ring_id: StrictStr = Field(description="The keyring identifier", alias="kekKeyRingId")
|
|
33
|
+
kek_key_version: StrictStr = Field(description="The key version", alias="kekKeyVersion")
|
|
34
|
+
service_account: StrictStr = Field(alias="serviceAccount")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["kekKeyId", "kekKeyRingId", "kekKeyVersion", "serviceAccount"]
|
|
37
36
|
|
|
38
37
|
model_config = ConfigDict(
|
|
39
38
|
validate_by_name=True,
|
|
@@ -52,7 +51,7 @@ class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
|
|
|
52
51
|
|
|
53
52
|
@classmethod
|
|
54
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of
|
|
54
|
+
"""Create an instance of InstanceEncryption from a JSON string"""
|
|
56
55
|
return cls.from_dict(json.loads(json_str))
|
|
57
56
|
|
|
58
57
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -76,7 +75,7 @@ class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
|
|
|
76
75
|
|
|
77
76
|
@classmethod
|
|
78
77
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of
|
|
78
|
+
"""Create an instance of InstanceEncryption from a dict"""
|
|
80
79
|
if obj is None:
|
|
81
80
|
return None
|
|
82
81
|
|
|
@@ -85,9 +84,10 @@ class DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
|
|
|
85
84
|
|
|
86
85
|
_obj = cls.model_validate(
|
|
87
86
|
{
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
87
|
+
"kekKeyId": obj.get("kekKeyId"),
|
|
88
|
+
"kekKeyRingId": obj.get("kekKeyRingId"),
|
|
89
|
+
"kekKeyVersion": obj.get("kekKeyVersion"),
|
|
90
|
+
"serviceAccount": obj.get("serviceAccount"),
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
93
|
return _obj
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -22,18 +22,23 @@ 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.
|
|
25
|
+
from stackit.sqlserverflex.models.instance_network_access_scope import (
|
|
26
|
+
InstanceNetworkAccessScope,
|
|
27
|
+
)
|
|
26
28
|
|
|
27
29
|
|
|
28
|
-
class
|
|
30
|
+
class InstanceNetwork(BaseModel):
|
|
29
31
|
"""
|
|
30
|
-
|
|
32
|
+
The access configuration of the instance
|
|
31
33
|
""" # noqa: E501
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
access_scope: Optional[InstanceNetworkAccessScope] = Field(
|
|
36
|
+
default=InstanceNetworkAccessScope.PUBLIC, alias="accessScope"
|
|
37
|
+
)
|
|
38
|
+
acl: Optional[List[StrictStr]] = Field(default=None, description="List of IPV4 cidr.")
|
|
39
|
+
instance_address: Optional[StrictStr] = Field(default=None, alias="instanceAddress")
|
|
40
|
+
router_address: Optional[StrictStr] = Field(default=None, alias="routerAddress")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["accessScope", "acl", "instanceAddress", "routerAddress"]
|
|
37
42
|
|
|
38
43
|
model_config = ConfigDict(
|
|
39
44
|
validate_by_name=True,
|
|
@@ -52,7 +57,7 @@ class SingleDatabase(BaseModel):
|
|
|
52
57
|
|
|
53
58
|
@classmethod
|
|
54
59
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of
|
|
60
|
+
"""Create an instance of InstanceNetwork from a JSON string"""
|
|
56
61
|
return cls.from_dict(json.loads(json_str))
|
|
57
62
|
|
|
58
63
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -72,14 +77,11 @@ class SingleDatabase(BaseModel):
|
|
|
72
77
|
exclude=excluded_fields,
|
|
73
78
|
exclude_none=True,
|
|
74
79
|
)
|
|
75
|
-
# override the default output from pydantic by calling `to_dict()` of options
|
|
76
|
-
if self.options:
|
|
77
|
-
_dict["options"] = self.options.to_dict()
|
|
78
80
|
return _dict
|
|
79
81
|
|
|
80
82
|
@classmethod
|
|
81
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of InstanceNetwork from a dict"""
|
|
83
85
|
if obj is None:
|
|
84
86
|
return None
|
|
85
87
|
|
|
@@ -88,9 +90,12 @@ class SingleDatabase(BaseModel):
|
|
|
88
90
|
|
|
89
91
|
_obj = cls.model_validate(
|
|
90
92
|
{
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
"accessScope": (
|
|
94
|
+
obj.get("accessScope") if obj.get("accessScope") is not None else InstanceNetworkAccessScope.PUBLIC
|
|
95
|
+
),
|
|
96
|
+
"acl": obj.get("acl"),
|
|
97
|
+
"instanceAddress": obj.get("instanceAddress"),
|
|
98
|
+
"routerAddress": obj.get("routerAddress"),
|
|
94
99
|
}
|
|
95
100
|
)
|
|
96
101
|
return _obj
|
|
@@ -0,0 +1,37 @@
|
|
|
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 InstanceNetworkAccessScope(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
PUBLIC = "PUBLIC"
|
|
32
|
+
SNA = "SNA"
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of InstanceNetworkAccessScope from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
@@ -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 InstanceSort(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
InstanceSort
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
INDEX_DOT_DESC = "index.desc"
|
|
32
|
+
INDEX_DOT_ASC = "index.asc"
|
|
33
|
+
ID_DOT_DESC = "id.desc"
|
|
34
|
+
ID_DOT_ASC = "id.asc"
|
|
35
|
+
IS_DELETABLE_DOT_DESC = "is_deletable.desc"
|
|
36
|
+
IS_DELETABLE_DOT_ASC = "is_deletable.asc"
|
|
37
|
+
NAME_DOT_ASC = "name.asc"
|
|
38
|
+
NAME_DOT_DESC = "name.desc"
|
|
39
|
+
STATE_DOT_ASC = "state.asc"
|
|
40
|
+
STATE_DOT_DESC = "state.desc"
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_json(cls, json_str: str) -> Self:
|
|
44
|
+
"""Create an instance of InstanceSort from a JSON string"""
|
|
45
|
+
return cls(json.loads(json_str))
|
|
@@ -0,0 +1,36 @@
|
|
|
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 InstanceVersion(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
The sqlserver version used for the instance.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
ENUM_2022 = "2022"
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
|
35
|
+
"""Create an instance of InstanceVersion from a JSON string"""
|
|
36
|
+
return cls(json.loads(json_str))
|
|
@@ -0,0 +1,36 @@
|
|
|
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 InstanceVersionOpt(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
InstanceVersionOpt
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
ENUM_2022 = "2022"
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
|
35
|
+
"""Create an instance of InstanceVersionOpt from a JSON string"""
|
|
36
|
+
return cls(json.loads(json_str))
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -23,20 +23,20 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class ListBackup(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
ListBackup
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
name:
|
|
36
|
-
|
|
37
|
-
size:
|
|
38
|
-
|
|
39
|
-
__properties: ClassVar[List[str]] = ["
|
|
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
|
|
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
|
|
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
|
-
"
|
|
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
|
-
"
|
|
94
|
+
"retainedUntil": obj.get("retainedUntil"),
|
|
97
95
|
"size": obj.get("size"),
|
|
98
|
-
"
|
|
96
|
+
"type": obj.get("type"),
|
|
99
97
|
}
|
|
100
98
|
)
|
|
101
99
|
return _obj
|
stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py → list_backup_response.py}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -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,
|
|
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.
|
|
25
|
+
from stackit.sqlserverflex.models.list_backups_response import ListBackupsResponse
|
|
26
|
+
from stackit.sqlserverflex.models.pagination import Pagination
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
class
|
|
29
|
+
class ListBackupResponse(BaseModel):
|
|
29
30
|
"""
|
|
30
|
-
|
|
31
|
+
ListBackupResponse
|
|
31
32
|
""" # noqa: E501
|
|
32
33
|
|
|
33
|
-
backups:
|
|
34
|
-
|
|
35
|
-
__properties: ClassVar[List[str]] = ["backups", "
|
|
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
|
|
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
|
|
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
|
-
[
|
|
99
|
+
[ListBackupsResponse.from_dict(_item) for _item in obj["backups"]]
|
|
100
|
+
if obj.get("backups") is not None
|
|
101
|
+
else None
|
|
96
102
|
),
|
|
97
|
-
"
|
|
103
|
+
"pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
|
|
98
104
|
}
|
|
99
105
|
)
|
|
100
106
|
return _obj
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -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.
|
|
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
|
-
|
|
36
|
-
|
|
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
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in backups (list)
|
|
76
75
|
_items = []
|
|
77
|
-
if self.
|
|
78
|
-
for
|
|
79
|
-
if
|
|
80
|
-
_items.append(
|
|
81
|
-
_dict["
|
|
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
|
-
"
|
|
96
|
-
[
|
|
97
|
-
if obj.get("
|
|
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
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
@@ -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.
|
|
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:
|
|
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
|
-
[
|
|
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
|
)
|