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
|
@@ -0,0 +1,107 @@
|
|
|
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, field_validator
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
from stackit.sqlserverflex.models.external_s3 import ExternalS3
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class SourceExternalS3(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Restore from an external S3 backup file.
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
database_owner: StrictStr = Field(description="The owner of the database.")
|
|
34
|
+
logging_guid: Optional[StrictStr] = Field(
|
|
35
|
+
default=None, description="Logging guid to have a complete activity log over all sub stored procedures."
|
|
36
|
+
)
|
|
37
|
+
s3_details: ExternalS3
|
|
38
|
+
type: StrictStr
|
|
39
|
+
__properties: ClassVar[List[str]] = ["database_owner", "logging_guid", "s3_details", "type"]
|
|
40
|
+
|
|
41
|
+
@field_validator("type")
|
|
42
|
+
def type_validate_enum(cls, value):
|
|
43
|
+
"""Validates the enum"""
|
|
44
|
+
if value not in set(["EXTERNAL_S3"]):
|
|
45
|
+
raise ValueError("must be one of enum values ('EXTERNAL_S3')")
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
validate_by_name=True,
|
|
50
|
+
validate_by_alias=True,
|
|
51
|
+
validate_assignment=True,
|
|
52
|
+
protected_namespaces=(),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def to_str(self) -> str:
|
|
56
|
+
"""Returns the string representation of the model using alias"""
|
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
58
|
+
|
|
59
|
+
def to_json(self) -> str:
|
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
|
61
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
+
"""Create an instance of SourceExternalS3 from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
|
70
|
+
|
|
71
|
+
This has the following differences from calling pydantic's
|
|
72
|
+
`self.model_dump(by_alias=True)`:
|
|
73
|
+
|
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
|
75
|
+
were set at model initialization. Other fields with value `None`
|
|
76
|
+
are ignored.
|
|
77
|
+
"""
|
|
78
|
+
excluded_fields: Set[str] = set([])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of s3_details
|
|
86
|
+
if self.s3_details:
|
|
87
|
+
_dict["s3_details"] = self.s3_details.to_dict()
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of SourceExternalS3 from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate(
|
|
100
|
+
{
|
|
101
|
+
"database_owner": obj.get("database_owner"),
|
|
102
|
+
"logging_guid": obj.get("logging_guid"),
|
|
103
|
+
"s3_details": ExternalS3.from_dict(obj["s3_details"]) if obj.get("s3_details") is not None else None,
|
|
104
|
+
"type": obj.get("type"),
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
return _obj
|
|
@@ -0,0 +1,41 @@
|
|
|
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 State(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
State
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
READY = "READY"
|
|
32
|
+
PENDING = "PENDING"
|
|
33
|
+
PROGRESSING = "PROGRESSING"
|
|
34
|
+
FAILURE = "FAILURE"
|
|
35
|
+
UNKNOWN = "UNKNOWN"
|
|
36
|
+
TERMINATING = "TERMINATING"
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_json(cls, json_str: str) -> Self:
|
|
40
|
+
"""Create an instance of State from a JSON string"""
|
|
41
|
+
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
|
|
|
@@ -25,11 +25,13 @@ from typing_extensions import Self
|
|
|
25
25
|
|
|
26
26
|
class Storage(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
The object containing information about the storage size and class.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
var_class: Optional[StrictStr] = Field(
|
|
32
|
-
|
|
31
|
+
var_class: Optional[StrictStr] = Field(
|
|
32
|
+
default=None, description="The storage class for the storage.", alias="class"
|
|
33
|
+
)
|
|
34
|
+
size: Optional[StrictInt] = Field(default=None, description="The storage size in Gigabytes.")
|
|
33
35
|
__properties: ClassVar[List[str]] = ["class", "size"]
|
|
34
36
|
|
|
35
37
|
model_config = ConfigDict(
|
|
@@ -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, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class StorageCreate(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The object containing information about the storage size and class.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
var_class: StrictStr = Field(description="The storage class for the storage.", alias="class")
|
|
32
|
+
size: StrictInt = Field(description="The storage size in Gigabytes.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["class", "size"]
|
|
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 StorageCreate 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 StorageCreate 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({"class": obj.get("class"), "size": obj.get("size")})
|
|
84
|
+
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,
|
|
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 StorageUpdate(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
The object containing information about the storage size and class.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
31
|
+
size: Optional[StrictInt] = Field(default=None, description="The storage size in Gigabytes.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["size"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
35
35
|
validate_by_name=True,
|
|
@@ -48,7 +48,7 @@ class ACL(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 StorageUpdate 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 ACL(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 StorageUpdate 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({"size": obj.get("size")})
|
|
83
83
|
return _obj
|
stackit/sqlserverflex/models/{trigger_database_restore_payload.py → trigger_restore_payload.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,14 +23,15 @@ from pydantic_core import to_jsonable_python
|
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class TriggerRestorePayload(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
TriggerRestorePayload
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
name: StrictStr = Field(description="
|
|
31
|
+
name: StrictStr = Field(description="The name of the database.")
|
|
32
32
|
restore_date_time: StrictStr = Field(
|
|
33
|
-
description="
|
|
33
|
+
description="the time for the restore it will be calculated between first backup and last backup",
|
|
34
|
+
alias="restoreDateTime",
|
|
34
35
|
)
|
|
35
36
|
__properties: ClassVar[List[str]] = ["name", "restoreDateTime"]
|
|
36
37
|
|
|
@@ -51,7 +52,7 @@ class TriggerDatabaseRestorePayload(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 TriggerRestorePayload 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 TriggerDatabaseRestorePayload(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 TriggerRestorePayload from a dict"""
|
|
79
80
|
if obj is None:
|
|
80
81
|
return None
|
|
81
82
|
|
|
@@ -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,12 +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, 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 import InstanceVersion
|
|
26
|
+
from stackit.sqlserverflex.models.storage_update import StorageUpdate
|
|
27
|
+
from stackit.sqlserverflex.models.update_instance_payload_network import (
|
|
28
|
+
UpdateInstancePayloadNetwork,
|
|
27
29
|
)
|
|
28
30
|
|
|
29
31
|
|
|
@@ -32,18 +34,33 @@ class UpdateInstancePayload(BaseModel):
|
|
|
32
34
|
UpdateInstancePayload
|
|
33
35
|
""" # noqa: E501
|
|
34
36
|
|
|
35
|
-
acl: InstanceDocumentationACL = Field(
|
|
36
|
-
description="ACL is the Access Control List defining the IP ranges allowed to connect to the database"
|
|
37
|
-
)
|
|
38
37
|
backup_schedule: StrictStr = Field(
|
|
39
|
-
description="
|
|
38
|
+
description="The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.",
|
|
40
39
|
alias="backupSchedule",
|
|
41
40
|
)
|
|
42
|
-
flavor_id: StrictStr = Field(description="
|
|
43
|
-
labels: Dict[str,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
flavor_id: StrictStr = Field(description="The id of the instance flavor.", alias="flavorId")
|
|
42
|
+
labels: Optional[Dict[str, Optional[Annotated[str, Field(strict=True, max_length=63)]]]] = Field(
|
|
43
|
+
default=None,
|
|
44
|
+
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])*$` ",
|
|
45
|
+
)
|
|
46
|
+
name: StrictStr = Field(description="The name of the instance.")
|
|
47
|
+
network: UpdateInstancePayloadNetwork
|
|
48
|
+
retention_days: StrictInt = Field(
|
|
49
|
+
description="The days for how long the backup files should be stored before cleaned up. 30 to 90",
|
|
50
|
+
alias="retentionDays",
|
|
51
|
+
)
|
|
52
|
+
storage: StorageUpdate
|
|
53
|
+
version: InstanceVersion
|
|
54
|
+
__properties: ClassVar[List[str]] = [
|
|
55
|
+
"backupSchedule",
|
|
56
|
+
"flavorId",
|
|
57
|
+
"labels",
|
|
58
|
+
"name",
|
|
59
|
+
"network",
|
|
60
|
+
"retentionDays",
|
|
61
|
+
"storage",
|
|
62
|
+
"version",
|
|
63
|
+
]
|
|
47
64
|
|
|
48
65
|
model_config = ConfigDict(
|
|
49
66
|
validate_by_name=True,
|
|
@@ -82,9 +99,12 @@ class UpdateInstancePayload(BaseModel):
|
|
|
82
99
|
exclude=excluded_fields,
|
|
83
100
|
exclude_none=True,
|
|
84
101
|
)
|
|
85
|
-
# override the default output from pydantic by calling `to_dict()` of
|
|
86
|
-
if self.
|
|
87
|
-
_dict["
|
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of network
|
|
103
|
+
if self.network:
|
|
104
|
+
_dict["network"] = self.network.to_dict()
|
|
105
|
+
# override the default output from pydantic by calling `to_dict()` of storage
|
|
106
|
+
if self.storage:
|
|
107
|
+
_dict["storage"] = self.storage.to_dict()
|
|
88
108
|
return _dict
|
|
89
109
|
|
|
90
110
|
@classmethod
|
|
@@ -98,12 +118,16 @@ class UpdateInstancePayload(BaseModel):
|
|
|
98
118
|
|
|
99
119
|
_obj = cls.model_validate(
|
|
100
120
|
{
|
|
101
|
-
"acl": InstanceDocumentationACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None,
|
|
102
121
|
"backupSchedule": obj.get("backupSchedule"),
|
|
103
122
|
"flavorId": obj.get("flavorId"),
|
|
104
123
|
"labels": obj.get("labels"),
|
|
105
124
|
"name": obj.get("name"),
|
|
106
|
-
"
|
|
125
|
+
"network": (
|
|
126
|
+
UpdateInstancePayloadNetwork.from_dict(obj["network"]) if obj.get("network") is not None 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"),
|
|
107
131
|
}
|
|
108
132
|
)
|
|
109
133
|
return _obj
|
stackit/sqlserverflex/models/{instance_documentation_acl.py → update_instance_payload_network.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,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 UpdateInstancePayloadNetwork(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: List[StrictStr] = Field(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 UpdateInstancePayloadNetwork 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 UpdateInstancePayloadNetwork 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
|
stackit/sqlserverflex/models/{instance_list_instance.py → update_instance_protection_payload.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,20 +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,
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
22
22
|
from pydantic_core import to_jsonable_python
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class UpdateInstanceProtectionPayload(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
UpdateInstanceProtectionPayload
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
status: Optional[StrictStr] = None
|
|
34
|
-
__properties: ClassVar[List[str]] = ["id", "name", "status"]
|
|
31
|
+
is_deletable: StrictBool = Field(description="Protect instance from deletion.", alias="isDeletable")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["isDeletable"]
|
|
35
33
|
|
|
36
34
|
model_config = ConfigDict(
|
|
37
35
|
validate_by_name=True,
|
|
@@ -50,7 +48,7 @@ class InstanceListInstance(BaseModel):
|
|
|
50
48
|
|
|
51
49
|
@classmethod
|
|
52
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of UpdateInstanceProtectionPayload from a JSON string"""
|
|
54
52
|
return cls.from_dict(json.loads(json_str))
|
|
55
53
|
|
|
56
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -74,12 +72,12 @@ class InstanceListInstance(BaseModel):
|
|
|
74
72
|
|
|
75
73
|
@classmethod
|
|
76
74
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
-
"""Create an instance of
|
|
75
|
+
"""Create an instance of UpdateInstanceProtectionPayload from a dict"""
|
|
78
76
|
if obj is None:
|
|
79
77
|
return None
|
|
80
78
|
|
|
81
79
|
if not isinstance(obj, dict):
|
|
82
80
|
return cls.model_validate(obj)
|
|
83
81
|
|
|
84
|
-
_obj = cls.model_validate({"
|
|
82
|
+
_obj = cls.model_validate({"isDeletable": obj.get("isDeletable")})
|
|
85
83
|
return _obj
|
|
@@ -0,0 +1,83 @@
|
|
|
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, StrictBool
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class UpdateInstanceProtectionResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UpdateInstanceProtectionResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
is_deletable: StrictBool = Field(description="Protect instance from deletion.", alias="isDeletable")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["isDeletable"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of UpdateInstanceProtectionResponse from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of UpdateInstanceProtectionResponse from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({"isDeletable": obj.get("isDeletable")})
|
|
83
|
+
return _obj
|