stackit-valkey 0.0.1__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.
Files changed (40) hide show
  1. src/stackit/valkey/__init__.py +134 -0
  2. src/stackit/valkey/api/__init__.py +4 -0
  3. src/stackit/valkey/api/default_api.py +5235 -0
  4. src/stackit/valkey/api_client.py +649 -0
  5. src/stackit/valkey/api_response.py +22 -0
  6. src/stackit/valkey/configuration.py +162 -0
  7. src/stackit/valkey/exceptions.py +217 -0
  8. src/stackit/valkey/models/__init__.py +48 -0
  9. src/stackit/valkey/models/backup.py +102 -0
  10. src/stackit/valkey/models/create_backup_response_item.py +83 -0
  11. src/stackit/valkey/models/create_credentials_payload.py +82 -0
  12. src/stackit/valkey/models/create_instance_payload.py +97 -0
  13. src/stackit/valkey/models/create_instance_response.py +82 -0
  14. src/stackit/valkey/models/credentials.py +98 -0
  15. src/stackit/valkey/models/credentials_list_item.py +82 -0
  16. src/stackit/valkey/models/credentials_response.py +95 -0
  17. src/stackit/valkey/models/error.py +83 -0
  18. src/stackit/valkey/models/get_metrics_response.py +161 -0
  19. src/stackit/valkey/models/instance.py +148 -0
  20. src/stackit/valkey/models/instance_last_operation.py +100 -0
  21. src/stackit/valkey/models/instance_parameters.py +240 -0
  22. src/stackit/valkey/models/instance_schema.py +96 -0
  23. src/stackit/valkey/models/list_credentials_response.py +99 -0
  24. src/stackit/valkey/models/list_instances_response.py +99 -0
  25. src/stackit/valkey/models/list_offerings_response.py +99 -0
  26. src/stackit/valkey/models/list_restores_response.py +99 -0
  27. src/stackit/valkey/models/model_schema.py +82 -0
  28. src/stackit/valkey/models/offering.py +135 -0
  29. src/stackit/valkey/models/partial_update_instance_payload.py +97 -0
  30. src/stackit/valkey/models/plan.py +100 -0
  31. src/stackit/valkey/models/raw_credentials.py +89 -0
  32. src/stackit/valkey/models/restore.py +94 -0
  33. src/stackit/valkey/models/trigger_restore_response.py +82 -0
  34. src/stackit/valkey/models/update_backups_config_payload.py +82 -0
  35. src/stackit/valkey/models/update_backups_config_response.py +82 -0
  36. src/stackit/valkey/py.typed +0 -0
  37. src/stackit/valkey/rest.py +163 -0
  38. stackit_valkey-0.0.1.dist-info/METADATA +46 -0
  39. stackit_valkey-0.0.1.dist-info/RECORD +40 -0
  40. stackit_valkey-0.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Key Value Store API
