stackit-sqlserverflex 1.1.1__py3-none-any.whl → 1.2.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/api_client.py +36 -25
- stackit/sqlserverflex/exceptions.py +1 -1
- stackit/sqlserverflex/models/__init__.py +0 -1
- stackit/sqlserverflex/models/acl.py +4 -3
- stackit/sqlserverflex/models/backup.py +4 -3
- stackit/sqlserverflex/models/backup_list_backups_response_grouped.py +7 -6
- stackit/sqlserverflex/models/create_database_payload.py +4 -3
- stackit/sqlserverflex/models/create_database_response.py +4 -3
- stackit/sqlserverflex/models/create_instance_payload.py +4 -3
- stackit/sqlserverflex/models/create_instance_response.py +4 -3
- stackit/sqlserverflex/models/create_user_payload.py +4 -3
- stackit/sqlserverflex/models/create_user_response.py +4 -3
- stackit/sqlserverflex/models/data_point.py +4 -3
- stackit/sqlserverflex/models/database.py +4 -3
- stackit/sqlserverflex/models/database_documentation_create_database_request_options.py +4 -3
- stackit/sqlserverflex/models/database_options.py +4 -3
- stackit/sqlserverflex/models/flavor.py +4 -3
- stackit/sqlserverflex/models/get_backup_response.py +4 -3
- stackit/sqlserverflex/models/get_database_response.py +4 -3
- stackit/sqlserverflex/models/get_instance_response.py +4 -3
- stackit/sqlserverflex/models/get_user_response.py +4 -3
- stackit/sqlserverflex/models/host.py +7 -6
- stackit/sqlserverflex/models/host_metric.py +7 -6
- stackit/sqlserverflex/models/instance.py +4 -3
- stackit/sqlserverflex/models/instance_documentation_acl.py +4 -3
- stackit/sqlserverflex/models/instance_documentation_options.py +4 -3
- stackit/sqlserverflex/models/instance_documentation_storage.py +4 -3
- stackit/sqlserverflex/models/instance_error.py +4 -3
- stackit/sqlserverflex/models/instance_flavor_entry.py +4 -3
- stackit/sqlserverflex/models/instance_list_instance.py +4 -3
- stackit/sqlserverflex/models/instance_list_user.py +4 -3
- stackit/sqlserverflex/models/list_backups_response.py +7 -6
- stackit/sqlserverflex/models/list_collations_response.py +7 -6
- stackit/sqlserverflex/models/list_compatibility_response.py +7 -6
- stackit/sqlserverflex/models/list_databases_response.py +7 -6
- stackit/sqlserverflex/models/list_flavors_response.py +7 -6
- stackit/sqlserverflex/models/list_instances_response.py +7 -6
- stackit/sqlserverflex/models/list_metrics_response.py +7 -6
- stackit/sqlserverflex/models/list_restore_jobs_response.py +7 -6
- stackit/sqlserverflex/models/list_roles_response.py +4 -3
- stackit/sqlserverflex/models/list_storages_response.py +4 -3
- stackit/sqlserverflex/models/list_users_response.py +7 -6
- stackit/sqlserverflex/models/list_versions_response.py +4 -3
- stackit/sqlserverflex/models/mssql_database_collation.py +4 -3
- stackit/sqlserverflex/models/mssql_database_compatibility.py +4 -3
- stackit/sqlserverflex/models/partial_update_instance_payload.py +4 -3
- stackit/sqlserverflex/models/reset_user_response.py +4 -3
- stackit/sqlserverflex/models/restore_running_restore.py +4 -3
- stackit/sqlserverflex/models/single_database.py +4 -3
- stackit/sqlserverflex/models/single_user.py +4 -3
- stackit/sqlserverflex/models/storage.py +4 -3
- stackit/sqlserverflex/models/storage_range.py +4 -3
- stackit/sqlserverflex/models/trigger_database_restore_payload.py +4 -3
- stackit/sqlserverflex/models/update_instance_payload.py +4 -3
- stackit/sqlserverflex/models/update_instance_response.py +4 -3
- stackit/sqlserverflex/models/user.py +4 -3
- stackit/sqlserverflex/models/user_response_user.py +4 -3
- stackit/sqlserverflex/rest.py +19 -3
- {stackit_sqlserverflex-1.1.1.dist-info → stackit_sqlserverflex-1.2.0.dist-info}/METADATA +10 -11
- stackit_sqlserverflex-1.2.0.dist-info/RECORD +70 -0
- {stackit_sqlserverflex-1.1.1.dist-info → stackit_sqlserverflex-1.2.0.dist-info}/WHEEL +1 -1
- stackit_sqlserverflex-1.1.1.dist-info/RECORD +0 -70
- {stackit_sqlserverflex-1.1.1.dist-info → stackit_sqlserverflex-1.2.0.dist-info}/licenses/LICENSE.md +0 -0
- {stackit_sqlserverflex-1.1.1.dist-info → stackit_sqlserverflex-1.2.0.dist-info}/licenses/NOTICE.txt +0 -0
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -31,7 +32,8 @@ class ListRolesResponse(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["roles"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -42,8 +44,7 @@ class ListRolesResponse(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.storage_range import StorageRange
|
|
@@ -34,7 +35,8 @@ class ListStoragesResponse(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["storageClasses", "storageRange"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -45,8 +47,7 @@ class ListStoragesResponse(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.instance_list_user import InstanceListUser
|
|
@@ -34,7 +35,8 @@ class ListUsersResponse(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["count", "items"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -45,8 +47,7 @@ class ListUsersResponse(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -73,9 +74,9 @@ class ListUsersResponse(BaseModel):
|
|
|
73
74
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
74
75
|
_items = []
|
|
75
76
|
if self.items:
|
|
76
|
-
for
|
|
77
|
-
if
|
|
78
|
-
_items.append(
|
|
77
|
+
for _item_items in self.items:
|
|
78
|
+
if _item_items:
|
|
79
|
+
_items.append(_item_items.to_dict())
|
|
79
80
|
_dict["items"] = _items
|
|
80
81
|
return _dict
|
|
81
82
|
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -31,7 +32,8 @@ class ListVersionsResponse(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["versions"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -42,8 +44,7 @@ class ListVersionsResponse(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -32,7 +33,8 @@ class MssqlDatabaseCollation(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["collation_name", "description"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class MssqlDatabaseCollation(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -32,7 +33,8 @@ class MssqlDatabaseCompatibility(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["compatibility_level", "description"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class MssqlDatabaseCompatibility(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.instance_documentation_acl import (
|
|
@@ -47,7 +48,8 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
47
48
|
__properties: ClassVar[List[str]] = ["acl", "backupSchedule", "flavorId", "labels", "name", "version"]
|
|
48
49
|
|
|
49
50
|
model_config = ConfigDict(
|
|
50
|
-
|
|
51
|
+
validate_by_name=True,
|
|
52
|
+
validate_by_alias=True,
|
|
51
53
|
validate_assignment=True,
|
|
52
54
|
protected_namespaces=(),
|
|
53
55
|
)
|
|
@@ -58,8 +60,7 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
58
60
|
|
|
59
61
|
def to_json(self) -> str:
|
|
60
62
|
"""Returns the JSON representation of the model using alias"""
|
|
61
|
-
|
|
62
|
-
return json.dumps(self.to_dict())
|
|
63
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
63
64
|
|
|
64
65
|
@classmethod
|
|
65
66
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.single_user import SingleUser
|
|
@@ -33,7 +34,8 @@ class ResetUserResponse(BaseModel):
|
|
|
33
34
|
__properties: ClassVar[List[str]] = ["item"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -44,8 +46,7 @@ class ResetUserResponse(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -41,7 +42,8 @@ class RestoreRunningRestore(BaseModel):
|
|
|
41
42
|
]
|
|
42
43
|
|
|
43
44
|
model_config = ConfigDict(
|
|
44
|
-
|
|
45
|
+
validate_by_name=True,
|
|
46
|
+
validate_by_alias=True,
|
|
45
47
|
validate_assignment=True,
|
|
46
48
|
protected_namespaces=(),
|
|
47
49
|
)
|
|
@@ -52,8 +54,7 @@ class RestoreRunningRestore(BaseModel):
|
|
|
52
54
|
|
|
53
55
|
def to_json(self) -> str:
|
|
54
56
|
"""Returns the JSON representation of the model using alias"""
|
|
55
|
-
|
|
56
|
-
return json.dumps(self.to_dict())
|
|
57
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
57
58
|
|
|
58
59
|
@classmethod
|
|
59
60
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.database_options import DatabaseOptions
|
|
@@ -35,7 +36,8 @@ class SingleDatabase(BaseModel):
|
|
|
35
36
|
__properties: ClassVar[List[str]] = ["id", "name", "options"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
|
-
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
39
41
|
validate_assignment=True,
|
|
40
42
|
protected_namespaces=(),
|
|
41
43
|
)
|
|
@@ -46,8 +48,7 @@ class SingleDatabase(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -47,7 +48,8 @@ class SingleUser(BaseModel):
|
|
|
47
48
|
]
|
|
48
49
|
|
|
49
50
|
model_config = ConfigDict(
|
|
50
|
-
|
|
51
|
+
validate_by_name=True,
|
|
52
|
+
validate_by_alias=True,
|
|
51
53
|
validate_assignment=True,
|
|
52
54
|
protected_namespaces=(),
|
|
53
55
|
)
|
|
@@ -58,8 +60,7 @@ class SingleUser(BaseModel):
|
|
|
58
60
|
|
|
59
61
|
def to_json(self) -> str:
|
|
60
62
|
"""Returns the JSON representation of the model using alias"""
|
|
61
|
-
|
|
62
|
-
return json.dumps(self.to_dict())
|
|
63
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
63
64
|
|
|
64
65
|
@classmethod
|
|
65
66
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -32,7 +33,8 @@ class Storage(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["class", "size"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class Storage(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -32,7 +33,8 @@ class StorageRange(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["max", "min"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -43,8 +45,7 @@ class StorageRange(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -34,7 +35,8 @@ class TriggerDatabaseRestorePayload(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["name", "restoreDateTime"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -45,8 +47,7 @@ class TriggerDatabaseRestorePayload(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.instance_documentation_acl import (
|
|
@@ -45,7 +46,8 @@ class UpdateInstancePayload(BaseModel):
|
|
|
45
46
|
__properties: ClassVar[List[str]] = ["acl", "backupSchedule", "flavorId", "labels", "name", "version"]
|
|
46
47
|
|
|
47
48
|
model_config = ConfigDict(
|
|
48
|
-
|
|
49
|
+
validate_by_name=True,
|
|
50
|
+
validate_by_alias=True,
|
|
49
51
|
validate_assignment=True,
|
|
50
52
|
protected_namespaces=(),
|
|
51
53
|
)
|
|
@@ -56,8 +58,7 @@ class UpdateInstancePayload(BaseModel):
|
|
|
56
58
|
|
|
57
59
|
def to_json(self) -> str:
|
|
58
60
|
"""Returns the JSON representation of the model using alias"""
|
|
59
|
-
|
|
60
|
-
return json.dumps(self.to_dict())
|
|
61
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
61
62
|
|
|
62
63
|
@classmethod
|
|
63
64
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
from stackit.sqlserverflex.models.instance import Instance
|
|
@@ -33,7 +34,8 @@ class UpdateInstanceResponse(BaseModel):
|
|
|
33
34
|
__properties: ClassVar[List[str]] = ["item"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -44,8 +46,7 @@ class UpdateInstanceResponse(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -38,7 +39,8 @@ class User(BaseModel):
|
|
|
38
39
|
__properties: ClassVar[List[str]] = ["database", "host", "id", "password", "port", "roles", "uri", "username"]
|
|
39
40
|
|
|
40
41
|
model_config = ConfigDict(
|
|
41
|
-
|
|
42
|
+
validate_by_name=True,
|
|
43
|
+
validate_by_alias=True,
|
|
42
44
|
validate_assignment=True,
|
|
43
45
|
protected_namespaces=(),
|
|
44
46
|
)
|
|
@@ -49,8 +51,7 @@ class User(BaseModel):
|
|
|
49
51
|
|
|
50
52
|
def to_json(self) -> str:
|
|
51
53
|
"""Returns the JSON representation of the model using alias"""
|
|
52
|
-
|
|
53
|
-
return json.dumps(self.to_dict())
|
|
54
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
54
55
|
|
|
55
56
|
@classmethod
|
|
56
57
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -19,6 +19,7 @@ import pprint
|
|
|
19
19
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
22
23
|
from typing_extensions import Self
|
|
23
24
|
|
|
24
25
|
|
|
@@ -36,7 +37,8 @@ class UserResponseUser(BaseModel):
|
|
|
36
37
|
__properties: ClassVar[List[str]] = ["default_database", "host", "id", "port", "roles", "username"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
40
42
|
validate_assignment=True,
|
|
41
43
|
protected_namespaces=(),
|
|
42
44
|
)
|
|
@@ -47,8 +49,7 @@ class UserResponseUser(BaseModel):
|
|
|
47
49
|
|
|
48
50
|
def to_json(self) -> str:
|
|
49
51
|
"""Returns the JSON representation of the model using alias"""
|
|
50
|
-
|
|
51
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
53
|
|
|
53
54
|
@classmethod
|
|
54
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
stackit/sqlserverflex/rest.py
CHANGED
|
@@ -39,12 +39,17 @@ class RESTResponse(io.IOBase):
|
|
|
39
39
|
self.data = self.response.content
|
|
40
40
|
return self.data
|
|
41
41
|
|
|
42
|
+
@property
|
|
43
|
+
def headers(self):
|
|
44
|
+
"""Returns a dictionary of response headers."""
|
|
45
|
+
return self.response.headers
|
|
46
|
+
|
|
42
47
|
def getheaders(self):
|
|
43
|
-
"""Returns a dictionary of the response headers."""
|
|
48
|
+
"""Returns a dictionary of the response headers; use ``headers`` instead."""
|
|
44
49
|
return self.response.headers
|
|
45
50
|
|
|
46
51
|
def getheader(self, name, default=None):
|
|
47
|
-
"""Returns a given response header."""
|
|
52
|
+
"""Returns a given response header; use ``headers.get()`` instead."""
|
|
48
53
|
return self.response.headers.get(name, default)
|
|
49
54
|
|
|
50
55
|
|
|
@@ -94,6 +99,7 @@ class RESTClientObject:
|
|
|
94
99
|
url,
|
|
95
100
|
data=request_body,
|
|
96
101
|
headers=headers,
|
|
102
|
+
timeout=_request_timeout,
|
|
97
103
|
)
|
|
98
104
|
elif content_type == "application/x-www-form-urlencoded":
|
|
99
105
|
r = self.session.request(
|
|
@@ -101,6 +107,7 @@ class RESTClientObject:
|
|
|
101
107
|
url,
|
|
102
108
|
params=post_params,
|
|
103
109
|
headers=headers,
|
|
110
|
+
timeout=_request_timeout,
|
|
104
111
|
)
|
|
105
112
|
elif content_type == "multipart/form-data":
|
|
106
113
|
# must del headers['Content-Type'], or the correct
|
|
@@ -114,6 +121,7 @@ class RESTClientObject:
|
|
|
114
121
|
url,
|
|
115
122
|
files=post_params,
|
|
116
123
|
headers=headers,
|
|
124
|
+
timeout=_request_timeout,
|
|
117
125
|
)
|
|
118
126
|
# Pass a `string` parameter directly in the body to support
|
|
119
127
|
# other content types than JSON when `body` argument is
|
|
@@ -124,10 +132,17 @@ class RESTClientObject:
|
|
|
124
132
|
url,
|
|
125
133
|
data=body,
|
|
126
134
|
headers=headers,
|
|
135
|
+
timeout=_request_timeout,
|
|
127
136
|
)
|
|
128
137
|
elif headers["Content-Type"].startswith("text/") and isinstance(body, bool):
|
|
129
138
|
request_body = "true" if body else "false"
|
|
130
|
-
r = self.session.request(
|
|
139
|
+
r = self.session.request(
|
|
140
|
+
method,
|
|
141
|
+
url,
|
|
142
|
+
data=request_body,
|
|
143
|
+
headers=headers,
|
|
144
|
+
timeout=_request_timeout,
|
|
145
|
+
)
|
|
131
146
|
else:
|
|
132
147
|
# Cannot generate the request from given parameters
|
|
133
148
|
msg = """Cannot prepare a request message for provided
|
|
@@ -141,6 +156,7 @@ class RESTClientObject:
|
|
|
141
156
|
url,
|
|
142
157
|
params={},
|
|
143
158
|
headers=headers,
|
|
159
|
+
timeout=_request_timeout,
|
|
144
160
|
)
|
|
145
161
|
except requests.exceptions.SSLError as e:
|
|
146
162
|
msg = "\n".join([type(e).__name__, str(e)])
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stackit-sqlserverflex
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: STACKIT MSSQL Service API
|
|
5
|
+
Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
|
|
6
|
+
Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
|
|
7
|
+
Author-email: STACKIT Developer Tools <developer-tools@stackit.cloud>
|
|
5
8
|
License-File: LICENSE.md
|
|
6
9
|
License-File: NOTICE.txt
|
|
7
|
-
Author: STACKIT Developer Tools
|
|
8
|
-
Author-email: developer-tools@stackit.cloud
|
|
9
|
-
Requires-Python: >=3.9,<4.0
|
|
10
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -16,12 +16,11 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
-
Requires-
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist:
|
|
23
|
-
|
|
24
|
-
Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
|
|
19
|
+
Requires-Python: <4.0,>=3.9
|
|
20
|
+
Requires-Dist: pydantic>=2.9.2
|
|
21
|
+
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
22
|
+
Requires-Dist: requests>=2.32.3
|
|
23
|
+
Requires-Dist: stackit-core>=0.0.1a
|
|
25
24
|
Description-Content-Type: text/markdown
|
|
26
25
|
|
|
27
26
|
# stackit.sqlserverflex
|
|
@@ -46,4 +45,4 @@ import stackit.sqlserverflex
|
|
|
46
45
|
|
|
47
46
|
## Getting Started
|
|
48
47
|
|
|
49
|
-
[Examples](https://github.com/stackitcloud/stackit-sdk-python/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.
|
|
48
|
+
[Examples](https://github.com/stackitcloud/stackit-sdk-python/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.
|