stackit-sqlserverflex 1.0.1__py3-none-any.whl → 1.0.3__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 +201 -68
- stackit/sqlserverflex/api/default_api.py +509 -115
- stackit/sqlserverflex/api_client.py +18 -5
- stackit/sqlserverflex/configuration.py +33 -11
- stackit/sqlserverflex/exceptions.py +20 -1
- stackit/sqlserverflex/models/__init__.py +5 -1
- stackit/sqlserverflex/models/acl.py +2 -2
- stackit/sqlserverflex/models/backup.py +2 -2
- stackit/sqlserverflex/models/backup_list_backups_response_grouped.py +2 -2
- stackit/sqlserverflex/models/create_database_payload.py +2 -2
- stackit/sqlserverflex/models/create_database_response.py +2 -2
- stackit/sqlserverflex/models/create_instance_payload.py +2 -2
- stackit/sqlserverflex/models/create_instance_response.py +2 -2
- stackit/sqlserverflex/models/create_user_payload.py +2 -2
- stackit/sqlserverflex/models/create_user_response.py +2 -2
- stackit/sqlserverflex/models/data_point.py +83 -0
- stackit/sqlserverflex/models/database.py +2 -2
- stackit/sqlserverflex/models/database_documentation_create_database_request_options.py +2 -2
- stackit/sqlserverflex/models/database_options.py +2 -2
- stackit/sqlserverflex/models/flavor.py +2 -2
- stackit/sqlserverflex/models/get_backup_response.py +2 -2
- stackit/sqlserverflex/models/get_database_response.py +2 -2
- stackit/sqlserverflex/models/get_instance_response.py +2 -2
- stackit/sqlserverflex/models/get_user_response.py +2 -2
- stackit/sqlserverflex/models/host.py +101 -0
- stackit/sqlserverflex/models/host_metric.py +103 -0
- stackit/sqlserverflex/models/instance.py +2 -2
- stackit/sqlserverflex/models/instance_documentation_acl.py +2 -2
- stackit/sqlserverflex/models/instance_documentation_options.py +2 -2
- stackit/sqlserverflex/models/instance_documentation_storage.py +2 -2
- stackit/sqlserverflex/models/instance_error.py +2 -2
- stackit/sqlserverflex/models/instance_flavor_entry.py +2 -2
- stackit/sqlserverflex/models/instance_list_instance.py +2 -2
- stackit/sqlserverflex/models/instance_list_user.py +2 -2
- stackit/sqlserverflex/models/list_backups_response.py +2 -2
- stackit/sqlserverflex/models/list_collations_response.py +2 -2
- stackit/sqlserverflex/models/list_compatibility_response.py +2 -2
- stackit/sqlserverflex/models/list_databases_response.py +2 -2
- stackit/sqlserverflex/models/list_flavors_response.py +2 -2
- stackit/sqlserverflex/models/list_instances_response.py +2 -2
- stackit/sqlserverflex/models/list_metrics_response.py +93 -0
- stackit/sqlserverflex/models/list_restore_jobs_response.py +2 -2
- stackit/sqlserverflex/models/list_roles_response.py +2 -2
- stackit/sqlserverflex/models/list_storages_response.py +2 -2
- stackit/sqlserverflex/models/list_users_response.py +2 -2
- stackit/sqlserverflex/models/list_versions_response.py +2 -2
- stackit/sqlserverflex/models/mssql_database_collation.py +2 -2
- stackit/sqlserverflex/models/mssql_database_compatibility.py +2 -2
- stackit/sqlserverflex/models/partial_update_instance_payload.py +2 -2
- stackit/sqlserverflex/models/reset_user_response.py +2 -2
- stackit/sqlserverflex/models/restore_running_restore.py +2 -2
- stackit/sqlserverflex/models/single_database.py +2 -2
- stackit/sqlserverflex/models/single_user.py +2 -2
- stackit/sqlserverflex/models/storage.py +2 -2
- stackit/sqlserverflex/models/storage_range.py +2 -2
- stackit/sqlserverflex/models/trigger_database_restore_payload.py +2 -2
- stackit/sqlserverflex/models/type.py +1 -1
- stackit/sqlserverflex/models/update_instance_payload.py +2 -2
- stackit/sqlserverflex/models/update_instance_response.py +2 -2
- stackit/sqlserverflex/models/user.py +2 -2
- stackit/sqlserverflex/models/user_response_user.py +2 -2
- stackit/sqlserverflex/rest.py +2 -2
- {stackit_sqlserverflex-1.0.1.dist-info → stackit_sqlserverflex-1.0.3.dist-info}/METADATA +1 -1
- stackit_sqlserverflex-1.0.3.dist-info/RECORD +70 -0
- stackit_sqlserverflex-1.0.1.dist-info/RECORD +0 -66
- {stackit_sqlserverflex-1.0.1.dist-info → stackit_sqlserverflex-1.0.3.dist-info}/LICENSE.md +0 -0
- {stackit_sqlserverflex-1.0.1.dist-info → stackit_sqlserverflex-1.0.3.dist-info}/NOTICE.txt +0 -0
- {stackit_sqlserverflex-1.0.1.dist-info → stackit_sqlserverflex-1.0.3.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
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: 2.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 typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.sqlserverflex.models.host_metric import HostMetric
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Host(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Host
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
host_metrics: Optional[List[HostMetric]] = Field(default=None, alias="hostMetrics")
|
|
33
|
+
id: Optional[StrictStr] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["hostMetrics", "id"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=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
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of Host from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in host_metrics (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.host_metrics:
|
|
76
|
+
for _item in self.host_metrics:
|
|
77
|
+
if _item:
|
|
78
|
+
_items.append(_item.to_dict())
|
|
79
|
+
_dict["hostMetrics"] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of Host from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate(
|
|
92
|
+
{
|
|
93
|
+
"hostMetrics": (
|
|
94
|
+
[HostMetric.from_dict(_item) for _item in obj["hostMetrics"]]
|
|
95
|
+
if obj.get("hostMetrics") is not None
|
|
96
|
+
else None
|
|
97
|
+
),
|
|
98
|
+
"id": obj.get("id"),
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
return _obj
|
|
@@ -0,0 +1,103 @@
|
|
|
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: 2.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, StrictStr
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.sqlserverflex.models.data_point import DataPoint
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class HostMetric(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
HostMetric
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
datapoints: Optional[List[DataPoint]] = None
|
|
33
|
+
name: Optional[StrictStr] = None
|
|
34
|
+
units: Optional[StrictStr] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["datapoints", "name", "units"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of HostMetric from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in datapoints (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.datapoints:
|
|
77
|
+
for _item in self.datapoints:
|
|
78
|
+
if _item:
|
|
79
|
+
_items.append(_item.to_dict())
|
|
80
|
+
_dict["datapoints"] = _items
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of HostMetric from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate(
|
|
93
|
+
{
|
|
94
|
+
"datapoints": (
|
|
95
|
+
[DataPoint.from_dict(_item) for _item in obj["datapoints"]]
|
|
96
|
+
if obj.get("datapoints") is not None
|
|
97
|
+
else None
|
|
98
|
+
),
|
|
99
|
+
"name": obj.get("name"),
|
|
100
|
+
"units": obj.get("units"),
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
return _obj
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ from stackit.sqlserverflex.models.storage import Storage
|
|
|
29
29
|
class Instance(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
Instance
|
|
32
|
-
"""
|
|
32
|
+
""" # noqa: E501
|
|
33
33
|
|
|
34
34
|
acl: Optional[ACL] = None
|
|
35
35
|
backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule")
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class InstanceDocumentationACL(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
InstanceDocumentationACL
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
items: Optional[List[StrictStr]] = Field(default=None, description="a simple list with IP addresses with CIDR.")
|
|
31
31
|
__properties: ClassVar[List[str]] = ["items"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class InstanceDocumentationOptions(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
InstanceDocumentationOptions
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
edition: Optional[StrictStr] = Field(default="developer", description="Edition of the MSSQL server instance")
|
|
31
31
|
retention_days: Optional[StrictStr] = Field(
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class InstanceDocumentationStorage(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
InstanceDocumentationStorage
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
var_class: Optional[StrictStr] = Field(
|
|
31
31
|
default="premium-perf12-stackit", description="Class of the instance.", alias="class"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.type import Type
|
|
|
27
27
|
class InstanceError(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
InstanceError
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
code: Optional[StrictInt] = None
|
|
33
33
|
fields: Optional[Dict[str, List[StrictStr]]] = None
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class InstanceFlavorEntry(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
InstanceFlavorEntry
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
categories: Optional[StrictStr] = None
|
|
31
31
|
cpu: Optional[StrictInt] = None
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class InstanceListInstance(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
InstanceListInstance
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
id: Optional[StrictStr] = None
|
|
31
31
|
name: Optional[StrictStr] = None
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class InstanceListUser(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
InstanceListUser
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
id: Optional[StrictStr] = None
|
|
31
31
|
username: Optional[StrictStr] = None
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ from stackit.sqlserverflex.models.backup_list_backups_response_grouped import (
|
|
|
29
29
|
class ListBackupsResponse(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
ListBackupsResponse
|
|
32
|
-
"""
|
|
32
|
+
""" # noqa: E501
|
|
33
33
|
|
|
34
34
|
databases: Optional[List[BackupListBackupsResponseGrouped]] = None
|
|
35
35
|
__properties: ClassVar[List[str]] = ["databases"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.mssql_database_collation import MssqlDatabaseC
|
|
|
27
27
|
class ListCollationsResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListCollationsResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
collations: Optional[List[MssqlDatabaseCollation]] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["collations"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ from stackit.sqlserverflex.models.mssql_database_compatibility import (
|
|
|
29
29
|
class ListCompatibilityResponse(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
ListCompatibilityResponse
|
|
32
|
-
"""
|
|
32
|
+
""" # noqa: E501
|
|
33
33
|
|
|
34
34
|
compatibilities: Optional[List[MssqlDatabaseCompatibility]] = None
|
|
35
35
|
__properties: ClassVar[List[str]] = ["compatibilities"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.database import Database
|
|
|
27
27
|
class ListDatabasesResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListDatabasesResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
databases: Optional[List[Database]] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["databases"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.instance_flavor_entry import InstanceFlavorEnt
|
|
|
27
27
|
class ListFlavorsResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListFlavorsResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
flavors: Optional[List[InstanceFlavorEntry]] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["flavors"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.instance_list_instance import InstanceListInst
|
|
|
27
27
|
class ListInstancesResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListInstancesResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
count: Optional[StrictInt] = None
|
|
33
33
|
items: Optional[List[InstanceListInstance]] = None
|
|
@@ -0,0 +1,93 @@
|
|
|
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: 2.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
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.sqlserverflex.models.host import Host
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListMetricsResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ListMetricsResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
hosts: Optional[List[Host]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["hosts"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=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
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ListMetricsResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in hosts (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.hosts:
|
|
75
|
+
for _item in self.hosts:
|
|
76
|
+
if _item:
|
|
77
|
+
_items.append(_item.to_dict())
|
|
78
|
+
_dict["hosts"] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListMetricsResponse from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate(
|
|
91
|
+
{"hosts": [Host.from_dict(_item) for _item in obj["hosts"]] if obj.get("hosts") is not None else None}
|
|
92
|
+
)
|
|
93
|
+
return _obj
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.restore_running_restore import RestoreRunningR
|
|
|
27
27
|
class ListRestoreJobsResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListRestoreJobsResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
running_restores: Optional[List[RestoreRunningRestore]] = Field(default=None, alias="runningRestores")
|
|
33
33
|
__properties: ClassVar[List[str]] = ["runningRestores"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class ListRolesResponse(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
ListRolesResponse
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
roles: Optional[List[StrictStr]] = None
|
|
31
31
|
__properties: ClassVar[List[str]] = ["roles"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.storage_range import StorageRange
|
|
|
27
27
|
class ListStoragesResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListStoragesResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
storage_classes: Optional[List[StrictStr]] = Field(default=None, alias="storageClasses")
|
|
33
33
|
storage_range: Optional[StorageRange] = Field(default=None, alias="storageRange")
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.instance_list_user import InstanceListUser
|
|
|
27
27
|
class ListUsersResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
ListUsersResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
count: Optional[StrictInt] = None
|
|
33
33
|
items: Optional[List[InstanceListUser]] = None
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class ListVersionsResponse(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
ListVersionsResponse
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
versions: Optional[List[StrictStr]] = None
|
|
31
31
|
__properties: ClassVar[List[str]] = ["versions"]
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class MssqlDatabaseCollation(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
MssqlDatabaseCollation
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
collation_name: Optional[StrictStr] = None
|
|
31
31
|
description: Optional[StrictStr] = None
|