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
|
|
@@ -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 ListRolesResponse(BaseModel):
|
|
|
28
28
|
ListRolesResponse
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
roles:
|
|
31
|
+
roles: List[StrictStr] = Field(description="List of roles available for an instance.")
|
|
32
32
|
__properties: ClassVar[List[str]] = ["roles"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -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,14 @@ 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, Field
|
|
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.flavor_storage_classes_storage_class import (
|
|
26
|
+
FlavorStorageClassesStorageClass,
|
|
27
|
+
)
|
|
28
|
+
from stackit.sqlserverflex.models.flavor_storage_range import FlavorStorageRange
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
class ListStoragesResponse(BaseModel):
|
|
@@ -30,8 +33,10 @@ class ListStoragesResponse(BaseModel):
|
|
|
30
33
|
ListStoragesResponse
|
|
31
34
|
""" # noqa: E501
|
|
32
35
|
|
|
33
|
-
storage_classes:
|
|
34
|
-
|
|
36
|
+
storage_classes: List[FlavorStorageClassesStorageClass] = Field(
|
|
37
|
+
description="maximum storage which can be ordered for the flavor in Gigabyte.", alias="storageClasses"
|
|
38
|
+
)
|
|
39
|
+
storage_range: FlavorStorageRange = Field(alias="storageRange")
|
|
35
40
|
__properties: ClassVar[List[str]] = ["storageClasses", "storageRange"]
|
|
36
41
|
|
|
37
42
|
model_config = ConfigDict(
|
|
@@ -71,6 +76,13 @@ class ListStoragesResponse(BaseModel):
|
|
|
71
76
|
exclude=excluded_fields,
|
|
72
77
|
exclude_none=True,
|
|
73
78
|
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of each item in storage_classes (list)
|
|
80
|
+
_items = []
|
|
81
|
+
if self.storage_classes:
|
|
82
|
+
for _item_storage_classes in self.storage_classes:
|
|
83
|
+
if _item_storage_classes:
|
|
84
|
+
_items.append(_item_storage_classes.to_dict())
|
|
85
|
+
_dict["storageClasses"] = _items
|
|
74
86
|
# override the default output from pydantic by calling `to_dict()` of storage_range
|
|
75
87
|
if self.storage_range:
|
|
76
88
|
_dict["storageRange"] = self.storage_range.to_dict()
|
|
@@ -87,9 +99,13 @@ class ListStoragesResponse(BaseModel):
|
|
|
87
99
|
|
|
88
100
|
_obj = cls.model_validate(
|
|
89
101
|
{
|
|
90
|
-
"storageClasses":
|
|
102
|
+
"storageClasses": (
|
|
103
|
+
[FlavorStorageClassesStorageClass.from_dict(_item) for _item in obj["storageClasses"]]
|
|
104
|
+
if obj.get("storageClasses") is not None
|
|
105
|
+
else None
|
|
106
|
+
),
|
|
91
107
|
"storageRange": (
|
|
92
|
-
|
|
108
|
+
FlavorStorageRange.from_dict(obj["storageRange"]) if obj.get("storageRange") is not None else None
|
|
93
109
|
),
|
|
94
110
|
}
|
|
95
111
|
)
|
|
@@ -0,0 +1,85 @@
|
|
|
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 ListUser(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ListUser
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
id: StrictInt = Field(description="The ID of the user.")
|
|
32
|
+
status: StrictStr = Field(description="The current status of the user.")
|
|
33
|
+
username: StrictStr = Field(description="The name of the user.")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "status", "username"]
|
|
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 ListUser 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 ListUser 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({"id": obj.get("id"), "status": obj.get("status"), "username": obj.get("username")})
|
|
85
|
+
return _obj
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
from stackit.sqlserverflex.models.list_user import ListUser
|
|
26
|
+
from stackit.sqlserverflex.models.pagination import Pagination
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ListUserResponse(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
ListUserResponse
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
|
|
34
|
+
pagination: Pagination
|
|
35
|
+
users: List[ListUser] = Field(description="List of all users inside an instance")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["pagination", "users"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ListUserResponse from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of pagination
|
|
76
|
+
if self.pagination:
|
|
77
|
+
_dict["pagination"] = self.pagination.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.users:
|
|
81
|
+
for _item_users in self.users:
|
|
82
|
+
if _item_users:
|
|
83
|
+
_items.append(_item_users.to_dict())
|
|
84
|
+
_dict["users"] = _items
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of ListUserResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate(
|
|
97
|
+
{
|
|
98
|
+
"pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
|
|
99
|
+
"users": (
|
|
100
|
+
[ListUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None
|
|
101
|
+
),
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
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,17 +18,19 @@ 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.version import Version
|
|
26
|
+
|
|
25
27
|
|
|
26
28
|
class ListVersionsResponse(BaseModel):
|
|
27
29
|
"""
|
|
28
30
|
ListVersionsResponse
|
|
29
31
|
""" # noqa: E501
|
|
30
32
|
|
|
31
|
-
versions:
|
|
33
|
+
versions: List[Version] = Field(description="A list containing available sqlserver versions.")
|
|
32
34
|
__properties: ClassVar[List[str]] = ["versions"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
@@ -68,6 +70,13 @@ class ListVersionsResponse(BaseModel):
|
|
|
68
70
|
exclude=excluded_fields,
|
|
69
71
|
exclude_none=True,
|
|
70
72
|
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in versions (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.versions:
|
|
76
|
+
for _item_versions in self.versions:
|
|
77
|
+
if _item_versions:
|
|
78
|
+
_items.append(_item_versions.to_dict())
|
|
79
|
+
_dict["versions"] = _items
|
|
71
80
|
return _dict
|
|
72
81
|
|
|
73
82
|
@classmethod
|
|
@@ -79,5 +88,11 @@ class ListVersionsResponse(BaseModel):
|
|
|
79
88
|
if not isinstance(obj, dict):
|
|
80
89
|
return cls.model_validate(obj)
|
|
81
90
|
|
|
82
|
-
_obj = cls.model_validate(
|
|
91
|
+
_obj = cls.model_validate(
|
|
92
|
+
{
|
|
93
|
+
"versions": (
|
|
94
|
+
[Version.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
)
|
|
83
98
|
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
|
|
@@ -23,16 +23,17 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class Pagination(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
Pagination
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
page: StrictInt
|
|
32
|
+
size: StrictInt
|
|
33
|
+
sort: StrictStr
|
|
34
|
+
total_pages: StrictInt = Field(alias="totalPages")
|
|
35
|
+
total_rows: StrictInt = Field(alias="totalRows")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["page", "size", "sort", "totalPages", "totalRows"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
39
|
validate_by_name=True,
|
|
@@ -51,7 +52,7 @@ class InstanceDocumentationStorage(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 Pagination 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]:
|
|
@@ -75,7 +76,7 @@ class InstanceDocumentationStorage(BaseModel):
|
|
|
75
76
|
|
|
76
77
|
@classmethod
|
|
77
78
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of
|
|
79
|
+
"""Create an instance of Pagination from a dict"""
|
|
79
80
|
if obj is None:
|
|
80
81
|
return None
|
|
81
82
|
|
|
@@ -84,8 +85,11 @@ class InstanceDocumentationStorage(BaseModel):
|
|
|
84
85
|
|
|
85
86
|
_obj = cls.model_validate(
|
|
86
87
|
{
|
|
87
|
-
"
|
|
88
|
+
"page": obj.get("page"),
|
|
88
89
|
"size": obj.get("size"),
|
|
90
|
+
"sort": obj.get("sort"),
|
|
91
|
+
"totalPages": obj.get("totalPages"),
|
|
92
|
+
"totalRows": obj.get("totalRows"),
|
|
89
93
|
}
|
|
90
94
|
)
|
|
91
95
|
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,15 @@ 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, Field, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, 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.
|
|
26
|
-
|
|
25
|
+
from stackit.sqlserverflex.models.instance_version_opt import InstanceVersionOpt
|
|
26
|
+
from stackit.sqlserverflex.models.partial_update_instance_payload_network import (
|
|
27
|
+
PartialUpdateInstancePayloadNetwork,
|
|
27
28
|
)
|
|
29
|
+
from stackit.sqlserverflex.models.storage_update import StorageUpdate
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
class PartialUpdateInstancePayload(BaseModel):
|
|
@@ -32,20 +34,31 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
32
34
|
PartialUpdateInstancePayload
|
|
33
35
|
""" # noqa: E501
|
|
34
36
|
|
|
35
|
-
acl: Optional[InstanceDocumentationACL] = Field(
|
|
36
|
-
default=None,
|
|
37
|
-
description="ACL is the Access Control List defining the IP ranges allowed to connect to the database",
|
|
38
|
-
)
|
|
39
37
|
backup_schedule: Optional[StrictStr] = Field(
|
|
40
38
|
default=None,
|
|
41
|
-
description="
|
|
39
|
+
description="The schedule on which time the daily backup is being executed. The schedule is written as a cron schedule.",
|
|
42
40
|
alias="backupSchedule",
|
|
43
41
|
)
|
|
44
|
-
flavor_id: Optional[StrictStr] = Field(default=None, description="
|
|
45
|
-
labels: Optional[Dict[str,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
flavor_id: Optional[StrictStr] = Field(default=None, description="The id of the instance flavor.", alias="flavorId")
|
|
43
|
+
labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field(
|
|
44
|
+
default=None,
|
|
45
|
+
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])*$` ",
|
|
46
|
+
)
|
|
47
|
+
name: Optional[StrictStr] = Field(default=None, description="The name of the instance.")
|
|
48
|
+
network: Optional[PartialUpdateInstancePayloadNetwork] = None
|
|
49
|
+
retention_days: Optional[StrictInt] = Field(default=None, alias="retentionDays")
|
|
50
|
+
storage: Optional[StorageUpdate] = None
|
|
51
|
+
version: Optional[InstanceVersionOpt] = None
|
|
52
|
+
__properties: ClassVar[List[str]] = [
|
|
53
|
+
"backupSchedule",
|
|
54
|
+
"flavorId",
|
|
55
|
+
"labels",
|
|
56
|
+
"name",
|
|
57
|
+
"network",
|
|
58
|
+
"retentionDays",
|
|
59
|
+
"storage",
|
|
60
|
+
"version",
|
|
61
|
+
]
|
|
49
62
|
|
|
50
63
|
model_config = ConfigDict(
|
|
51
64
|
validate_by_name=True,
|
|
@@ -84,9 +97,12 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
84
97
|
exclude=excluded_fields,
|
|
85
98
|
exclude_none=True,
|
|
86
99
|
)
|
|
87
|
-
# override the default output from pydantic by calling `to_dict()` of
|
|
88
|
-
if self.
|
|
89
|
-
_dict["
|
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of network
|
|
101
|
+
if self.network:
|
|
102
|
+
_dict["network"] = self.network.to_dict()
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of storage
|
|
104
|
+
if self.storage:
|
|
105
|
+
_dict["storage"] = self.storage.to_dict()
|
|
90
106
|
return _dict
|
|
91
107
|
|
|
92
108
|
@classmethod
|
|
@@ -100,12 +116,18 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
100
116
|
|
|
101
117
|
_obj = cls.model_validate(
|
|
102
118
|
{
|
|
103
|
-
"acl": InstanceDocumentationACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None,
|
|
104
119
|
"backupSchedule": obj.get("backupSchedule"),
|
|
105
120
|
"flavorId": obj.get("flavorId"),
|
|
106
121
|
"labels": obj.get("labels"),
|
|
107
122
|
"name": obj.get("name"),
|
|
108
|
-
"
|
|
123
|
+
"network": (
|
|
124
|
+
PartialUpdateInstancePayloadNetwork.from_dict(obj["network"])
|
|
125
|
+
if obj.get("network") is not None
|
|
126
|
+
else None
|
|
127
|
+
),
|
|
128
|
+
"retentionDays": obj.get("retentionDays"),
|
|
129
|
+
"storage": StorageUpdate.from_dict(obj["storage"]) if obj.get("storage") is not None else None,
|
|
130
|
+
"version": obj.get("version"),
|
|
109
131
|
}
|
|
110
132
|
)
|
|
111
133
|
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
|
|
@@ -23,13 +23,13 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class PartialUpdateInstancePayloadNetwork(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
the network configuration of the instance.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
31
|
+
acl: Optional[List[StrictStr]] = Field(default=None, description="List of IPV4 cidr.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["acl"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
35
35
|
validate_by_name=True,
|
|
@@ -48,7 +48,7 @@ class InstanceDocumentationACL(BaseModel):
|
|
|
48
48
|
|
|
49
49
|
@classmethod
|
|
50
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of PartialUpdateInstancePayloadNetwork from a JSON string"""
|
|
52
52
|
return cls.from_dict(json.loads(json_str))
|
|
53
53
|
|
|
54
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -72,12 +72,12 @@ class InstanceDocumentationACL(BaseModel):
|
|
|
72
72
|
|
|
73
73
|
@classmethod
|
|
74
74
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
-
"""Create an instance of
|
|
75
|
+
"""Create an instance of PartialUpdateInstancePayloadNetwork from a dict"""
|
|
76
76
|
if obj is None:
|
|
77
77
|
return None
|
|
78
78
|
|
|
79
79
|
if not isinstance(obj, dict):
|
|
80
80
|
return cls.model_validate(obj)
|
|
81
81
|
|
|
82
|
-
_obj = cls.model_validate({"
|
|
82
|
+
_obj = cls.model_validate({"acl": obj.get("acl")})
|
|
83
83
|
return _obj
|