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
|
@@ -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
|
import datetime
|
|
16
16
|
import json
|
|
@@ -332,6 +332,10 @@ class ApiClient:
|
|
|
332
332
|
else:
|
|
333
333
|
obj_dict = obj.__dict__
|
|
334
334
|
|
|
335
|
+
if isinstance(obj_dict, list):
|
|
336
|
+
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() # noqa: E501
|
|
337
|
+
return self.sanitize_for_serialization(obj_dict)
|
|
338
|
+
|
|
335
339
|
return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()}
|
|
336
340
|
|
|
337
341
|
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
|
|
@@ -351,12 +355,12 @@ class ApiClient:
|
|
|
351
355
|
data = json.loads(response_text)
|
|
352
356
|
except ValueError:
|
|
353
357
|
data = response_text
|
|
354
|
-
elif
|
|
358
|
+
elif re.match(r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE):
|
|
355
359
|
if response_text == "":
|
|
356
360
|
data = ""
|
|
357
361
|
else:
|
|
358
362
|
data = json.loads(response_text)
|
|
359
|
-
elif
|
|
363
|
+
elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE):
|
|
360
364
|
data = response_text
|
|
361
365
|
else:
|
|
362
366
|
raise ApiException(status=0, reason="Unsupported content type: {0}".format(content_type))
|
|
@@ -458,7 +462,7 @@ class ApiClient:
|
|
|
458
462
|
if k in collection_formats:
|
|
459
463
|
collection_format = collection_formats[k]
|
|
460
464
|
if collection_format == "multi":
|
|
461
|
-
new_params.extend((k, str(value)) for value in v)
|
|
465
|
+
new_params.extend((k, quote(str(value))) for value in v)
|
|
462
466
|
else:
|
|
463
467
|
if collection_format == "ssv":
|
|
464
468
|
delimiter = " "
|
|
@@ -474,7 +478,10 @@ class ApiClient:
|
|
|
474
478
|
|
|
475
479
|
return "&".join(["=".join(map(str, item)) for item in new_params])
|
|
476
480
|
|
|
477
|
-
def files_parameters(
|
|
481
|
+
def files_parameters(
|
|
482
|
+
self,
|
|
483
|
+
files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
|
|
484
|
+
):
|
|
478
485
|
"""Builds form parameters.
|
|
479
486
|
|
|
480
487
|
:param files: File parameters.
|
|
@@ -489,6 +496,12 @@ class ApiClient:
|
|
|
489
496
|
elif isinstance(v, bytes):
|
|
490
497
|
filename = k
|
|
491
498
|
filedata = v
|
|
499
|
+
elif isinstance(v, tuple):
|
|
500
|
+
filename, filedata = v
|
|
501
|
+
elif isinstance(v, list):
|
|
502
|
+
for file_param in v:
|
|
503
|
+
params.extend(self.files_parameters({k: file_param}))
|
|
504
|
+
continue
|
|
492
505
|
else:
|
|
493
506
|
raise ValueError("Unsupported file value")
|
|
494
507
|
mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream"
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
|
-
|
|
5
|
-
import os
|
|
6
|
-
|
|
7
|
-
|
|
8
3
|
"""
|
|
9
4
|
STACKIT MSSQL Service API
|
|
10
5
|
|
|
@@ -15,7 +10,29 @@ import os
|
|
|
15
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
16
11
|
|
|
17
12
|
Do not edit the class manually.
|
|
18
|
-
""" # noqa: E501
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import sys
|
|
16
|
+
from typing import Dict, List, Optional, TypedDict
|
|
17
|
+
|
|
18
|
+
from typing_extensions import NotRequired
|
|
19
|
+
|
|
20
|
+
import os
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
ServerVariablesT = Dict[str, str]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class HostSettingVariable(TypedDict):
|
|
27
|
+
description: str
|
|
28
|
+
default_value: str
|
|
29
|
+
enum_values: List[str]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class HostSetting(TypedDict):
|
|
33
|
+
url: str
|
|
34
|
+
description: str
|
|
35
|
+
variables: NotRequired[Dict[str, HostSettingVariable]]
|
|
19
36
|
|
|
20
37
|
|
|
21
38
|
class HostConfiguration:
|
|
@@ -54,7 +71,7 @@ class HostConfiguration:
|
|
|
54
71
|
"""Ignore operation servers
|
|
55
72
|
"""
|
|
56
73
|
|
|
57
|
-
def get_host_settings(self):
|
|
74
|
+
def get_host_settings(self) -> List[HostSetting]:
|
|
58
75
|
"""Gets an array of host settings
|
|
59
76
|
|
|
60
77
|
:return: An array of host settings
|
|
@@ -72,7 +89,12 @@ class HostConfiguration:
|
|
|
72
89
|
}
|
|
73
90
|
]
|
|
74
91
|
|
|
75
|
-
def get_host_from_settings(
|
|
92
|
+
def get_host_from_settings(
|
|
93
|
+
self,
|
|
94
|
+
index: Optional[int],
|
|
95
|
+
variables: Optional[ServerVariablesT] = None,
|
|
96
|
+
servers: Optional[List[HostSetting]] = None,
|
|
97
|
+
) -> str:
|
|
76
98
|
"""Gets host URL based on the index and variables
|
|
77
99
|
:param index: array index of the host settings
|
|
78
100
|
:param variables: hash of variable and the corresponding value
|
|
@@ -112,7 +134,7 @@ class HostConfiguration:
|
|
|
112
134
|
and variables.get(variable_name) is not None
|
|
113
135
|
):
|
|
114
136
|
raise ValueError(
|
|
115
|
-
"this API does not support setting a region in the
|
|
137
|
+
"this API does not support setting a region in the client configuration, "
|
|
116
138
|
"please check if the region can be specified as a function parameter"
|
|
117
139
|
)
|
|
118
140
|
used_value = variables.get(variable_name, variable["default_value"])
|
|
@@ -131,12 +153,12 @@ class HostConfiguration:
|
|
|
131
153
|
return url
|
|
132
154
|
|
|
133
155
|
@property
|
|
134
|
-
def host(self):
|
|
156
|
+
def host(self) -> str:
|
|
135
157
|
"""Return generated host."""
|
|
136
158
|
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
|
137
159
|
|
|
138
160
|
@host.setter
|
|
139
|
-
def host(self, value):
|
|
161
|
+
def host(self, value: str) -> None:
|
|
140
162
|
"""Fix base path."""
|
|
141
163
|
self._base_path = value
|
|
142
164
|
self.server_index = 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 typing import Any, Optional
|
|
16
16
|
|
|
@@ -152,6 +152,13 @@ class ApiException(OpenApiException):
|
|
|
152
152
|
if http_resp.status == 404:
|
|
153
153
|
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
154
154
|
|
|
155
|
+
# Added new conditions for 409 and 422
|
|
156
|
+
if http_resp.status == 409:
|
|
157
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
|
158
|
+
|
|
159
|
+
if http_resp.status == 422:
|
|
160
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
|
161
|
+
|
|
155
162
|
if 500 <= http_resp.status <= 599:
|
|
156
163
|
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
157
164
|
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
@@ -188,6 +195,18 @@ class ServiceException(ApiException):
|
|
|
188
195
|
pass
|
|
189
196
|
|
|
190
197
|
|
|
198
|
+
class ConflictException(ApiException):
|
|
199
|
+
"""Exception for HTTP 409 Conflict."""
|
|
200
|
+
|
|
201
|
+
pass
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class UnprocessableEntityException(ApiException):
|
|
205
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
|
206
|
+
|
|
207
|
+
pass
|
|
208
|
+
|
|
209
|
+
|
|
191
210
|
def render_path(path_to_item):
|
|
192
211
|
"""Returns a string representation of a path"""
|
|
193
212
|
result = ""
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
12
|
|
|
13
13
|
Do not edit the class manually.
|
|
14
|
-
""" # noqa: E501
|
|
14
|
+
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
# import models into model package
|
|
@@ -26,6 +26,7 @@ from stackit.sqlserverflex.models.create_instance_payload import CreateInstanceP
|
|
|
26
26
|
from stackit.sqlserverflex.models.create_instance_response import CreateInstanceResponse
|
|
27
27
|
from stackit.sqlserverflex.models.create_user_payload import CreateUserPayload
|
|
28
28
|
from stackit.sqlserverflex.models.create_user_response import CreateUserResponse
|
|
29
|
+
from stackit.sqlserverflex.models.data_point import DataPoint
|
|
29
30
|
from stackit.sqlserverflex.models.database import Database
|
|
30
31
|
from stackit.sqlserverflex.models.database_documentation_create_database_request_options import (
|
|
31
32
|
DatabaseDocumentationCreateDatabaseRequestOptions,
|
|
@@ -36,6 +37,8 @@ from stackit.sqlserverflex.models.get_backup_response import GetBackupResponse
|
|
|
36
37
|
from stackit.sqlserverflex.models.get_database_response import GetDatabaseResponse
|
|
37
38
|
from stackit.sqlserverflex.models.get_instance_response import GetInstanceResponse
|
|
38
39
|
from stackit.sqlserverflex.models.get_user_response import GetUserResponse
|
|
40
|
+
from stackit.sqlserverflex.models.host import Host
|
|
41
|
+
from stackit.sqlserverflex.models.host_metric import HostMetric
|
|
39
42
|
from stackit.sqlserverflex.models.instance import Instance
|
|
40
43
|
from stackit.sqlserverflex.models.instance_documentation_acl import (
|
|
41
44
|
InstanceDocumentationACL,
|
|
@@ -58,6 +61,7 @@ from stackit.sqlserverflex.models.list_compatibility_response import (
|
|
|
58
61
|
from stackit.sqlserverflex.models.list_databases_response import ListDatabasesResponse
|
|
59
62
|
from stackit.sqlserverflex.models.list_flavors_response import ListFlavorsResponse
|
|
60
63
|
from stackit.sqlserverflex.models.list_instances_response import ListInstancesResponse
|
|
64
|
+
from stackit.sqlserverflex.models.list_metrics_response import ListMetricsResponse
|
|
61
65
|
from stackit.sqlserverflex.models.list_restore_jobs_response import (
|
|
62
66
|
ListRestoreJobsResponse,
|
|
63
67
|
)
|
|
@@ -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 ACL(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
ACL
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
items: Optional[List[StrictStr]] = None
|
|
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 Backup(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
Backup
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
end_time: Optional[StrictStr] = Field(default=None, alias="endTime")
|
|
31
31
|
error: 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
|
|
|
@@ -27,7 +27,7 @@ from stackit.sqlserverflex.models.backup import Backup
|
|
|
27
27
|
class BackupListBackupsResponseGrouped(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
BackupListBackupsResponseGrouped
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
backups: Optional[List[Backup]] = None
|
|
33
33
|
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
|
|
|
@@ -29,7 +29,7 @@ from stackit.sqlserverflex.models.database_documentation_create_database_request
|
|
|
29
29
|
class CreateDatabasePayload(BaseModel):
|
|
30
30
|
"""
|
|
31
31
|
CreateDatabasePayload
|
|
32
|
-
"""
|
|
32
|
+
""" # noqa: E501
|
|
33
33
|
|
|
34
34
|
name: StrictStr
|
|
35
35
|
options: DatabaseDocumentationCreateDatabaseRequestOptions
|
|
@@ -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 CreateDatabaseResponse(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
CreateDatabaseResponse
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
id: Optional[StrictStr] = None
|
|
31
31
|
__properties: ClassVar[List[str]] = ["id"]
|
|
@@ -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
|
|
|
@@ -35,7 +35,7 @@ from stackit.sqlserverflex.models.instance_documentation_storage import (
|
|
|
35
35
|
class CreateInstancePayload(BaseModel):
|
|
36
36
|
"""
|
|
37
37
|
CreateInstancePayload
|
|
38
|
-
"""
|
|
38
|
+
""" # noqa: E501
|
|
39
39
|
|
|
40
40
|
acl: Optional[InstanceDocumentationACL] = Field(
|
|
41
41
|
default=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 CreateInstanceResponse(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
CreateInstanceResponse
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
id: Optional[StrictStr] = None
|
|
31
31
|
__properties: ClassVar[List[str]] = ["id"]
|
|
@@ -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 CreateUserPayload(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
CreateUserPayload
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
default_database: Optional[StrictStr] = None
|
|
31
31
|
roles: List[StrictStr]
|
|
@@ -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.single_user import SingleUser
|
|
|
27
27
|
class CreateUserResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
CreateUserResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
item: Optional[SingleUser] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["item"]
|
|
@@ -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: 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, Union
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class DataPoint(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DataPoint
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
timestamp: Optional[StrictStr] = None
|
|
31
|
+
value: Optional[Union[StrictFloat, StrictInt]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["timestamp", "value"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of DataPoint 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 DataPoint 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({"timestamp": obj.get("timestamp"), "value": obj.get("value")})
|
|
83
|
+
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
|
|
|
@@ -25,7 +25,7 @@ from typing_extensions import Self
|
|
|
25
25
|
class Database(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
Database
|
|
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 DatabaseDocumentationCreateDatabaseRequestOptions(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
DatabaseDocumentationCreateDatabaseRequestOptions
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
collation: Optional[StrictStr] = Field(default=None, description="Collation of the database")
|
|
31
31
|
compatibility_level: 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 DatabaseOptions(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
DatabaseOptions
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
collation_name: Optional[StrictStr] = Field(
|
|
31
31
|
default=None, description="Name of the collation of the database", alias="collationName"
|
|
@@ -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 Flavor(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
Flavor
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
cpu: Optional[StrictInt] = None
|
|
31
31
|
description: 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 GetBackupResponse(BaseModel):
|
|
26
26
|
"""
|
|
27
27
|
GetBackupResponse
|
|
28
|
-
"""
|
|
28
|
+
""" # noqa: E501
|
|
29
29
|
|
|
30
30
|
end_time: Optional[StrictStr] = Field(
|
|
31
31
|
default=None, description="Backup end time represents local server time", alias="endTime"
|
|
@@ -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.single_database import SingleDatabase
|
|
|
27
27
|
class GetDatabaseResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
GetDatabaseResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
database: Optional[SingleDatabase] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["database"]
|
|
@@ -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 import Instance
|
|
|
27
27
|
class GetInstanceResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
GetInstanceResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
item: Optional[Instance] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["item"]
|
|
@@ -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.user_response_user import UserResponseUser
|
|
|
27
27
|
class GetUserResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
29
|
GetUserResponse
|
|
30
|
-
"""
|
|
30
|
+
""" # noqa: E501
|
|
31
31
|
|
|
32
32
|
item: Optional[UserResponseUser] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["item"]
|