stackit-mongodbflex 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/mongodbflex/__init__.py +103 -0
- stackit/mongodbflex/api/__init__.py +4 -0
- stackit/mongodbflex/api/default_api.py +6867 -0
- stackit/mongodbflex/api_client.py +627 -0
- stackit/mongodbflex/api_response.py +23 -0
- stackit/mongodbflex/configuration.py +112 -0
- stackit/mongodbflex/exceptions.py +199 -0
- stackit/mongodbflex/models/__init__.py +84 -0
- stackit/mongodbflex/models/acl.py +82 -0
- stackit/mongodbflex/models/backup.py +100 -0
- stackit/mongodbflex/models/backup_schedule.py +103 -0
- stackit/mongodbflex/models/clone_instance_payload.py +83 -0
- stackit/mongodbflex/models/clone_instance_response.py +82 -0
- stackit/mongodbflex/models/create_instance_payload.py +121 -0
- stackit/mongodbflex/models/create_instance_response.py +82 -0
- stackit/mongodbflex/models/create_user_payload.py +86 -0
- stackit/mongodbflex/models/create_user_response.py +87 -0
- stackit/mongodbflex/models/data_point.py +83 -0
- stackit/mongodbflex/models/error.py +92 -0
- stackit/mongodbflex/models/flavor.py +92 -0
- stackit/mongodbflex/models/get_backup_response.py +87 -0
- stackit/mongodbflex/models/get_instance_response.py +87 -0
- stackit/mongodbflex/models/get_user_response.py +89 -0
- stackit/mongodbflex/models/handlers_infra_flavor.py +94 -0
- stackit/mongodbflex/models/handlers_infra_get_flavors_response.py +99 -0
- stackit/mongodbflex/models/handlers_instances_get_instance_response.py +87 -0
- stackit/mongodbflex/models/handlers_instances_slow_queries_response.py +103 -0
- stackit/mongodbflex/models/handlers_instances_suggested_indexes_response.py +118 -0
- stackit/mongodbflex/models/host.py +101 -0
- stackit/mongodbflex/models/host_metric.py +103 -0
- stackit/mongodbflex/models/instance.py +128 -0
- stackit/mongodbflex/models/instance_list_instance.py +84 -0
- stackit/mongodbflex/models/instance_response_user.py +96 -0
- stackit/mongodbflex/models/list_backups_response.py +97 -0
- stackit/mongodbflex/models/list_flavors_response.py +99 -0
- stackit/mongodbflex/models/list_instances_response.py +101 -0
- stackit/mongodbflex/models/list_metrics_response.py +93 -0
- stackit/mongodbflex/models/list_restore_jobs_response.py +99 -0
- stackit/mongodbflex/models/list_storages_response.py +95 -0
- stackit/mongodbflex/models/list_user.py +83 -0
- stackit/mongodbflex/models/list_users_response.py +99 -0
- stackit/mongodbflex/models/list_versions_response.py +82 -0
- stackit/mongodbflex/models/mongodbatlas_operation.py +97 -0
- stackit/mongodbflex/models/mongodbatlas_stats.py +98 -0
- stackit/mongodbflex/models/partial_update_instance_payload.py +121 -0
- stackit/mongodbflex/models/partial_update_user_payload.py +83 -0
- stackit/mongodbflex/models/restore_instance_payload.py +83 -0
- stackit/mongodbflex/models/restore_instance_response.py +89 -0
- stackit/mongodbflex/models/restore_instance_status.py +94 -0
- stackit/mongodbflex/models/shape.py +122 -0
- stackit/mongodbflex/models/slow_query.py +83 -0
- stackit/mongodbflex/models/storage.py +83 -0
- stackit/mongodbflex/models/storage_range.py +83 -0
- stackit/mongodbflex/models/suggested_index.py +102 -0
- stackit/mongodbflex/models/update_backup_schedule_payload.py +103 -0
- stackit/mongodbflex/models/update_instance_payload.py +121 -0
- stackit/mongodbflex/models/update_instance_response.py +87 -0
- stackit/mongodbflex/models/update_user_payload.py +83 -0
- stackit/mongodbflex/models/user.py +100 -0
- stackit/mongodbflex/py.typed +0 -0
- stackit/mongodbflex/rest.py +149 -0
- stackit_mongodbflex-0.0.1a0.dist-info/METADATA +45 -0
- stackit_mongodbflex-0.0.1a0.dist-info/RECORD +64 -0
- stackit_mongodbflex-0.0.1a0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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.mongodbflex.models.storage_range import StorageRange
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListStoragesResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ListStoragesResponse
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
storage_classes: Optional[List[StrictStr]] = Field(default=None, alias="storageClasses")
|
|
33
|
+
storage_range: Optional[StorageRange] = Field(default=None, alias="storageRange")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["storageClasses", "storageRange"]
|
|
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 ListStoragesResponse 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 storage_range
|
|
74
|
+
if self.storage_range:
|
|
75
|
+
_dict["storageRange"] = self.storage_range.to_dict()
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of ListStoragesResponse from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate(
|
|
88
|
+
{
|
|
89
|
+
"storageClasses": obj.get("storageClasses"),
|
|
90
|
+
"storageRange": (
|
|
91
|
+
StorageRange.from_dict(obj["storageRange"]) if obj.get("storageRange") is not None else None
|
|
92
|
+
),
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
return _obj
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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 ListUser(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ListUser
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
id: Optional[StrictStr] = None
|
|
31
|
+
username: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["id", "username"]
|
|
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 ListUser 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 ListUser 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({"id": obj.get("id"), "username": obj.get("username")})
|
|
83
|
+
return _obj
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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, StrictInt
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.mongodbflex.models.list_user import ListUser
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListUsersResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ListUsersResponse
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
count: Optional[StrictInt] = None
|
|
33
|
+
items: Optional[List[ListUser]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["count", "items"]
|
|
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 ListUsersResponse 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 items (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.items:
|
|
76
|
+
for _item in self.items:
|
|
77
|
+
if _item:
|
|
78
|
+
_items.append(_item.to_dict())
|
|
79
|
+
_dict["items"] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of ListUsersResponse 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
|
+
"count": obj.get("count"),
|
|
94
|
+
"items": (
|
|
95
|
+
[ListUser.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None
|
|
96
|
+
),
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
return _obj
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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 ListVersionsResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ListVersionsResponse
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
versions: Optional[List[StrictStr]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["versions"]
|
|
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 ListVersionsResponse 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 ListVersionsResponse 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({"versions": obj.get("versions")})
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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.mongodbflex.models.mongodbatlas_stats import MongodbatlasStats
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class MongodbatlasOperation(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
MongodbatlasOperation
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
predicates: Optional[List[Dict[str, Any]]] = Field(
|
|
33
|
+
default=None, description="Documents containing the search criteria used by the query."
|
|
34
|
+
)
|
|
35
|
+
raw: Optional[StrictStr] = Field(default=None, description="Raw log line produced by the query.")
|
|
36
|
+
stats: Optional[MongodbatlasStats] = Field(default=None, description="Query statistics.")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["predicates", "raw", "stats"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of MongodbatlasOperation from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of stats
|
|
77
|
+
if self.stats:
|
|
78
|
+
_dict["stats"] = self.stats.to_dict()
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of MongodbatlasOperation 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
|
+
{
|
|
92
|
+
"predicates": obj.get("predicates"),
|
|
93
|
+
"raw": obj.get("raw"),
|
|
94
|
+
"stats": MongodbatlasStats.from_dict(obj["stats"]) if obj.get("stats") is not None else None,
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
return _obj
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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, Union
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class MongodbatlasStats(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
MongodbatlasStats
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
ms: Optional[Union[StrictFloat, StrictInt]] = Field(
|
|
31
|
+
default=None, description="Duration in milliseconds of the query."
|
|
32
|
+
)
|
|
33
|
+
n_returned: Optional[StrictInt] = Field(
|
|
34
|
+
default=None, description="Number of results returned by the query.", alias="nReturned"
|
|
35
|
+
)
|
|
36
|
+
n_scanned: Optional[StrictInt] = Field(
|
|
37
|
+
default=None, description="Number of documents read by the query.", alias="nScanned"
|
|
38
|
+
)
|
|
39
|
+
ts: Optional[StrictInt] = Field(default=None, description="Query timestamp, in seconds since epoch.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["ms", "nReturned", "nScanned", "ts"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of MongodbatlasStats from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of MongodbatlasStats 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
|
+
{
|
|
92
|
+
"ms": obj.get("ms"),
|
|
93
|
+
"nReturned": obj.get("nReturned"),
|
|
94
|
+
"nScanned": obj.get("nScanned"),
|
|
95
|
+
"ts": obj.get("ts"),
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
return _obj
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT MongoDB Service API
|
|
5
|
+
|
|
6
|
+
This is the documentation for the STACKIT MongoDB Flex Service API
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.mongodbflex.models.acl import ACL
|
|
25
|
+
from stackit.mongodbflex.models.storage import Storage
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class PartialUpdateInstancePayload(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
PartialUpdateInstancePayload
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
acl: Optional[ACL] = None
|
|
34
|
+
backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule")
|
|
35
|
+
flavor_id: Optional[StrictStr] = Field(default=None, alias="flavorId")
|
|
36
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels field is not certain/clear")
|
|
37
|
+
name: Optional[StrictStr] = None
|
|
38
|
+
options: Optional[Dict[str, StrictStr]] = None
|
|
39
|
+
replicas: Optional[StrictInt] = None
|
|
40
|
+
storage: Optional[Storage] = None
|
|
41
|
+
version: Optional[StrictStr] = None
|
|
42
|
+
__properties: ClassVar[List[str]] = [
|
|
43
|
+
"acl",
|
|
44
|
+
"backupSchedule",
|
|
45
|
+
"flavorId",
|
|
46
|
+
"labels",
|
|
47
|
+
"name",
|
|
48
|
+
"options",
|
|
49
|
+
"replicas",
|
|
50
|
+
"storage",
|
|
51
|
+
"version",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
model_config = ConfigDict(
|
|
55
|
+
populate_by_name=True,
|
|
56
|
+
validate_assignment=True,
|
|
57
|
+
protected_namespaces=(),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
def to_str(self) -> str:
|
|
61
|
+
"""Returns the string representation of the model using alias"""
|
|
62
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
63
|
+
|
|
64
|
+
def to_json(self) -> str:
|
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
|
66
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
67
|
+
return json.dumps(self.to_dict())
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
71
|
+
"""Create an instance of PartialUpdateInstancePayload from a JSON string"""
|
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
|
73
|
+
|
|
74
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
75
|
+
"""Return the dictionary representation of the model using alias.
|
|
76
|
+
|
|
77
|
+
This has the following differences from calling pydantic's
|
|
78
|
+
`self.model_dump(by_alias=True)`:
|
|
79
|
+
|
|
80
|
+
* `None` is only added to the output dict for nullable fields that
|
|
81
|
+
were set at model initialization. Other fields with value `None`
|
|
82
|
+
are ignored.
|
|
83
|
+
"""
|
|
84
|
+
excluded_fields: Set[str] = set([])
|
|
85
|
+
|
|
86
|
+
_dict = self.model_dump(
|
|
87
|
+
by_alias=True,
|
|
88
|
+
exclude=excluded_fields,
|
|
89
|
+
exclude_none=True,
|
|
90
|
+
)
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of acl
|
|
92
|
+
if self.acl:
|
|
93
|
+
_dict["acl"] = self.acl.to_dict()
|
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of storage
|
|
95
|
+
if self.storage:
|
|
96
|
+
_dict["storage"] = self.storage.to_dict()
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
+
"""Create an instance of PartialUpdateInstancePayload from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return cls.model_validate(obj)
|
|
107
|
+
|
|
108
|
+
_obj = cls.model_validate(
|
|
109
|
+
{
|
|
110
|
+
"acl": ACL.from_dict(obj["acl"]) if obj.get("acl") is not None else None,
|
|
111
|
+
"backupSchedule": obj.get("backupSchedule"),
|
|
112
|
+
"flavorId": obj.get("flavorId"),
|
|
113
|
+
"labels": obj.get("labels"),
|
|
114
|
+
"name": obj.get("name"),
|
|
115
|
+
"options": obj.get("options"),
|
|
116
|
+
"replicas": obj.get("replicas"),
|
|
117
|
+
"storage": Storage.from_dict(obj["storage"]) if obj.get("storage") is not None else None,
|
|
118
|
+
"version": obj.get("version"),
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
return _obj
|