stackit-sqlserverflex 1.3.0__py3-none-any.whl → 1.5.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 +128 -88
- stackit/sqlserverflex/api/default_api.py +1977 -1535
- stackit/sqlserverflex/api_client.py +1 -1
- stackit/sqlserverflex/configuration.py +1 -1
- stackit/sqlserverflex/exceptions.py +1 -1
- stackit/sqlserverflex/models/__init__.py +69 -47
- stackit/sqlserverflex/models/{restore_running_restore.py → backup_running_restore.py} +11 -11
- stackit/sqlserverflex/models/backup_sort.py +47 -0
- stackit/sqlserverflex/models/create_database_payload.py +13 -17
- stackit/sqlserverflex/models/create_database_response.py +3 -3
- stackit/sqlserverflex/models/create_instance_payload.py +39 -39
- stackit/sqlserverflex/models/{instance_documentation_options.py → create_instance_payload_network.py} +17 -13
- stackit/sqlserverflex/models/create_instance_response.py +3 -3
- stackit/sqlserverflex/models/create_user_payload.py +9 -5
- stackit/sqlserverflex/models/create_user_response.py +35 -10
- stackit/sqlserverflex/models/{mssql_database_collation.py → database_getcollation.py} +5 -5
- stackit/sqlserverflex/models/{mssql_database_compatibility.py → database_getcompatibility.py} +5 -5
- stackit/sqlserverflex/models/database_roles.py +84 -0
- stackit/sqlserverflex/models/database_sort.py +45 -0
- stackit/sqlserverflex/models/{instance_error.py → error.py} +12 -14
- stackit/sqlserverflex/models/{list_users_response.py → external_s3.py} +27 -21
- stackit/sqlserverflex/models/flavor_sort.py +53 -0
- stackit/sqlserverflex/models/{instance_flavor_entry.py → flavor_storage_classes_storage_class.py} +13 -17
- stackit/sqlserverflex/models/{storage_range.py → flavor_storage_range.py} +8 -8
- stackit/sqlserverflex/models/get_backup_response.py +12 -18
- stackit/sqlserverflex/models/get_database_response.py +20 -10
- stackit/sqlserverflex/models/get_instance_response.py +85 -10
- stackit/sqlserverflex/models/get_user_response.py +19 -10
- stackit/sqlserverflex/models/instance_edition.py +38 -0
- stackit/sqlserverflex/models/{database_documentation_create_database_request_options.py → instance_encryption.py} +14 -14
- stackit/sqlserverflex/models/{single_database.py → instance_network.py} +21 -16
- stackit/sqlserverflex/models/instance_network_access_scope.py +37 -0
- stackit/sqlserverflex/models/instance_sort.py +45 -0
- stackit/sqlserverflex/models/{type.py → instance_version.py} +5 -10
- stackit/sqlserverflex/models/instance_version_opt.py +36 -0
- stackit/sqlserverflex/models/{backup.py → list_backup.py} +17 -19
- stackit/sqlserverflex/models/{backup_list_backups_response_grouped.py → list_backup_response.py} +18 -12
- stackit/sqlserverflex/models/list_backups_response.py +17 -17
- stackit/sqlserverflex/models/list_collations_response.py +5 -5
- stackit/sqlserverflex/models/list_compatibility_response.py +6 -6
- stackit/sqlserverflex/models/{list_restore_jobs_response.py → list_current_running_restore_jobs.py} +10 -8
- stackit/sqlserverflex/models/{flavor.py → list_database.py} +12 -17
- stackit/sqlserverflex/models/list_databases_response.py +13 -7
- stackit/sqlserverflex/models/{instance.py → list_flavors.py} +45 -45
- stackit/sqlserverflex/models/list_flavors_response.py +13 -7
- stackit/sqlserverflex/models/{user_response_user.py → list_instance.py} +22 -18
- stackit/sqlserverflex/models/list_instances_response.py +20 -16
- stackit/sqlserverflex/models/list_roles_response.py +3 -3
- stackit/sqlserverflex/models/list_storages_response.py +23 -7
- stackit/sqlserverflex/models/list_user.py +85 -0
- stackit/sqlserverflex/models/list_user_response.py +104 -0
- stackit/sqlserverflex/models/list_versions_response.py +19 -4
- stackit/sqlserverflex/models/{instance_documentation_storage.py → pagination.py} +15 -11
- stackit/sqlserverflex/models/partial_update_instance_payload.py +42 -20
- stackit/sqlserverflex/models/{database.py → partial_update_instance_payload_network.py} +8 -10
- stackit/sqlserverflex/models/replicas.py +37 -0
- stackit/sqlserverflex/models/reset_user_response.py +15 -10
- stackit/sqlserverflex/models/{host.py → restore_database_from_backup_payload.py} +18 -20
- 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 +6 -4
- stackit/sqlserverflex/models/storage_create.py +84 -0
- stackit/sqlserverflex/models/{acl.py → storage_update.py} +9 -9
- stackit/sqlserverflex/models/{trigger_database_restore_payload.py → trigger_restore_payload.py} +8 -7
- stackit/sqlserverflex/models/update_instance_payload.py +43 -19
- stackit/sqlserverflex/models/{instance_documentation_acl.py → update_instance_payload_network.py} +8 -8
- stackit/sqlserverflex/models/{instance_list_instance.py → update_instance_protection_payload.py} +9 -11
- 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} +24 -22
- stackit/sqlserverflex/models/{instance_list_user.py → validation_error_validation_inner.py} +10 -10
- stackit/sqlserverflex/models/{database_options.py → version.py} +23 -15
- stackit/sqlserverflex/rest.py +1 -1
- {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/METADATA +4 -4
- stackit_sqlserverflex-1.5.0.dist-info/RECORD +84 -0
- {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/WHEEL +1 -1
- stackit/sqlserverflex/models/data_point.py +0 -90
- stackit/sqlserverflex/models/list_metrics_response.py +0 -94
- stackit/sqlserverflex/models/single_user.py +0 -110
- stackit/sqlserverflex/models/update_instance_response.py +0 -88
- stackit/sqlserverflex/models/user.py +0 -101
- stackit_sqlserverflex-1.3.0.dist-info/RECORD +0 -70
- {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/licenses/LICENSE.md +0 -0
- {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.5.0.dist-info}/licenses/NOTICE.txt +0 -0
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -18,11 +18,12 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
from stackit.sqlserverflex.models.
|
|
25
|
+
from stackit.sqlserverflex.models.list_flavors import ListFlavors
|
|
26
|
+
from stackit.sqlserverflex.models.pagination import Pagination
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
class ListFlavorsResponse(BaseModel):
|
|
@@ -30,8 +31,9 @@ class ListFlavorsResponse(BaseModel):
|
|
|
30
31
|
ListFlavorsResponse
|
|
31
32
|
""" # noqa: E501
|
|
32
33
|
|
|
33
|
-
flavors:
|
|
34
|
-
|
|
34
|
+
flavors: List[ListFlavors] = Field(description="List of flavors available for the project.")
|
|
35
|
+
pagination: Pagination
|
|
36
|
+
__properties: ClassVar[List[str]] = ["flavors", "pagination"]
|
|
35
37
|
|
|
36
38
|
model_config = ConfigDict(
|
|
37
39
|
validate_by_name=True,
|
|
@@ -77,6 +79,9 @@ class ListFlavorsResponse(BaseModel):
|
|
|
77
79
|
if _item_flavors:
|
|
78
80
|
_items.append(_item_flavors.to_dict())
|
|
79
81
|
_dict["flavors"] = _items
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of pagination
|
|
83
|
+
if self.pagination:
|
|
84
|
+
_dict["pagination"] = self.pagination.to_dict()
|
|
80
85
|
return _dict
|
|
81
86
|
|
|
82
87
|
@classmethod
|
|
@@ -91,10 +96,11 @@ class ListFlavorsResponse(BaseModel):
|
|
|
91
96
|
_obj = cls.model_validate(
|
|
92
97
|
{
|
|
93
98
|
"flavors": (
|
|
94
|
-
[
|
|
99
|
+
[ListFlavors.from_dict(_item) for _item in obj["flavors"]]
|
|
95
100
|
if obj.get("flavors") is not None
|
|
96
101
|
else None
|
|
97
|
-
)
|
|
102
|
+
),
|
|
103
|
+
"pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
|
|
98
104
|
}
|
|
99
105
|
)
|
|
100
106
|
return _obj
|
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -18,23 +18,29 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import
|
|
21
|
+
from pydantic import (
|
|
22
|
+
BaseModel,
|
|
23
|
+
ConfigDict,
|
|
24
|
+
Field,
|
|
25
|
+
StrictBool,
|
|
26
|
+
StrictStr,
|
|
27
|
+
)
|
|
22
28
|
from pydantic_core import to_jsonable_python
|
|
23
29
|
from typing_extensions import Self
|
|
24
30
|
|
|
31
|
+
from stackit.sqlserverflex.models.state import State
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
|
|
34
|
+
class ListInstance(BaseModel):
|
|
27
35
|
"""
|
|
28
|
-
|
|
36
|
+
ListInstance
|
|
29
37
|
""" # noqa: E501
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
username: Optional[StrictStr] = None
|
|
37
|
-
__properties: ClassVar[List[str]] = ["default_database", "host", "id", "port", "roles", "username"]
|
|
39
|
+
id: StrictStr = Field(description="The ID of the instance.")
|
|
40
|
+
is_deletable: StrictBool = Field(description="Whether the instance can be deleted or not.", alias="isDeletable")
|
|
41
|
+
name: StrictStr = Field(description="The name of the instance.")
|
|
42
|
+
state: State
|
|
43
|
+
__properties: ClassVar[List[str]] = ["id", "isDeletable", "name", "state"]
|
|
38
44
|
|
|
39
45
|
model_config = ConfigDict(
|
|
40
46
|
validate_by_name=True,
|
|
@@ -53,7 +59,7 @@ class UserResponseUser(BaseModel):
|
|
|
53
59
|
|
|
54
60
|
@classmethod
|
|
55
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of
|
|
62
|
+
"""Create an instance of ListInstance from a JSON string"""
|
|
57
63
|
return cls.from_dict(json.loads(json_str))
|
|
58
64
|
|
|
59
65
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,7 +83,7 @@ class UserResponseUser(BaseModel):
|
|
|
77
83
|
|
|
78
84
|
@classmethod
|
|
79
85
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of
|
|
86
|
+
"""Create an instance of ListInstance from a dict"""
|
|
81
87
|
if obj is None:
|
|
82
88
|
return None
|
|
83
89
|
|
|
@@ -86,12 +92,10 @@ class UserResponseUser(BaseModel):
|
|
|
86
92
|
|
|
87
93
|
_obj = cls.model_validate(
|
|
88
94
|
{
|
|
89
|
-
"default_database": obj.get("default_database"),
|
|
90
|
-
"host": obj.get("host"),
|
|
91
95
|
"id": obj.get("id"),
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
96
|
+
"isDeletable": obj.get("isDeletable"),
|
|
97
|
+
"name": obj.get("name"),
|
|
98
|
+
"state": obj.get("state"),
|
|
95
99
|
}
|
|
96
100
|
)
|
|
97
101
|
return _obj
|
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -18,11 +18,12 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict,
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
from stackit.sqlserverflex.models.
|
|
25
|
+
from stackit.sqlserverflex.models.list_instance import ListInstance
|
|
26
|
+
from stackit.sqlserverflex.models.pagination import Pagination
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
class ListInstancesResponse(BaseModel):
|
|
@@ -30,9 +31,9 @@ class ListInstancesResponse(BaseModel):
|
|
|
30
31
|
ListInstancesResponse
|
|
31
32
|
""" # noqa: E501
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
__properties: ClassVar[List[str]] = ["
|
|
34
|
+
instances: List[ListInstance] = Field(description="List of owned instances and their current status.")
|
|
35
|
+
pagination: Pagination
|
|
36
|
+
__properties: ClassVar[List[str]] = ["instances", "pagination"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
39
|
validate_by_name=True,
|
|
@@ -71,13 +72,16 @@ class ListInstancesResponse(BaseModel):
|
|
|
71
72
|
exclude=excluded_fields,
|
|
72
73
|
exclude_none=True,
|
|
73
74
|
)
|
|
74
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in instances (list)
|
|
75
76
|
_items = []
|
|
76
|
-
if self.
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
80
|
-
_dict["
|
|
77
|
+
if self.instances:
|
|
78
|
+
for _item_instances in self.instances:
|
|
79
|
+
if _item_instances:
|
|
80
|
+
_items.append(_item_instances.to_dict())
|
|
81
|
+
_dict["instances"] = _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
|
|
@@ -91,12 +95,12 @@ class ListInstancesResponse(BaseModel):
|
|
|
91
95
|
|
|
92
96
|
_obj = cls.model_validate(
|
|
93
97
|
{
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if obj.get("items") is not None
|
|
98
|
+
"instances": (
|
|
99
|
+
[ListInstance.from_dict(_item) for _item in obj["instances"]]
|
|
100
|
+
if obj.get("instances") is not None
|
|
98
101
|
else None
|
|
99
102
|
),
|
|
103
|
+
"pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None,
|
|
100
104
|
}
|
|
101
105
|
)
|
|
102
106
|
return _obj
|
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -18,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(
|
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -18,11 +18,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
|
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -18,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
|
|
@@ -5,7 +5,7 @@ STACKIT MSSQL Service API
|
|
|
5
5
|
|
|
6
6
|
This is the documentation for the STACKIT MSSQL service
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
9
|
Contact: support@stackit.cloud
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -23,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
|