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
stackit/observability/models/create_scrape_config_payload_http_sd_configs_inner_oauth2_tls_config.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
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 Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Configures the scrape request's TLS settings.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
insecure_skip_verify: Optional[StrictBool] = Field(
|
|
31
|
+
default=False, description="Disable validation of the server certificate.", alias="insecureSkipVerify"
|
|
32
|
+
)
|
|
33
|
+
__properties: ClassVar[List[str]] = ["insecureSkipVerify"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of CreateScrapeConfigPayloadHttpSdConfigsInnerOauth2TlsConfig from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate(
|
|
84
|
+
{
|
|
85
|
+
"insecureSkipVerify": (
|
|
86
|
+
obj.get("insecureSkipVerify") if obj.get("insecureSkipVerify") is not None else False
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
return _obj
|
|
@@ -0,0 +1,146 @@
|
|
|
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, Union
|
|
20
|
+
|
|
21
|
+
from pydantic import (
|
|
22
|
+
BaseModel,
|
|
23
|
+
ConfigDict,
|
|
24
|
+
Field,
|
|
25
|
+
StrictFloat,
|
|
26
|
+
StrictInt,
|
|
27
|
+
StrictStr,
|
|
28
|
+
field_validator,
|
|
29
|
+
)
|
|
30
|
+
from typing_extensions import Annotated, Self
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CreateScrapeConfigPayloadMetricsRelabelConfigsInner(BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
CreateScrapeConfigPayloadMetricsRelabelConfigsInner
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
action: Optional[StrictStr] = Field(
|
|
39
|
+
default="replace",
|
|
40
|
+
description="Action to perform based on regex matching. `Additional Validators:` * if action is replace, targetLabel needs to be in body",
|
|
41
|
+
)
|
|
42
|
+
modulus: Optional[Union[StrictFloat, StrictInt]] = Field(
|
|
43
|
+
default=None, description="Modulus to take of the hash of the source label values."
|
|
44
|
+
)
|
|
45
|
+
regex: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=400)]] = Field(
|
|
46
|
+
default=".*", description="Regular expression against which the extracted value is matched."
|
|
47
|
+
)
|
|
48
|
+
replacement: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
|
|
49
|
+
default="$1",
|
|
50
|
+
description="Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available.",
|
|
51
|
+
)
|
|
52
|
+
separator: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=20)]] = Field(
|
|
53
|
+
default=";", description="Separator placed between concatenated source label values."
|
|
54
|
+
)
|
|
55
|
+
source_labels: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
|
|
56
|
+
default=None,
|
|
57
|
+
description="The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.",
|
|
58
|
+
alias="sourceLabels",
|
|
59
|
+
)
|
|
60
|
+
target_label: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
|
|
61
|
+
default=None,
|
|
62
|
+
description="Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.",
|
|
63
|
+
alias="targetLabel",
|
|
64
|
+
)
|
|
65
|
+
__properties: ClassVar[List[str]] = [
|
|
66
|
+
"action",
|
|
67
|
+
"modulus",
|
|
68
|
+
"regex",
|
|
69
|
+
"replacement",
|
|
70
|
+
"separator",
|
|
71
|
+
"sourceLabels",
|
|
72
|
+
"targetLabel",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
@field_validator("action")
|
|
76
|
+
def action_validate_enum(cls, value):
|
|
77
|
+
"""Validates the enum"""
|
|
78
|
+
if value is None:
|
|
79
|
+
return value
|
|
80
|
+
|
|
81
|
+
if value not in set(["replace", "keep", "drop", "hashmod", "labelmap", "labeldrop", "labelkeep"]):
|
|
82
|
+
raise ValueError(
|
|
83
|
+
"must be one of enum values ('replace', 'keep', 'drop', 'hashmod', 'labelmap', 'labeldrop', 'labelkeep')"
|
|
84
|
+
)
|
|
85
|
+
return value
|
|
86
|
+
|
|
87
|
+
model_config = ConfigDict(
|
|
88
|
+
populate_by_name=True,
|
|
89
|
+
validate_assignment=True,
|
|
90
|
+
protected_namespaces=(),
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
def to_str(self) -> str:
|
|
94
|
+
"""Returns the string representation of the model using alias"""
|
|
95
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
96
|
+
|
|
97
|
+
def to_json(self) -> str:
|
|
98
|
+
"""Returns the JSON representation of the model using alias"""
|
|
99
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
100
|
+
return json.dumps(self.to_dict())
|
|
101
|
+
|
|
102
|
+
@classmethod
|
|
103
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
104
|
+
"""Create an instance of CreateScrapeConfigPayloadMetricsRelabelConfigsInner from a JSON string"""
|
|
105
|
+
return cls.from_dict(json.loads(json_str))
|
|
106
|
+
|
|
107
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
108
|
+
"""Return the dictionary representation of the model using alias.
|
|
109
|
+
|
|
110
|
+
This has the following differences from calling pydantic's
|
|
111
|
+
`self.model_dump(by_alias=True)`:
|
|
112
|
+
|
|
113
|
+
* `None` is only added to the output dict for nullable fields that
|
|
114
|
+
were set at model initialization. Other fields with value `None`
|
|
115
|
+
are ignored.
|
|
116
|
+
"""
|
|
117
|
+
excluded_fields: Set[str] = set([])
|
|
118
|
+
|
|
119
|
+
_dict = self.model_dump(
|
|
120
|
+
by_alias=True,
|
|
121
|
+
exclude=excluded_fields,
|
|
122
|
+
exclude_none=True,
|
|
123
|
+
)
|
|
124
|
+
return _dict
|
|
125
|
+
|
|
126
|
+
@classmethod
|
|
127
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
128
|
+
"""Create an instance of CreateScrapeConfigPayloadMetricsRelabelConfigsInner from a dict"""
|
|
129
|
+
if obj is None:
|
|
130
|
+
return None
|
|
131
|
+
|
|
132
|
+
if not isinstance(obj, dict):
|
|
133
|
+
return cls.model_validate(obj)
|
|
134
|
+
|
|
135
|
+
_obj = cls.model_validate(
|
|
136
|
+
{
|
|
137
|
+
"action": obj.get("action") if obj.get("action") is not None else "replace",
|
|
138
|
+
"modulus": obj.get("modulus"),
|
|
139
|
+
"regex": obj.get("regex") if obj.get("regex") is not None else ".*",
|
|
140
|
+
"replacement": obj.get("replacement") if obj.get("replacement") is not None else "$1",
|
|
141
|
+
"separator": obj.get("separator") if obj.get("separator") is not None else ";",
|
|
142
|
+
"sourceLabels": obj.get("sourceLabels"),
|
|
143
|
+
"targetLabel": obj.get("targetLabel"),
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
return _obj
|
|
@@ -0,0 +1,88 @@
|
|
|
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 CreateScrapeConfigPayloadStaticConfigsInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CreateScrapeConfigPayloadStaticConfigsInner
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
labels: Optional[Dict[str, Any]] = Field(
|
|
31
|
+
default=None,
|
|
32
|
+
description="Labels assigned to all metrics scraped from the targets. `Additional Validators:` * should not contain more than 10 keys * each key and value should not be longer than 200 characters",
|
|
33
|
+
)
|
|
34
|
+
targets: List[Annotated[str, Field(min_length=1, strict=True, max_length=500)]] = Field(
|
|
35
|
+
description="The targets specified by the static config."
|
|
36
|
+
)
|
|
37
|
+
__properties: ClassVar[List[str]] = ["labels", "targets"]
|
|
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 CreateScrapeConfigPayloadStaticConfigsInner 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 CreateScrapeConfigPayloadStaticConfigsInner 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({"labels": obj.get("labels"), "targets": obj.get("targets")})
|
|
88
|
+
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
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Credentials(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Credentials
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
password: Annotated[str, Field(min_length=1, strict=True)]
|
|
31
|
+
username: Annotated[str, Field(min_length=1, strict=True)]
|
|
32
|
+
__properties: ClassVar[List[str]] = ["password", "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 Credentials 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 Credentials 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({"password": obj.get("password"), "username": obj.get("username")})
|
|
83
|
+
return _obj
|
|
@@ -0,0 +1,90 @@
|
|
|
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 CredentialsRemoteWriteConfig(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CredentialsRemoteWriteConfig
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
credentials_max_limit: Annotated[int, Field(le=6000000, strict=True, ge=0)] = Field(alias="credentialsMaxLimit")
|
|
31
|
+
max_limit: Annotated[int, Field(le=6000000, strict=True, ge=0)] = Field(alias="maxLimit")
|
|
32
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["credentialsMaxLimit", "maxLimit", "message"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of CredentialsRemoteWriteConfig from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of CredentialsRemoteWriteConfig from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate(
|
|
84
|
+
{
|
|
85
|
+
"credentialsMaxLimit": obj.get("credentialsMaxLimit"),
|
|
86
|
+
"maxLimit": obj.get("maxLimit"),
|
|
87
|
+
"message": obj.get("message"),
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
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
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class CredentialsRemoteWriteDeleteResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CredentialsRemoteWriteDeleteResponse
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
max_limit: Annotated[int, Field(le=6000000, strict=True, ge=0)] = Field(alias="maxLimit")
|
|
31
|
+
message: Annotated[str, Field(min_length=1, strict=True)]
|
|
32
|
+
__properties: ClassVar[List[str]] = ["maxLimit", "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 CredentialsRemoteWriteDeleteResponse 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 CredentialsRemoteWriteDeleteResponse 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({"maxLimit": obj.get("maxLimit"), "message": obj.get("message")})
|
|
83
|
+
return _obj
|
|
@@ -0,0 +1,97 @@
|
|
|
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.job import Job
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DeleteScrapeConfigResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
DeleteScrapeConfigResponse
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
data: List[Job]
|
|
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 DeleteScrapeConfigResponse 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 data (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.data:
|
|
76
|
+
for _item in self.data:
|
|
77
|
+
if _item:
|
|
78
|
+
_items.append(_item.to_dict())
|
|
79
|
+
_dict["data"] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of DeleteScrapeConfigResponse 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
|
+
"data": [Job.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
|
94
|
+
"message": obj.get("message"),
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
return _obj
|