5
+
6
+ The STACKIT Key Value Store 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: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+ from stackit.valkey.models.instance_parameters import InstanceParameters
25
+
26
+
27
+ class CreateInstancePayload(BaseModel):
28
+ """
29
+ CreateInstancePayload
30
+ """ # noqa: E501
31
+
32
+ instance_name: StrictStr = Field(alias="instanceName")
33
+ parameters: Optional[InstanceParameters] = None
34
+ plan_id: StrictStr = Field(alias="planId")
35
+ __properties: ClassVar[List[str]] = ["instanceName", "parameters", "planId"]
36
+
37
+ model_config = ConfigDict(
38
+ validate_by_name=True,
39
+ validate_by_alias=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
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of CreateInstancePayload from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of parameters
75
+ if self.parameters:
76
+ _dict["parameters"] = self.parameters.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of CreateInstancePayload from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate(
89
+ {
90
+ "instanceName": obj.get("instanceName"),
91
+ "parameters": (
92
+ InstanceParameters.from_dict(obj["parameters"]) if obj.get("parameters") is not None else None
93
+ ),
94
+ "planId": obj.get("planId"),
95
+ }
96
+ )
97
+ return _obj
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Key Value Store API
5
+
6
+ The STACKIT Key Value Store 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: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+
25
+ class CreateInstanceResponse(BaseModel):
26
+ """
27
+ CreateInstanceResponse
28
+ """ # noqa: E501
29
+
30
+ instance_id: StrictStr = Field(alias="instanceId")
31
+ __properties: ClassVar[List[str]] = ["instanceId"]
32
+
33
+ model_config = ConfigDict(
34
+ validate_by_name=True,
35
+ validate_by_alias=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
+ return json.dumps(to_jsonable_python(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({"instanceId": obj.get("instanceId")})
82
+ return _obj
@@ -0,0 +1,98 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Key Value Store API
5
+
6
+ The STACKIT Key Value Store 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: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+
25
+ class Credentials(BaseModel):
26
+ """
27
+ Credentials
28
+ """ # noqa: E501
29
+
30
+ host: StrictStr
31
+ hosts: Optional[List[StrictStr]] = None
32
+ load_balanced_host: Optional[StrictStr] = None
33
+ password: StrictStr
34
+ port: Optional[StrictInt] = None
35
+ uri: Optional[StrictStr] = None
36
+ username: StrictStr
37
+ __properties: ClassVar[List[str]] = ["host", "hosts", "load_balanced_host", "password", "port", "uri", "username"]
38
+
39
+ model_config = ConfigDict(
40
+ validate_by_name=True,
41
+ validate_by_alias=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of Credentials 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
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of Credentials 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
+ "host": obj.get("host"),
90
+ "hosts": obj.get("hosts"),
91
+ "load_balanced_host": obj.get("load_balanced_host"),
92
+ "password": obj.get("password"),
93
+ "port": obj.get("port"),
94
+ "uri": obj.get("uri"),
95
+ "username": obj.get("username"),
96
+ }
97
+ )
98
+ return _obj
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Key Value Store API
5
+
6
+ The STACKIT Key Value Store 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: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+
25
+ class CredentialsListItem(BaseModel):
26
+ """
27
+ CredentialsListItem
28
+ """ # noqa: E501
29
+
30
+ id: StrictStr
31
+ __properties: ClassVar[List[str]] = ["id"]
32
+
33
+ model_config = ConfigDict(
34
+ validate_by_name=True,
35
+ validate_by_alias=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
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of CredentialsListItem 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 CredentialsListItem 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,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Key Value Store API
5
+
6
+ The STACKIT Key Value Store 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: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+ from stackit.valkey.models.raw_credentials import RawCredentials
25
+
26
+
27
+ class CredentialsResponse(BaseModel):
28
+ """
29
+ CredentialsResponse
30
+ """ # noqa: E501
31
+
32
+ id: StrictStr
33
+ raw: Optional[RawCredentials] = None
34
+ uri: StrictStr
35
+ __properties: ClassVar[List[str]] = ["id", "raw", "uri"]
36
+
37
+ model_config = ConfigDict(
38
+ validate_by_name=True,
39
+ validate_by_alias=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
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of CredentialsResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of raw
75
+ if self.raw:
76
+ _dict["raw"] = self.raw.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of CredentialsResponse from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate(
89
+ {
90
+ "id": obj.get("id"),
91
+ "raw": RawCredentials.from_dict(obj["raw"]) if obj.get("raw") is not None else None,
92
+ "uri": obj.get("uri"),
93
+ }
94
+ )
95
+ return _obj
@@ -0,0 +1,83 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Key Value Store API
5
+
6
+ The STACKIT Key Value Store 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: 2.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+
25
+ class Error(BaseModel):
26
+ """
27
+ Error
28
+ """ # noqa: E501
29
+
30
+ description: StrictStr
31
+ error: StrictStr
32
+ __properties: ClassVar[List[str]] = ["description", "error"]
33
+
34
+ model_config = ConfigDict(
35
+ validate_by_name=True,
36
+ validate_by_alias=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
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of Error 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 Error 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({"description": obj.get("description"), "error": obj.get("error")})
83
+ return _obj