stackit-sqlserverflex 0.0.1a0__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 +107 -0
- stackit/sqlserverflex/api/__init__.py +4 -0
- stackit/sqlserverflex/api/default_api.py +7045 -0
- stackit/sqlserverflex/api_client.py +627 -0
- stackit/sqlserverflex/api_response.py +23 -0
- stackit/sqlserverflex/configuration.py +112 -0
- stackit/sqlserverflex/exceptions.py +199 -0
- stackit/sqlserverflex/models/__init__.py +88 -0
- stackit/sqlserverflex/models/acl.py +82 -0
- stackit/sqlserverflex/models/backup.py +100 -0
- stackit/sqlserverflex/models/backup_list_backups_response_grouped.py +99 -0
- stackit/sqlserverflex/models/create_database_payload.py +99 -0
- stackit/sqlserverflex/models/create_database_response.py +82 -0
- stackit/sqlserverflex/models/create_instance_payload.py +141 -0
- stackit/sqlserverflex/models/create_instance_response.py +82 -0
- stackit/sqlserverflex/models/create_user_payload.py +90 -0
- stackit/sqlserverflex/models/create_user_response.py +87 -0
- stackit/sqlserverflex/models/database.py +84 -0
- stackit/sqlserverflex/models/database_documentation_create_database_request_options.py +92 -0
- stackit/sqlserverflex/models/database_options.py +94 -0
- stackit/sqlserverflex/models/flavor.py +92 -0
- stackit/sqlserverflex/models/get_backup_response.py +100 -0
- stackit/sqlserverflex/models/get_database_response.py +89 -0
- stackit/sqlserverflex/models/get_instance_response.py +87 -0
- stackit/sqlserverflex/models/get_user_response.py +89 -0
- stackit/sqlserverflex/models/instance.py +128 -0
- stackit/sqlserverflex/models/instance_documentation_acl.py +82 -0
- stackit/sqlserverflex/models/instance_documentation_options.py +92 -0
- stackit/sqlserverflex/models/instance_documentation_storage.py +90 -0
- stackit/sqlserverflex/models/instance_error.py +94 -0
- stackit/sqlserverflex/models/instance_flavor_entry.py +94 -0
- stackit/sqlserverflex/models/instance_list_instance.py +84 -0
- stackit/sqlserverflex/models/instance_list_user.py +83 -0
- stackit/sqlserverflex/models/list_backups_response.py +101 -0
- stackit/sqlserverflex/models/list_collations_response.py +99 -0
- stackit/sqlserverflex/models/list_compatibility_response.py +101 -0
- stackit/sqlserverflex/models/list_databases_response.py +99 -0
- stackit/sqlserverflex/models/list_flavors_response.py +99 -0
- stackit/sqlserverflex/models/list_instances_response.py +101 -0
- stackit/sqlserverflex/models/list_restore_jobs_response.py +99 -0
- stackit/sqlserverflex/models/list_roles_response.py +82 -0
- stackit/sqlserverflex/models/list_storages_response.py +95 -0
- stackit/sqlserverflex/models/list_users_response.py +101 -0
- stackit/sqlserverflex/models/list_versions_response.py +82 -0
- stackit/sqlserverflex/models/mssql_database_collation.py +83 -0
- stackit/sqlserverflex/models/mssql_database_compatibility.py +85 -0
- stackit/sqlserverflex/models/partial_update_instance_payload.py +110 -0
- stackit/sqlserverflex/models/reset_user_response.py +87 -0
- stackit/sqlserverflex/models/restore_running_restore.py +100 -0
- stackit/sqlserverflex/models/single_database.py +95 -0
- stackit/sqlserverflex/models/single_user.py +109 -0
- stackit/sqlserverflex/models/storage.py +83 -0
- stackit/sqlserverflex/models/storage_range.py +83 -0
- stackit/sqlserverflex/models/trigger_database_restore_payload.py +85 -0
- stackit/sqlserverflex/models/type.py +41 -0
- stackit/sqlserverflex/models/update_instance_payload.py +108 -0
- stackit/sqlserverflex/models/update_instance_response.py +87 -0
- stackit/sqlserverflex/models/user.py +100 -0
- stackit/sqlserverflex/models/user_response_user.py +96 -0
- stackit/sqlserverflex/py.typed +0 -0
- stackit/sqlserverflex/rest.py +149 -0
- stackit_sqlserverflex-0.0.1a0.dist-info/METADATA +45 -0
- stackit_sqlserverflex-0.0.1a0.dist-info/RECORD +64 -0
- stackit_sqlserverflex-0.0.1a0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,99 @@
|
|
|
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: 1.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 docstring might be too long
|
|
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.database_documentation_create_database_request_options import (
|
|
25
|
+
DatabaseDocumentationCreateDatabaseRequestOptions,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CreateDatabasePayload(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
CreateDatabasePayload
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
name: StrictStr
|
|
35
|
+
options: DatabaseDocumentationCreateDatabaseRequestOptions
|
|
36
|
+
__properties: ClassVar[List[str]] = ["name", "options"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of CreateDatabasePayload from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of options
|
|
76
|
+
if self.options:
|
|
77
|
+
_dict["options"] = self.options.to_dict()
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of CreateDatabasePayload from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate(
|
|
90
|
+
{
|
|
91
|
+
"name": obj.get("name"),
|
|
92
|
+
"options": (
|
|
93
|
+
DatabaseDocumentationCreateDatabaseRequestOptions.from_dict(obj["options"])
|
|
94
|
+
if obj.get("options") is not None
|
|
95
|
+
else None
|
|
96
|
+
),
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
return _obj
|
|
@@ -0,0 +1,82 @@
|
|
|
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: 1.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 docstring might be too long
|
|
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
|
+
|
|
25
|
+
class CreateDatabaseResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CreateDatabaseResponse
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
id: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["id"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of CreateDatabaseResponse from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
return _dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of CreateDatabaseResponse from a dict"""
|
|
75
|
+
if obj is None:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
if not isinstance(obj, dict):
|
|
79
|
+
return cls.model_validate(obj)
|
|
80
|
+
|
|
81
|
+
_obj = cls.model_validate({"id": obj.get("id")})
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,141 @@
|
|
|
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: 1.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 docstring might be too long
|
|
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.instance_documentation_acl import (
|
|
25
|
+
InstanceDocumentationACL,
|
|
26
|
+
)
|
|
27
|
+
from stackit.sqlserverflex.models.instance_documentation_options import (
|
|
28
|
+
InstanceDocumentationOptions,
|
|
29
|
+
)
|
|
30
|
+
from stackit.sqlserverflex.models.instance_documentation_storage import (
|
|
31
|
+
InstanceDocumentationStorage,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class CreateInstancePayload(BaseModel):
|
|
36
|
+
"""
|
|
37
|
+
CreateInstancePayload
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
acl: Optional[InstanceDocumentationACL] = Field(
|
|
41
|
+
default=None,
|
|
42
|
+
description="ACL is the Access Control List defining the IP ranges allowed to connect to the database",
|
|
43
|
+
)
|
|
44
|
+
backup_schedule: Optional[StrictStr] = Field(
|
|
45
|
+
default=None,
|
|
46
|
+
description="Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59",
|
|
47
|
+
alias="backupSchedule",
|
|
48
|
+
)
|
|
49
|
+
flavor_id: StrictStr = Field(description="Id of the selected flavor", alias="flavorId")
|
|
50
|
+
labels: Optional[Dict[str, Any]] = Field(default=None, description="Labels for the instance")
|
|
51
|
+
name: StrictStr = Field(description="Name of the instance")
|
|
52
|
+
options: Optional[InstanceDocumentationOptions] = Field(
|
|
53
|
+
default=None, description="Database instance specific options are requested via this field"
|
|
54
|
+
)
|
|
55
|
+
storage: Optional[InstanceDocumentationStorage] = Field(default=None, description="Storage for the instance")
|
|
56
|
+
version: Optional[StrictStr] = Field(default="2022", description="Version of the MSSQL Server")
|
|
57
|
+
__properties: ClassVar[List[str]] = [
|
|
58
|
+
"acl",
|
|
59
|
+
"backupSchedule",
|
|
60
|
+
"flavorId",
|
|
61
|
+
"labels",
|
|
62
|
+
"name",
|
|
63
|
+
"options",
|
|
64
|
+
"storage",
|
|
65
|
+
"version",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
model_config = ConfigDict(
|
|
69
|
+
populate_by_name=True,
|
|
70
|
+
validate_assignment=True,
|
|
71
|
+
protected_namespaces=(),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def to_str(self) -> str:
|
|
75
|
+
"""Returns the string representation of the model using alias"""
|
|
76
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
77
|
+
|
|
78
|
+
def to_json(self) -> str:
|
|
79
|
+
"""Returns the JSON representation of the model using alias"""
|
|
80
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
81
|
+
return json.dumps(self.to_dict())
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of CreateInstancePayload from a JSON string"""
|
|
86
|
+
return cls.from_dict(json.loads(json_str))
|
|
87
|
+
|
|
88
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
89
|
+
"""Return the dictionary representation of the model using alias.
|
|
90
|
+
|
|
91
|
+
This has the following differences from calling pydantic's
|
|
92
|
+
`self.model_dump(by_alias=True)`:
|
|
93
|
+
|
|
94
|
+
* `None` is only added to the output dict for nullable fields that
|
|
95
|
+
were set at model initialization. Other fields with value `None`
|
|
96
|
+
are ignored.
|
|
97
|
+
"""
|
|
98
|
+
excluded_fields: Set[str] = set([])
|
|
99
|
+
|
|
100
|
+
_dict = self.model_dump(
|
|
101
|
+
by_alias=True,
|
|
102
|
+
exclude=excluded_fields,
|
|
103
|
+
exclude_none=True,
|
|
104
|
+
)
|
|
105
|
+
# override the default output from pydantic by calling `to_dict()` of acl
|
|
106
|
+
if self.acl:
|
|
107
|
+
_dict["acl"] = self.acl.to_dict()
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of options
|
|
109
|
+
if self.options:
|
|
110
|
+
_dict["options"] = self.options.to_dict()
|
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of storage
|
|
112
|
+
if self.storage:
|
|
113
|
+
_dict["storage"] = self.storage.to_dict()
|
|
114
|
+
return _dict
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
118
|
+
"""Create an instance of CreateInstancePayload from a dict"""
|
|
119
|
+
if obj is None:
|
|
120
|
+
return None
|
|
121
|
+
|
|
122
|
+
if not isinstance(obj, dict):
|
|
123
|
+
return cls.model_validate(obj)
|
|
124
|
+
|
|
125
|
+
_obj = cls.model_validate(
|
|
126
|
+
{
|
|
127
|
+
"acl": InstanceDocumentationACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None,
|
|
128
|
+
"backupSchedule": obj.get("backupSchedule"),
|
|
129
|
+
"flavorId": obj.get("flavorId"),
|
|
130
|
+
"labels": obj.get("labels"),
|
|
131
|
+
"name": obj.get("name"),
|
|
132
|
+
"options": (
|
|
133
|
+
InstanceDocumentationOptions.from_dict(obj["options"]) if obj.get("options") is not None else None
|
|
134
|
+
),
|
|
135
|
+
"storage": (
|
|
136
|
+
InstanceDocumentationStorage.from_dict(obj["storage"]) if obj.get("storage") is not None else None
|
|
137
|
+
),
|
|
138
|
+
"version": obj.get("version") if obj.get("version") is not None else "2022",
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
return _obj
|
|
@@ -0,0 +1,82 @@
|
|
|
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: 1.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 docstring might be too long
|
|
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
|
+
|
|
25
|
+
class CreateInstanceResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CreateInstanceResponse
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
id: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["id"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of CreateInstanceResponse from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
return _dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of CreateInstanceResponse from a dict"""
|
|
75
|
+
if obj is None:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
if not isinstance(obj, dict):
|
|
79
|
+
return cls.model_validate(obj)
|
|
80
|
+
|
|
81
|
+
_obj = cls.model_validate({"id": obj.get("id")})
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,90 @@
|
|
|
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: 1.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 docstring might be too long
|
|
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
|
+
|
|
25
|
+
class CreateUserPayload(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CreateUserPayload
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
default_database: Optional[StrictStr] = None
|
|
31
|
+
roles: List[StrictStr]
|
|
32
|
+
username: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["default_database", "roles", "username"]
|
|
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 CreateUserPayload 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 CreateUserPayload 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(
|
|
84
|
+
{
|
|
85
|
+
"default_database": obj.get("default_database"),
|
|
86
|
+
"roles": obj.get("roles"),
|
|
87
|
+
"username": obj.get("username"),
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
return _obj
|
|
@@ -0,0 +1,87 @@
|
|
|
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: 1.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 docstring might be too long
|
|
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.single_user import SingleUser
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CreateUserResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
CreateUserResponse
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
item: Optional[SingleUser] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["item"]
|
|
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 CreateUserResponse 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 item
|
|
73
|
+
if self.item:
|
|
74
|
+
_dict["item"] = self.item.to_dict()
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of CreateUserResponse from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({"item": SingleUser.from_dict(obj["item"]) if obj.get("item") is not None else None})
|
|
87
|
+
return _obj
|
|
@@ -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: 1.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 docstring might be too long
|
|
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
|
+
|
|
25
|
+
class Database(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Database
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
id: Optional[StrictStr] = None
|
|
31
|
+
name: Optional[StrictStr] = None
|
|
32
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Database specific options")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["id", "name", "options"]
|
|
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 Database 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 Database 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({"id": obj.get("id"), "name": obj.get("name"), "options": obj.get("options")})
|
|
84
|
+
return _obj
|