stackit-observability 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/observability/__init__.py +190 -0
- stackit/observability/api/__init__.py +4 -0
- stackit/observability/api/default_api.py +9455 -0
- stackit/observability/api_client.py +627 -0
- stackit/observability/api_response.py +23 -0
- stackit/observability/configuration.py +112 -0
- stackit/observability/exceptions.py +199 -0
- stackit/observability/models/__init__.py +171 -0
- stackit/observability/models/alert.py +125 -0
- stackit/observability/models/alert_config_receivers_response.py +97 -0
- stackit/observability/models/alert_config_route_response.py +93 -0
- stackit/observability/models/basic_auth.py +83 -0
- stackit/observability/models/create_alert_config_receiver_payload.py +152 -0
- stackit/observability/models/create_alert_config_receiver_payload_email_configs_inner.py +114 -0
- stackit/observability/models/create_alert_config_receiver_payload_opsgenie_configs_inner.py +94 -0
- stackit/observability/models/create_alert_config_receiver_payload_web_hook_configs_inner.py +92 -0
- stackit/observability/models/create_alert_config_route_payload.py +157 -0
- stackit/observability/models/create_alert_config_route_payload_routes_inner.py +119 -0
- stackit/observability/models/create_credentials_response.py +95 -0
- stackit/observability/models/create_instance_payload.py +88 -0
- stackit/observability/models/create_instance_response.py +90 -0
- stackit/observability/models/create_scrape_config_payload.py +267 -0
- stackit/observability/models/create_scrape_config_payload_basic_auth.py +87 -0
- stackit/observability/models/create_scrape_config_payload_http_sd_configs_inner.py +133 -0
- stackit/observability/models/create_scrape_config_payload_http_sd_configs_inner_oauth2.py +115 -0
- stackit/observability/models/create_scrape_config_payload_http_sd_configs_inner_oauth2_tls_config.py +90 -0
- stackit/observability/models/create_scrape_config_payload_metrics_relabel_configs_inner.py +146 -0
- stackit/observability/models/create_scrape_config_payload_static_configs_inner.py +88 -0
- stackit/observability/models/credentials.py +83 -0
- stackit/observability/models/credentials_remote_write_config.py +90 -0
- stackit/observability/models/credentials_remote_write_delete_response.py +83 -0
- stackit/observability/models/delete_scrape_config_response.py +97 -0
- stackit/observability/models/email_config.py +114 -0
- stackit/observability/models/error.py +83 -0
- stackit/observability/models/get_alert_configs_response.py +93 -0
- stackit/observability/models/get_credentials_response.py +92 -0
- stackit/observability/models/get_instance_response.py +164 -0
- stackit/observability/models/get_metrics_storage_retention_response.py +103 -0
- stackit/observability/models/get_scrape_config_response.py +90 -0
- stackit/observability/models/grafana_configs.py +99 -0
- stackit/observability/models/grafana_oauth.py +124 -0
- stackit/observability/models/http_service_sd.py +109 -0
- stackit/observability/models/inhibit_rules.py +120 -0
- stackit/observability/models/instance.py +155 -0
- stackit/observability/models/instance_response.py +82 -0
- stackit/observability/models/instance_sensitive_data.py +159 -0
- stackit/observability/models/job.py +207 -0
- stackit/observability/models/list_acl_response.py +83 -0
- stackit/observability/models/list_credentials_response.py +101 -0
- stackit/observability/models/list_instances_response.py +101 -0
- stackit/observability/models/list_scrape_configs_response.py +97 -0
- stackit/observability/models/message.py +82 -0
- stackit/observability/models/metrics_relabel_config.py +122 -0
- stackit/observability/models/model_global.py +125 -0
- stackit/observability/models/o_auth2.py +101 -0
- stackit/observability/models/opsgenie_config.py +98 -0
- stackit/observability/models/permission_denied.py +82 -0
- stackit/observability/models/plan.py +156 -0
- stackit/observability/models/plan_model.py +147 -0
- stackit/observability/models/plans_response.py +97 -0
- stackit/observability/models/project_instance_full.py +124 -0
- stackit/observability/models/receiver.py +93 -0
- stackit/observability/models/receivers.py +129 -0
- stackit/observability/models/route.py +135 -0
- stackit/observability/models/route_serializer.py +127 -0
- stackit/observability/models/scrape_configs_response.py +97 -0
- stackit/observability/models/service_keys_list.py +86 -0
- stackit/observability/models/static_configs.py +83 -0
- stackit/observability/models/tls_config.py +88 -0
- stackit/observability/models/update_acl_payload.py +82 -0
- stackit/observability/models/update_alert_config_receiver_payload.py +152 -0
- stackit/observability/models/update_alert_config_route_payload.py +157 -0
- stackit/observability/models/update_alert_configs_payload.py +133 -0
- stackit/observability/models/update_alert_configs_payload_global.py +139 -0
- stackit/observability/models/update_alert_configs_payload_inhibit_rules.py +113 -0
- stackit/observability/models/update_alert_configs_payload_receivers_inner.py +152 -0
- stackit/observability/models/update_alert_configs_payload_route.py +157 -0
- stackit/observability/models/update_alert_configs_response.py +93 -0
- stackit/observability/models/update_credentials_remote_write_config_payload.py +86 -0
- stackit/observability/models/update_grafana_configs_payload.py +109 -0
- stackit/observability/models/update_grafana_configs_payload_generic_oauth.py +135 -0
- stackit/observability/models/update_instance_payload.py +88 -0
- stackit/observability/models/update_metrics_storage_retention_payload.py +99 -0
- stackit/observability/models/update_scrape_config_payload.py +225 -0
- stackit/observability/models/update_scrape_config_payload_static_configs_inner.py +88 -0
- stackit/observability/models/web_hook.py +90 -0
- stackit/observability/py.typed +0 -0
- stackit/observability/rest.py +149 -0
- stackit_observability-0.0.1a0.dist-info/METADATA +44 -0
- stackit_observability-0.0.1a0.dist-info/RECORD +91 -0
- stackit_observability-0.0.1a0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Observability API
|
|
5
|
+
|
|
6
|
+
API endpoints for Observability on STACKIT
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.1
|
|
9
|
+
Contact: stackit-argus@mail.schwarz
|
|
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, StrictBool
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EmailConfig(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
EmailConfig
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
auth_identity: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
|
|
31
|
+
default=None, alias="authIdentity"
|
|
32
|
+
)
|
|
33
|
+
auth_password: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
|
|
34
|
+
default=None, alias="authPassword"
|
|
35
|
+
)
|
|
36
|
+
auth_username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
|
|
37
|
+
default=None, alias="authUsername"
|
|
38
|
+
)
|
|
39
|
+
var_from: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
|
|
40
|
+
default=None, alias="from"
|
|
41
|
+
)
|
|
42
|
+
send_resolved: Optional[StrictBool] = Field(default=False, alias="sendResolved")
|
|
43
|
+
smarthost: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None
|
|
44
|
+
to: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
|
|
45
|
+
__properties: ClassVar[List[str]] = [
|
|
46
|
+
"authIdentity",
|
|
47
|
+
"authPassword",
|
|
48
|
+
"authUsername",
|
|
49
|
+
"from",
|
|
50
|
+
"sendResolved",
|
|
51
|
+
"smarthost",
|
|
52
|
+
"to",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
model_config = ConfigDict(
|
|
56
|
+
populate_by_name=True,
|
|
57
|
+
validate_assignment=True,
|
|
58
|
+
protected_namespaces=(),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
def to_str(self) -> str:
|
|
62
|
+
"""Returns the string representation of the model using alias"""
|
|
63
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
64
|
+
|
|
65
|
+
def to_json(self) -> str:
|
|
66
|
+
"""Returns the JSON representation of the model using alias"""
|
|
67
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
68
|
+
return json.dumps(self.to_dict())
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
72
|
+
"""Create an instance of EmailConfig from a JSON string"""
|
|
73
|
+
return cls.from_dict(json.loads(json_str))
|
|
74
|
+
|
|
75
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
76
|
+
"""Return the dictionary representation of the model using alias.
|
|
77
|
+
|
|
78
|
+
This has the following differences from calling pydantic's
|
|
79
|
+
`self.model_dump(by_alias=True)`:
|
|
80
|
+
|
|
81
|
+
* `None` is only added to the output dict for nullable fields that
|
|
82
|
+
were set at model initialization. Other fields with value `None`
|
|
83
|
+
are ignored.
|
|
84
|
+
"""
|
|
85
|
+
excluded_fields: Set[str] = set([])
|
|
86
|
+
|
|
87
|
+
_dict = self.model_dump(
|
|
88
|
+
by_alias=True,
|
|
89
|
+
exclude=excluded_fields,
|
|
90
|
+
exclude_none=True,
|
|
91
|
+
)
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
+
"""Create an instance of EmailConfig from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return cls.model_validate(obj)
|
|
102
|
+
|
|
103
|
+
_obj = cls.model_validate(
|
|
104
|
+
{
|
|
105
|
+
"authIdentity": obj.get("authIdentity"),
|
|
106
|
+
"authPassword": obj.get("authPassword"),
|
|
107
|
+
"authUsername": obj.get("authUsername"),
|
|
108
|
+
"from": obj.get("from"),
|
|
109
|
+
"sendResolved": obj.get("sendResolved") if obj.get("sendResolved") is not None else False,
|
|
110
|
+
"smarthost": obj.get("smarthost"),
|
|
111
|
+
"to": obj.get("to"),
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
return _obj
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Observability API
|
|
5
|
+
|
|
6
|
+
API endpoints for Observability on STACKIT
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.1
|
|
9
|
+
Contact: stackit-argus@mail.schwarz
|
|
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 Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Error(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Error
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
errors: Optional[List[Dict[str, Optional[StrictStr]]]] = None
|
|
31
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
32
|
+
__properties: ClassVar[List[str]] = ["errors", "message"]
|
|
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 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({"errors": obj.get("errors"), "message": obj.get("message")})
|
|
83
|
+
return _obj
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Observability API
|
|
5
|
+
|
|
6
|
+
API endpoints for Observability on STACKIT
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.1
|
|
9
|
+
Contact: stackit-argus@mail.schwarz
|
|
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
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
from stackit.observability.models.alert import Alert
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class GetAlertConfigsResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GetAlertConfigsResponse
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
data: Alert
|
|
33
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "message"]
|
|
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 GetAlertConfigsResponse 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 data
|
|
74
|
+
if self.data:
|
|
75
|
+
_dict["data"] = self.data.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 GetAlertConfigsResponse 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
|
+
"data": Alert.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
90
|
+
"message": obj.get("message"),
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
return _obj
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Observability API
|
|
5
|
+
|
|
6
|
+
API endpoints for Observability on STACKIT
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.1
|
|
9
|
+
Contact: stackit-argus@mail.schwarz
|
|
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 Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GetCredentialsResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
GetCredentialsResponse
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
credentials_info: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, alias="credentialsInfo")
|
|
31
|
+
id: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
|
|
32
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
33
|
+
name: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["credentialsInfo", "id", "message", "name"]
|
|
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 GetCredentialsResponse 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
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of GetCredentialsResponse from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate(
|
|
85
|
+
{
|
|
86
|
+
"credentialsInfo": obj.get("credentialsInfo"),
|
|
87
|
+
"id": obj.get("id"),
|
|
88
|
+
"message": obj.get("message"),
|
|
89
|
+
"name": obj.get("name"),
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
return _obj
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Observability API
|
|
5
|
+
|
|
6
|
+
API endpoints for Observability on STACKIT
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.1
|
|
9
|
+
Contact: stackit-argus@mail.schwarz
|
|
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 (
|
|
22
|
+
BaseModel,
|
|
23
|
+
ConfigDict,
|
|
24
|
+
Field,
|
|
25
|
+
StrictBool,
|
|
26
|
+
StrictStr,
|
|
27
|
+
field_validator,
|
|
28
|
+
)
|
|
29
|
+
from typing_extensions import Annotated, Self
|
|
30
|
+
|
|
31
|
+
from stackit.observability.models.instance_sensitive_data import InstanceSensitiveData
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class GetInstanceResponse(BaseModel):
|
|
35
|
+
"""
|
|
36
|
+
GetInstanceResponse
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
dashboard_url: Annotated[str, Field(min_length=1, strict=True, max_length=500)] = Field(alias="dashboardUrl")
|
|
40
|
+
error: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None
|
|
41
|
+
id: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
|
|
42
|
+
instance: InstanceSensitiveData
|
|
43
|
+
is_updatable: Optional[StrictBool] = Field(default=True, alias="isUpdatable")
|
|
44
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
45
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=300)]] = None
|
|
46
|
+
parameters: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
47
|
+
plan_id: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="planId")
|
|
48
|
+
plan_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="planName")
|
|
49
|
+
plan_schema: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default="", alias="planSchema")
|
|
50
|
+
service_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="serviceName")
|
|
51
|
+
status: StrictStr
|
|
52
|
+
__properties: ClassVar[List[str]] = [
|
|
53
|
+
"dashboardUrl",
|
|
54
|
+
"error",
|
|
55
|
+
"id",
|
|
56
|
+
"instance",
|
|
57
|
+
"isUpdatable",
|
|
58
|
+
"message",
|
|
59
|
+
"name",
|
|
60
|
+
"parameters",
|
|
61
|
+
"planId",
|
|
62
|
+
"planName",
|
|
63
|
+
"planSchema",
|
|
64
|
+
"serviceName",
|
|
65
|
+
"status",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
@field_validator("status")
|
|
69
|
+
def status_validate_enum(cls, value):
|
|
70
|
+
"""Validates the enum"""
|
|
71
|
+
if value not in set(
|
|
72
|
+
[
|
|
73
|
+
"CREATING",
|
|
74
|
+
"CREATE_SUCCEEDED",
|
|
75
|
+
"CREATE_FAILED",
|
|
76
|
+
"DELETING",
|
|
77
|
+
"DELETE_SUCCEEDED",
|
|
78
|
+
"DELETE_FAILED",
|
|
79
|
+
"UPDATING",
|
|
80
|
+
"UPDATE_SUCCEEDED",
|
|
81
|
+
"UPDATE_FAILED",
|
|
82
|
+
]
|
|
83
|
+
):
|
|
84
|
+
raise ValueError(
|
|
85
|
+
"must be one of enum values ('CREATING', 'CREATE_SUCCEEDED', 'CREATE_FAILED', 'DELETING', 'DELETE_SUCCEEDED', 'DELETE_FAILED', 'UPDATING', 'UPDATE_SUCCEEDED', 'UPDATE_FAILED')"
|
|
86
|
+
)
|
|
87
|
+
return value
|
|
88
|
+
|
|
89
|
+
model_config = ConfigDict(
|
|
90
|
+
populate_by_name=True,
|
|
91
|
+
validate_assignment=True,
|
|
92
|
+
protected_namespaces=(),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
def to_str(self) -> str:
|
|
96
|
+
"""Returns the string representation of the model using alias"""
|
|
97
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
98
|
+
|
|
99
|
+
def to_json(self) -> str:
|
|
100
|
+
"""Returns the JSON representation of the model using alias"""
|
|
101
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
102
|
+
return json.dumps(self.to_dict())
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
106
|
+
"""Create an instance of GetInstanceResponse from a JSON string"""
|
|
107
|
+
return cls.from_dict(json.loads(json_str))
|
|
108
|
+
|
|
109
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
110
|
+
"""Return the dictionary representation of the model using alias.
|
|
111
|
+
|
|
112
|
+
This has the following differences from calling pydantic's
|
|
113
|
+
`self.model_dump(by_alias=True)`:
|
|
114
|
+
|
|
115
|
+
* `None` is only added to the output dict for nullable fields that
|
|
116
|
+
were set at model initialization. Other fields with value `None`
|
|
117
|
+
are ignored.
|
|
118
|
+
"""
|
|
119
|
+
excluded_fields: Set[str] = set([])
|
|
120
|
+
|
|
121
|
+
_dict = self.model_dump(
|
|
122
|
+
by_alias=True,
|
|
123
|
+
exclude=excluded_fields,
|
|
124
|
+
exclude_none=True,
|
|
125
|
+
)
|
|
126
|
+
# override the default output from pydantic by calling `to_dict()` of instance
|
|
127
|
+
if self.instance:
|
|
128
|
+
_dict["instance"] = self.instance.to_dict()
|
|
129
|
+
# set to None if error (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.error is None and "error" in self.model_fields_set:
|
|
132
|
+
_dict["error"] = None
|
|
133
|
+
|
|
134
|
+
return _dict
|
|
135
|
+
|
|
136
|
+
@classmethod
|
|
137
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
138
|
+
"""Create an instance of GetInstanceResponse from a dict"""
|
|
139
|
+
if obj is None:
|
|
140
|
+
return None
|
|
141
|
+
|
|
142
|
+
if not isinstance(obj, dict):
|
|
143
|
+
return cls.model_validate(obj)
|
|
144
|
+
|
|
145
|
+
_obj = cls.model_validate(
|
|
146
|
+
{
|
|
147
|
+
"dashboardUrl": obj.get("dashboardUrl"),
|
|
148
|
+
"error": obj.get("error"),
|
|
149
|
+
"id": obj.get("id"),
|
|
150
|
+
"instance": (
|
|
151
|
+
InstanceSensitiveData.from_dict(obj["instance"]) if obj.get("instance") is not None else None
|
|
152
|
+
),
|
|
153
|
+
"isUpdatable": obj.get("isUpdatable") if obj.get("isUpdatable") is not None else True,
|
|
154
|
+
"message": obj.get("message"),
|
|
155
|
+
"name": obj.get("name"),
|
|
156
|
+
"parameters": obj.get("parameters"),
|
|
157
|
+
"planId": obj.get("planId"),
|
|
158
|
+
"planName": obj.get("planName"),
|
|
159
|
+
"planSchema": obj.get("planSchema") if obj.get("planSchema") is not None else "",
|
|
160
|
+
"serviceName": obj.get("serviceName"),
|
|
161
|
+
"status": obj.get("status"),
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
return _obj
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Observability API
|
|
5
|
+
|
|
6
|
+
API endpoints for Observability on STACKIT
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.1.1
|
|
9
|
+
Contact: stackit-argus@mail.schwarz
|
|
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
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GetMetricsStorageRetentionResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
GetMetricsStorageRetentionResponse
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
31
|
+
metrics_retention_time1h: Annotated[str, Field(min_length=2, strict=True, max_length=8)] = Field(
|
|
32
|
+
alias="metricsRetentionTime1h"
|
|
33
|
+
)
|
|
34
|
+
metrics_retention_time5m: Annotated[str, Field(min_length=2, strict=True, max_length=8)] = Field(
|
|
35
|
+
alias="metricsRetentionTime5m"
|
|
36
|
+
)
|
|
37
|
+
metrics_retention_time_raw: Annotated[str, Field(min_length=2, strict=True, max_length=8)] = Field(
|
|
38
|
+
alias="metricsRetentionTimeRaw"
|
|
39
|
+
)
|
|
40
|
+
__properties: ClassVar[List[str]] = [
|
|
41
|
+
"message",
|
|
42
|
+
"metricsRetentionTime1h",
|
|
43
|
+
"metricsRetentionTime5m",
|
|
44
|
+
"metricsRetentionTimeRaw",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of GetMetricsStorageRetentionResponse from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of GetMetricsStorageRetentionResponse from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate(
|
|
96
|
+
{
|
|
97
|
+
"message": obj.get("message"),
|
|
98
|
+
"metricsRetentionTime1h": obj.get("metricsRetentionTime1h"),
|
|
99
|
+
"metricsRetentionTime5m": obj.get("metricsRetentionTime5m"),
|
|
100
|
+
"metricsRetentionTimeRaw": obj.get("metricsRetentionTimeRaw"),
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
return _obj
|