stackit-redis 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/redis/__init__.py +68 -0
- stackit/redis/api/__init__.py +4 -0
- stackit/redis/api/default_api.py +4812 -0
- stackit/redis/api_client.py +626 -0
- stackit/redis/api_response.py +23 -0
- stackit/redis/configuration.py +111 -0
- stackit/redis/exceptions.py +198 -0
- stackit/redis/models/__init__.py +49 -0
- stackit/redis/models/backup.py +95 -0
- stackit/redis/models/create_backup_response_item.py +82 -0
- stackit/redis/models/create_instance_payload.py +96 -0
- stackit/redis/models/create_instance_response.py +81 -0
- stackit/redis/models/credentials.py +97 -0
- stackit/redis/models/credentials_list_item.py +81 -0
- stackit/redis/models/credentials_response.py +94 -0
- stackit/redis/models/error.py +82 -0
- stackit/redis/models/get_metrics_response.py +153 -0
- stackit/redis/models/instance.py +147 -0
- stackit/redis/models/instance_last_operation.py +99 -0
- stackit/redis/models/instance_parameters.py +242 -0
- stackit/redis/models/instance_schema.py +95 -0
- stackit/redis/models/list_backups_response.py +98 -0
- stackit/redis/models/list_credentials_response.py +98 -0
- stackit/redis/models/list_instances_response.py +98 -0
- stackit/redis/models/list_offerings_response.py +98 -0
- stackit/redis/models/list_restores_response.py +98 -0
- stackit/redis/models/model_schema.py +81 -0
- stackit/redis/models/offering.py +127 -0
- stackit/redis/models/partial_update_instance_payload.py +96 -0
- stackit/redis/models/plan.py +93 -0
- stackit/redis/models/raw_credentials.py +88 -0
- stackit/redis/models/restore.py +93 -0
- stackit/redis/models/trigger_restore_response.py +81 -0
- stackit/redis/models/update_backups_config_payload.py +81 -0
- stackit/redis/models/update_backups_config_response.py +81 -0
- stackit/redis/py.typed +0 -0
- stackit/redis/rest.py +148 -0
- stackit_redis-0.0.1a0.dist-info/METADATA +45 -0
- stackit_redis-0.0.1a0.dist-info/RECORD +40 -0
- stackit_redis-0.0.1a0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Redis API
|
|
5
|
+
|
|
6
|
+
The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CreateInstanceResponse(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
CreateInstanceResponse
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
instance_id: StrictStr = Field(alias="instanceId")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["instanceId"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
49
|
+
"""Create an instance of CreateInstanceResponse from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
53
|
+
"""Return the dictionary representation of the model using alias.
|
|
54
|
+
|
|
55
|
+
This has the following differences from calling pydantic's
|
|
56
|
+
`self.model_dump(by_alias=True)`:
|
|
57
|
+
|
|
58
|
+
* `None` is only added to the output dict for nullable fields that
|
|
59
|
+
were set at model initialization. Other fields with value `None`
|
|
60
|
+
are ignored.
|
|
61
|
+
"""
|
|
62
|
+
excluded_fields: Set[str] = set([])
|
|
63
|
+
|
|
64
|
+
_dict = self.model_dump(
|
|
65
|
+
by_alias=True,
|
|
66
|
+
exclude=excluded_fields,
|
|
67
|
+
exclude_none=True,
|
|
68
|
+
)
|
|
69
|
+
return _dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
73
|
+
"""Create an instance of CreateInstanceResponse from a dict"""
|
|
74
|
+
if obj is None:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
if not isinstance(obj, dict):
|
|
78
|
+
return cls.model_validate(obj)
|
|
79
|
+
|
|
80
|
+
_obj = cls.model_validate({"instanceId": obj.get("instanceId")})
|
|
81
|
+
return _obj
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Redis API
|
|
5
|
+
|
|
6
|
+
The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Credentials(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
Credentials
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
host: StrictStr
|
|
30
|
+
hosts: Optional[List[StrictStr]] = None
|
|
31
|
+
load_balanced_host: Optional[StrictStr] = None
|
|
32
|
+
password: StrictStr
|
|
33
|
+
port: Optional[StrictInt] = None
|
|
34
|
+
uri: Optional[StrictStr] = None
|
|
35
|
+
username: StrictStr
|
|
36
|
+
__properties: ClassVar[List[str]] = ["host", "hosts", "load_balanced_host", "password", "port", "uri", "username"]
|
|
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 Credentials 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
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of Credentials 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(
|
|
87
|
+
{
|
|
88
|
+
"host": obj.get("host"),
|
|
89
|
+
"hosts": obj.get("hosts"),
|
|
90
|
+
"load_balanced_host": obj.get("load_balanced_host"),
|
|
91
|
+
"password": obj.get("password"),
|
|
92
|
+
"port": obj.get("port"),
|
|
93
|
+
"uri": obj.get("uri"),
|
|
94
|
+
"username": obj.get("username"),
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
return _obj
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Redis API
|
|
5
|
+
|
|
6
|
+
The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CredentialsListItem(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
CredentialsListItem
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["id"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
45
|
+
return json.dumps(self.to_dict())
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
49
|
+
"""Create an instance of CredentialsListItem from a JSON string"""
|
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
53
|
+
"""Return the dictionary representation of the model using alias.
|
|
54
|
+
|
|
55
|
+
This has the following differences from calling pydantic's
|
|
56
|
+
`self.model_dump(by_alias=True)`:
|
|
57
|
+
|
|
58
|
+
* `None` is only added to the output dict for nullable fields that
|
|
59
|
+
were set at model initialization. Other fields with value `None`
|
|
60
|
+
are ignored.
|
|
61
|
+
"""
|
|
62
|
+
excluded_fields: Set[str] = set([])
|
|
63
|
+
|
|
64
|
+
_dict = self.model_dump(
|
|
65
|
+
by_alias=True,
|
|
66
|
+
exclude=excluded_fields,
|
|
67
|
+
exclude_none=True,
|
|
68
|
+
)
|
|
69
|
+
return _dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
73
|
+
"""Create an instance of CredentialsListItem from a dict"""
|
|
74
|
+
if obj is None:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
if not isinstance(obj, dict):
|
|
78
|
+
return cls.model_validate(obj)
|
|
79
|
+
|
|
80
|
+
_obj = cls.model_validate({"id": obj.get("id")})
|
|
81
|
+
return _obj
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Redis API
|
|
5
|
+
|
|
6
|
+
The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
from stackit.redis.models.raw_credentials import RawCredentials
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class CredentialsResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CredentialsResponse
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
id: StrictStr
|
|
32
|
+
raw: Optional[RawCredentials] = None
|
|
33
|
+
uri: StrictStr
|
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "raw", "uri"]
|
|
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 CredentialsResponse 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 raw
|
|
74
|
+
if self.raw:
|
|
75
|
+
_dict["raw"] = self.raw.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 CredentialsResponse 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
|
+
"id": obj.get("id"),
|
|
90
|
+
"raw": RawCredentials.from_dict(obj["raw"]) if obj.get("raw") is not None else None,
|
|
91
|
+
"uri": obj.get("uri"),
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
return _obj
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Redis API
|
|
5
|
+
|
|
6
|
+
The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Error(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
Error
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
description: StrictStr
|
|
30
|
+
error: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["description", "error"]
|
|
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 Error 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 Error 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({"description": obj.get("description"), "error": obj.get("error")})
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Redis API
|
|
5
|
+
|
|
6
|
+
The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501 docstring might be too long
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set, Union
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class GetMetricsResponse(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
GetMetricsResponse
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
cpu_idle_time: Optional[StrictInt] = Field(default=None, alias="cpuIdleTime")
|
|
30
|
+
cpu_load_percent: Union[StrictFloat, StrictInt] = Field(alias="cpuLoadPercent")
|
|
31
|
+
cpu_system_time: Optional[StrictInt] = Field(default=None, alias="cpuSystemTime")
|
|
32
|
+
cpu_user_time: Optional[StrictInt] = Field(default=None, alias="cpuUserTime")
|
|
33
|
+
disk_ephemeral_total: StrictInt = Field(alias="diskEphemeralTotal")
|
|
34
|
+
disk_ephemeral_used: StrictInt = Field(alias="diskEphemeralUsed")
|
|
35
|
+
disk_persistent_total: StrictInt = Field(alias="diskPersistentTotal")
|
|
36
|
+
disk_persistent_used: StrictInt = Field(alias="diskPersistentUsed")
|
|
37
|
+
load1: Union[StrictFloat, StrictInt]
|
|
38
|
+
load15: Union[StrictFloat, StrictInt]
|
|
39
|
+
load5: Union[StrictFloat, StrictInt]
|
|
40
|
+
memory_total: StrictInt = Field(alias="memoryTotal")
|
|
41
|
+
memory_used: StrictInt = Field(alias="memoryUsed")
|
|
42
|
+
parachute_disk_ephemeral_activated: StrictBool = Field(alias="parachuteDiskEphemeralActivated")
|
|
43
|
+
parachute_disk_ephemeral_total: StrictInt = Field(alias="parachuteDiskEphemeralTotal")
|
|
44
|
+
parachute_disk_ephemeral_used: StrictInt = Field(alias="parachuteDiskEphemeralUsed")
|
|
45
|
+
parachute_disk_ephemeral_used_percent: StrictInt = Field(alias="parachuteDiskEphemeralUsedPercent")
|
|
46
|
+
parachute_disk_ephemeral_used_threshold: StrictInt = Field(alias="parachuteDiskEphemeralUsedThreshold")
|
|
47
|
+
parachute_disk_persistent_activated: StrictBool = Field(alias="parachuteDiskPersistentActivated")
|
|
48
|
+
parachute_disk_persistent_total: StrictInt = Field(alias="parachuteDiskPersistentTotal")
|
|
49
|
+
parachute_disk_persistent_used: StrictInt = Field(alias="parachuteDiskPersistentUsed")
|
|
50
|
+
parachute_disk_persistent_used_percent: StrictInt = Field(alias="parachuteDiskPersistentUsedPercent")
|
|
51
|
+
parachute_disk_persistent_used_threshold: StrictInt = Field(alias="parachuteDiskPersistentUsedThreshold")
|
|
52
|
+
__properties: ClassVar[List[str]] = [
|
|
53
|
+
"cpuIdleTime",
|
|
54
|
+
"cpuLoadPercent",
|
|
55
|
+
"cpuSystemTime",
|
|
56
|
+
"cpuUserTime",
|
|
57
|
+
"diskEphemeralTotal",
|
|
58
|
+
"diskEphemeralUsed",
|
|
59
|
+
"diskPersistentTotal",
|
|
60
|
+
"diskPersistentUsed",
|
|
61
|
+
"load1",
|
|
62
|
+
"load15",
|
|
63
|
+
"load5",
|
|
64
|
+
"memoryTotal",
|
|
65
|
+
"memoryUsed",
|
|
66
|
+
"parachuteDiskEphemeralActivated",
|
|
67
|
+
"parachuteDiskEphemeralTotal",
|
|
68
|
+
"parachuteDiskEphemeralUsed",
|
|
69
|
+
"parachuteDiskEphemeralUsedPercent",
|
|
70
|
+
"parachuteDiskEphemeralUsedThreshold",
|
|
71
|
+
"parachuteDiskPersistentActivated",
|
|
72
|
+
"parachuteDiskPersistentTotal",
|
|
73
|
+
"parachuteDiskPersistentUsed",
|
|
74
|
+
"parachuteDiskPersistentUsedPercent",
|
|
75
|
+
"parachuteDiskPersistentUsedThreshold",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
model_config = ConfigDict(
|
|
79
|
+
populate_by_name=True,
|
|
80
|
+
validate_assignment=True,
|
|
81
|
+
protected_namespaces=(),
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
def to_str(self) -> str:
|
|
85
|
+
"""Returns the string representation of the model using alias"""
|
|
86
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
87
|
+
|
|
88
|
+
def to_json(self) -> str:
|
|
89
|
+
"""Returns the JSON representation of the model using alias"""
|
|
90
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
91
|
+
return json.dumps(self.to_dict())
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of GetMetricsResponse from a JSON string"""
|
|
96
|
+
return cls.from_dict(json.loads(json_str))
|
|
97
|
+
|
|
98
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
99
|
+
"""Return the dictionary representation of the model using alias.
|
|
100
|
+
|
|
101
|
+
This has the following differences from calling pydantic's
|
|
102
|
+
`self.model_dump(by_alias=True)`:
|
|
103
|
+
|
|
104
|
+
* `None` is only added to the output dict for nullable fields that
|
|
105
|
+
were set at model initialization. Other fields with value `None`
|
|
106
|
+
are ignored.
|
|
107
|
+
"""
|
|
108
|
+
excluded_fields: Set[str] = set([])
|
|
109
|
+
|
|
110
|
+
_dict = self.model_dump(
|
|
111
|
+
by_alias=True,
|
|
112
|
+
exclude=excluded_fields,
|
|
113
|
+
exclude_none=True,
|
|
114
|
+
)
|
|
115
|
+
return _dict
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
119
|
+
"""Create an instance of GetMetricsResponse from a dict"""
|
|
120
|
+
if obj is None:
|
|
121
|
+
return None
|
|
122
|
+
|
|
123
|
+
if not isinstance(obj, dict):
|
|
124
|
+
return cls.model_validate(obj)
|
|
125
|
+
|
|
126
|
+
_obj = cls.model_validate(
|
|
127
|
+
{
|
|
128
|
+
"cpuIdleTime": obj.get("cpuIdleTime"),
|
|
129
|
+
"cpuLoadPercent": obj.get("cpuLoadPercent"),
|
|
130
|
+
"cpuSystemTime": obj.get("cpuSystemTime"),
|
|
131
|
+
"cpuUserTime": obj.get("cpuUserTime"),
|
|
132
|
+
"diskEphemeralTotal": obj.get("diskEphemeralTotal"),
|
|
133
|
+
"diskEphemeralUsed": obj.get("diskEphemeralUsed"),
|
|
134
|
+
"diskPersistentTotal": obj.get("diskPersistentTotal"),
|
|
135
|
+
"diskPersistentUsed": obj.get("diskPersistentUsed"),
|
|
136
|
+
"load1": obj.get("load1"),
|
|
137
|
+
"load15": obj.get("load15"),
|
|
138
|
+
"load5": obj.get("load5"),
|
|
139
|
+
"memoryTotal": obj.get("memoryTotal"),
|
|
140
|
+
"memoryUsed": obj.get("memoryUsed"),
|
|
141
|
+
"parachuteDiskEphemeralActivated": obj.get("parachuteDiskEphemeralActivated"),
|
|
142
|
+
"parachuteDiskEphemeralTotal": obj.get("parachuteDiskEphemeralTotal"),
|
|
143
|
+
"parachuteDiskEphemeralUsed": obj.get("parachuteDiskEphemeralUsed"),
|
|
144
|
+
"parachuteDiskEphemeralUsedPercent": obj.get("parachuteDiskEphemeralUsedPercent"),
|
|
145
|
+
"parachuteDiskEphemeralUsedThreshold": obj.get("parachuteDiskEphemeralUsedThreshold"),
|
|
146
|
+
"parachuteDiskPersistentActivated": obj.get("parachuteDiskPersistentActivated"),
|
|
147
|
+
"parachuteDiskPersistentTotal": obj.get("parachuteDiskPersistentTotal"),
|
|
148
|
+
"parachuteDiskPersistentUsed": obj.get("parachuteDiskPersistentUsed"),
|
|
149
|
+
"parachuteDiskPersistentUsedPercent": obj.get("parachuteDiskPersistentUsedPercent"),
|
|
150
|
+
"parachuteDiskPersistentUsedThreshold": obj.get("parachuteDiskPersistentUsedThreshold"),
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
return _obj
|