stackit-sqlserverflex 1.3.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 +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.4.0.dist-info}/METADATA +1 -1
- stackit_sqlserverflex-1.4.0.dist-info/RECORD +84 -0
- 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.4.0.dist-info}/WHEEL +0 -0
- {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.4.0.dist-info}/licenses/LICENSE.md +0 -0
- {stackit_sqlserverflex-1.3.0.dist-info → stackit_sqlserverflex-1.4.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,20 +18,36 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
from stackit.sqlserverflex.models.single_user import SingleUser
|
|
26
|
-
|
|
27
25
|
|
|
28
26
|
class CreateUserResponse(BaseModel):
|
|
29
27
|
"""
|
|
30
28
|
CreateUserResponse
|
|
31
29
|
""" # noqa: E501
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
default_database: StrictStr = Field(description="The default database for a user of the instance.")
|
|
32
|
+
host: StrictStr = Field(description="The host of the instance in which the user belongs to.")
|
|
33
|
+
id: StrictInt = Field(description="The ID of the user.")
|
|
34
|
+
password: StrictStr = Field(description="The password for the user.")
|
|
35
|
+
port: StrictInt = Field(description="The port of the instance in which the user belongs to.")
|
|
36
|
+
roles: List[StrictStr]
|
|
37
|
+
status: StrictStr = Field(description="The current status of the user.")
|
|
38
|
+
uri: StrictStr = Field(description="The connection string for the user to the instance.")
|
|
39
|
+
username: StrictStr = Field(description="The name of the user.")
|
|
40
|
+
__properties: ClassVar[List[str]] = [
|
|
41
|
+
"default_database",
|
|
42
|
+
"host",
|
|
43
|
+
"id",
|
|
44
|
+
"password",
|
|
45
|
+
"port",
|
|
46
|
+
"roles",
|
|
47
|
+
"status",
|
|
48
|
+
"uri",
|
|
49
|
+
"username",
|
|
50
|
+
]
|
|
35
51
|
|
|
36
52
|
model_config = ConfigDict(
|
|
37
53
|
validate_by_name=True,
|
|
@@ -70,9 +86,6 @@ class CreateUserResponse(BaseModel):
|
|
|
70
86
|
exclude=excluded_fields,
|
|
71
87
|
exclude_none=True,
|
|
72
88
|
)
|
|
73
|
-
# override the default output from pydantic by calling `to_dict()` of item
|
|
74
|
-
if self.item:
|
|
75
|
-
_dict["item"] = self.item.to_dict()
|
|
76
89
|
return _dict
|
|
77
90
|
|
|
78
91
|
@classmethod
|
|
@@ -84,5 +97,17 @@ class CreateUserResponse(BaseModel):
|
|
|
84
97
|
if not isinstance(obj, dict):
|
|
85
98
|
return cls.model_validate(obj)
|
|
86
99
|
|
|
87
|
-
_obj = cls.model_validate(
|
|
100
|
+
_obj = cls.model_validate(
|
|
101
|
+
{
|
|
102
|
+
"default_database": obj.get("default_database"),
|
|
103
|
+
"host": obj.get("host"),
|
|
104
|
+
"id": obj.get("id"),
|
|
105
|
+
"password": obj.get("password"),
|
|
106
|
+
"port": obj.get("port"),
|
|
107
|
+
"roles": obj.get("roles"),
|
|
108
|
+
"status": obj.get("status"),
|
|
109
|
+
"uri": obj.get("uri"),
|
|
110
|
+
"username": obj.get("username"),
|
|
111
|
+
}
|
|
112
|
+
)
|
|
88
113
|
return _obj
|
|
@@ -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,9 +23,9 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class DatabaseGetcollation(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
DatabaseGetcollation
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
31
|
collation_name: Optional[StrictStr] = None
|
|
@@ -49,7 +49,7 @@ class MssqlDatabaseCollation(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of DatabaseGetcollation from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +73,7 @@ class MssqlDatabaseCollation(BaseModel):
|
|
|
73
73
|
|
|
74
74
|
@classmethod
|
|
75
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
76
|
+
"""Create an instance of DatabaseGetcollation from a dict"""
|
|
77
77
|
if obj is None:
|
|
78
78
|
return None
|
|
79
79
|
|
stackit/sqlserverflex/models/{mssql_database_compatibility.py → database_getcompatibility.py}
RENAMED
|
@@ -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,9 +23,9 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class DatabaseGetcompatibility(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
DatabaseGetcompatibility
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
31
|
compatibility_level: Optional[StrictInt] = None
|
|
@@ -49,7 +49,7 @@ class MssqlDatabaseCompatibility(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of DatabaseGetcompatibility from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +73,7 @@ class MssqlDatabaseCompatibility(BaseModel):
|
|
|
73
73
|
|
|
74
74
|
@classmethod
|
|
75
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
76
|
+
"""Create an instance of DatabaseGetcompatibility from a dict"""
|
|
77
77
|
if obj is None:
|
|
78
78
|
return None
|
|
79
79
|
|
|
@@ -0,0 +1,84 @@
|
|
|
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, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DatabaseRoles(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The name and the roles for a database for a user.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
name: StrictStr = Field(description="The name of the database.")
|
|
32
|
+
roles: List[StrictStr] = Field(description="The name and the roles for a database")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["name", "roles"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of DatabaseRoles from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of DatabaseRoles from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({"name": obj.get("name"), "roles": obj.get("roles")})
|
|
84
|
+
return _obj
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MSSQL Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MSSQL service
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 3.0.0
|
|
9
|
+
Contact: support@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
|
|
20
|
+
from typing_extensions import Self
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DatabaseSort(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
DatabaseSort
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
CREATED_AT_DOT_DESC = "created_at.desc"
|
|
32
|
+
CREATED_AT_DOT_ASC = "created_at.asc"
|
|
33
|
+
DATABASE_ID_DOT_DESC = "database_id.desc"
|
|
34
|
+
DATABASE_ID_DOT_ASC = "database_id.asc"
|
|
35
|
+
DATABASE_NAME_DOT_DESC = "database_name.desc"
|
|
36
|
+
DATABASE_NAME_DOT_ASC = "database_name.asc"
|
|
37
|
+
DATABASE_OWNER_DOT_DESC = "database_owner.desc"
|
|
38
|
+
DATABASE_OWNER_DOT_ASC = "database_owner.asc"
|
|
39
|
+
INDEX_DOT_ASC = "index.asc"
|
|
40
|
+
INDEX_DOT_DESC = "index.desc"
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_json(cls, json_str: str) -> Self:
|
|
44
|
+
"""Create an instance of DatabaseSort from a JSON string"""
|
|
45
|
+
return cls(json.loads(json_str))
|
|
@@ -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,21 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
from stackit.sqlserverflex.models.type import Type
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
class InstanceError(BaseModel):
|
|
26
|
+
class Error(BaseModel):
|
|
29
27
|
"""
|
|
30
|
-
|
|
28
|
+
Error
|
|
31
29
|
""" # noqa: E501
|
|
32
30
|
|
|
33
|
-
code:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
__properties: ClassVar[List[str]] = ["code", "
|
|
31
|
+
code: StrictInt = Field(description="The http error code of the error.")
|
|
32
|
+
message: StrictStr = Field(description="More detailed information about the error.")
|
|
33
|
+
trace_id: StrictStr = Field(description="The trace id of the request.", alias="traceId")
|
|
34
|
+
type: StrictStr = Field(description="Describes in which state the api was when the error happened.")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["code", "message", "traceId", "type"]
|
|
38
36
|
|
|
39
37
|
model_config = ConfigDict(
|
|
40
38
|
validate_by_name=True,
|
|
@@ -53,7 +51,7 @@ class InstanceError(BaseModel):
|
|
|
53
51
|
|
|
54
52
|
@classmethod
|
|
55
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of
|
|
54
|
+
"""Create an instance of Error from a JSON string"""
|
|
57
55
|
return cls.from_dict(json.loads(json_str))
|
|
58
56
|
|
|
59
57
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,7 +75,7 @@ class InstanceError(BaseModel):
|
|
|
77
75
|
|
|
78
76
|
@classmethod
|
|
79
77
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of
|
|
78
|
+
"""Create an instance of Error from a dict"""
|
|
81
79
|
if obj is None:
|
|
82
80
|
return None
|
|
83
81
|
|
|
@@ -87,8 +85,8 @@ class InstanceError(BaseModel):
|
|
|
87
85
|
_obj = cls.model_validate(
|
|
88
86
|
{
|
|
89
87
|
"code": obj.get("code"),
|
|
90
|
-
"fields": obj.get("fields"),
|
|
91
88
|
"message": obj.get("message"),
|
|
89
|
+
"traceId": obj.get("traceId"),
|
|
92
90
|
"type": obj.get("type"),
|
|
93
91
|
}
|
|
94
92
|
)
|
|
@@ -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,21 +18,25 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict,
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
23
|
+
from typing_extensions import Annotated, Self
|
|
24
24
|
|
|
25
|
-
from stackit.sqlserverflex.models.
|
|
25
|
+
from stackit.sqlserverflex.models.s3file_info import S3fileInfo
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
class
|
|
28
|
+
class ExternalS3(BaseModel):
|
|
29
29
|
"""
|
|
30
|
-
|
|
30
|
+
The external S3 information
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
s3_access_key: StrictStr = Field(description="The s3 access key id")
|
|
34
|
+
s3_access_secret: StrictStr = Field(description="The s3 access secret")
|
|
35
|
+
s3_bucket: StrictStr = Field(description="The s3 bucket address")
|
|
36
|
+
s3_files: Annotated[List[S3fileInfo], Field(min_length=1)] = Field(
|
|
37
|
+
description="The backup files from which the database should be restored"
|
|
38
|
+
)
|
|
39
|
+
__properties: ClassVar[List[str]] = ["s3_access_key", "s3_access_secret", "s3_bucket", "s3_files"]
|
|
36
40
|
|
|
37
41
|
model_config = ConfigDict(
|
|
38
42
|
validate_by_name=True,
|
|
@@ -51,7 +55,7 @@ class ListUsersResponse(BaseModel):
|
|
|
51
55
|
|
|
52
56
|
@classmethod
|
|
53
57
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of
|
|
58
|
+
"""Create an instance of ExternalS3 from a JSON string"""
|
|
55
59
|
return cls.from_dict(json.loads(json_str))
|
|
56
60
|
|
|
57
61
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -71,18 +75,18 @@ class ListUsersResponse(BaseModel):
|
|
|
71
75
|
exclude=excluded_fields,
|
|
72
76
|
exclude_none=True,
|
|
73
77
|
)
|
|
74
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in s3_files (list)
|
|
75
79
|
_items = []
|
|
76
|
-
if self.
|
|
77
|
-
for
|
|
78
|
-
if
|
|
79
|
-
_items.append(
|
|
80
|
-
_dict["
|
|
80
|
+
if self.s3_files:
|
|
81
|
+
for _item_s3_files in self.s3_files:
|
|
82
|
+
if _item_s3_files:
|
|
83
|
+
_items.append(_item_s3_files.to_dict())
|
|
84
|
+
_dict["s3_files"] = _items
|
|
81
85
|
return _dict
|
|
82
86
|
|
|
83
87
|
@classmethod
|
|
84
88
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
-
"""Create an instance of
|
|
89
|
+
"""Create an instance of ExternalS3 from a dict"""
|
|
86
90
|
if obj is None:
|
|
87
91
|
return None
|
|
88
92
|
|
|
@@ -91,10 +95,12 @@ class ListUsersResponse(BaseModel):
|
|
|
91
95
|
|
|
92
96
|
_obj = cls.model_validate(
|
|
93
97
|
{
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
"s3_access_key": obj.get("s3_access_key"),
|
|
99
|
+
"s3_access_secret": obj.get("s3_access_secret"),
|
|
100
|
+
"s3_bucket": obj.get("s3_bucket"),
|
|
101
|
+
"s3_files": (
|
|
102
|
+
[S3fileInfo.from_dict(_item) for _item in obj["s3_files"]]
|
|
103
|
+
if obj.get("s3_files") is not None
|
|
98
104
|
else None
|
|
99
105
|
),
|
|
100
106
|
}
|
|
@@ -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))
|
stackit/sqlserverflex/models/{instance_flavor_entry.py → flavor_storage_classes_storage_class.py}
RENAMED
|
@@ -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,22 +18,20 @@ import json
|
|
|
18
18
|
import pprint
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class FlavorStorageClassesStorageClass(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
a storageClass defines how efficient the storage can work
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
memory: Optional[StrictInt] = None
|
|
36
|
-
__properties: ClassVar[List[str]] = ["categories", "cpu", "description", "id", "memory"]
|
|
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"]
|
|
37
35
|
|
|
38
36
|
model_config = ConfigDict(
|
|
39
37
|
validate_by_name=True,
|
|
@@ -52,7 +50,7 @@ class InstanceFlavorEntry(BaseModel):
|
|
|
52
50
|
|
|
53
51
|
@classmethod
|
|
54
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of FlavorStorageClassesStorageClass from a JSON string"""
|
|
56
54
|
return cls.from_dict(json.loads(json_str))
|
|
57
55
|
|
|
58
56
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -76,7 +74,7 @@ class InstanceFlavorEntry(BaseModel):
|
|
|
76
74
|
|
|
77
75
|
@classmethod
|
|
78
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of
|
|
77
|
+
"""Create an instance of FlavorStorageClassesStorageClass from a dict"""
|
|
80
78
|
if obj is None:
|
|
81
79
|
return None
|
|
82
80
|
|
|
@@ -85,11 +83,9 @@ class InstanceFlavorEntry(BaseModel):
|
|
|
85
83
|
|
|
86
84
|
_obj = cls.model_validate(
|
|
87
85
|
{
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"id": obj.get("id"),
|
|
92
|
-
"memory": obj.get("memory"),
|
|
86
|
+
"class": obj.get("class"),
|
|
87
|
+
"maxIoPerSec": obj.get("maxIoPerSec"),
|
|
88
|
+
"maxThroughInMb": obj.get("maxThroughInMb"),
|
|
93
89
|
}
|
|
94
90
|
)
|
|
95
91
|
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,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
|
|
26
|
+
class FlavorStorageRange(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
range of maximum and minimum storage which can be ordered for the flavor in Gigabyte.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
max:
|
|
32
|
-
min:
|
|
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
|
|
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
|
|
76
|
+
"""Create an instance of FlavorStorageRange from a dict"""
|
|
77
77
|
if obj is None:
|
|
78
78
|
return None
|
|
79
79
|
|