Skip to content

Commit 3072ed1

Browse files
Generate observability
1 parent c2a3a62 commit 3072ed1

8 files changed

+78
-11
lines changed

services/observability/src/stackit/observability/models/create_alert_config_receiver_payload_email_configs_inner.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import pprint
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing_extensions import Annotated, Self
2323

2424

@@ -43,6 +43,9 @@ class CreateAlertConfigReceiverPayloadEmailConfigsInner(BaseModel):
4343
description="The sender address. `Additional Validators:` * must be a syntactically valid email address",
4444
alias="from",
4545
)
46+
send_resolved: Optional[StrictBool] = Field(
47+
default=False, description="Whether to notify about resolved alerts.", alias="sendResolved"
48+
)
4649
smarthost: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(
4750
default=None,
4851
description="The SMTP host through which emails are sent. `Additional Validators:` * should only include the characters: a-zA-Z0-9_./@&?:-",
@@ -51,7 +54,15 @@ class CreateAlertConfigReceiverPayloadEmailConfigsInner(BaseModel):
5154
default=None,
5255
description="The email address to send notifications to. `Additional Validators:` * must be a syntactically valid email address",
5356
)
54-
__properties: ClassVar[List[str]] = ["authIdentity", "authPassword", "authUsername", "from", "smarthost", "to"]
57+
__properties: ClassVar[List[str]] = [
58+
"authIdentity",
59+
"authPassword",
60+
"authUsername",
61+
"from",
62+
"sendResolved",
63+
"smarthost",
64+
"to",
65+
]
5566

5667
model_config = ConfigDict(
5768
populate_by_name=True,
@@ -107,6 +118,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
107118
"authPassword": obj.get("authPassword"),
108119
"authUsername": obj.get("authUsername"),
109120
"from": obj.get("from"),
121+
"sendResolved": obj.get("sendResolved") if obj.get("sendResolved") is not None else False,
110122
"smarthost": obj.get("smarthost"),
111123
"to": obj.get("to"),
112124
}

services/observability/src/stackit/observability/models/create_alert_config_receiver_payload_opsgenie_configs_inner.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import pprint
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing_extensions import Annotated, Self
2323

2424

@@ -37,10 +37,16 @@ class CreateAlertConfigReceiverPayloadOpsgenieConfigsInner(BaseModel):
3737
description="The host to send OpsGenie API requests to. `Additional Validators:` * must be a syntactically valid url address",
3838
alias="apiUrl",
3939
)
40+
priority: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=2)]] = Field(
41+
default=None, description="Priority level of alert. Possible values are P1, P2, P3, P4, and P5."
42+
)
43+
send_resolved: Optional[StrictBool] = Field(
44+
default=True, description="Whether to notify about resolved alerts.", alias="sendResolved"
45+
)
4046
tags: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=400)]] = Field(
4147
default=None, description="Comma separated list of tags attached to the notifications."
4248
)
43-
__properties: ClassVar[List[str]] = ["apiKey", "apiUrl", "tags"]
49+
__properties: ClassVar[List[str]] = ["apiKey", "apiUrl", "priority", "sendResolved", "tags"]
4450

4551
model_config = ConfigDict(
4652
populate_by_name=True,
@@ -90,5 +96,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9096
if not isinstance(obj, dict):
9197
return cls.model_validate(obj)
9298

93-
_obj = cls.model_validate({"apiKey": obj.get("apiKey"), "apiUrl": obj.get("apiUrl"), "tags": obj.get("tags")})
99+
_obj = cls.model_validate(
100+
{
101+
"apiKey": obj.get("apiKey"),
102+
"apiUrl": obj.get("apiUrl"),
103+
"priority": obj.get("priority"),
104+
"sendResolved": obj.get("sendResolved") if obj.get("sendResolved") is not None else True,
105+
"tags": obj.get("tags"),
106+
}
107+
)
94108
return _obj

services/observability/src/stackit/observability/models/create_alert_config_receiver_payload_web_hook_configs_inner.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ class CreateAlertConfigReceiverPayloadWebHookConfigsInner(BaseModel):
3232
description="Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such",
3333
alias="msTeams",
3434
)
35+
send_resolved: Optional[StrictBool] = Field(
36+
default=True, description="Whether to notify about resolved alerts.", alias="sendResolved"
37+
)
3538
url: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=500)]] = Field(
3639
default=None,
3740
description="The endpoint to send HTTP POST requests to. `Additional Validators:` * must be a syntactically valid url address",
3841
)
39-
__properties: ClassVar[List[str]] = ["msTeams", "url"]
42+
__properties: ClassVar[List[str]] = ["msTeams", "sendResolved", "url"]
4043

4144
model_config = ConfigDict(
4245
populate_by_name=True,
@@ -87,6 +90,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8790
return cls.model_validate(obj)
8891

8992
_obj = cls.model_validate(
90-
{"msTeams": obj.get("msTeams") if obj.get("msTeams") is not None else False, "url": obj.get("url")}
93+
{
94+
"msTeams": obj.get("msTeams") if obj.get("msTeams") is not None else False,
95+
"sendResolved": obj.get("sendResolved") if obj.get("sendResolved") is not None else True,
96+
"url": obj.get("url"),
97+
}
9198
)
9299
return _obj

services/observability/src/stackit/observability/models/create_alert_config_route_payload.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import pprint
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing_extensions import Annotated, Self
2323

2424
from stackit.observability.models.create_alert_config_route_payload_routes_inner import (
@@ -31,6 +31,11 @@ class CreateAlertConfigRoutePayload(BaseModel):
3131
The root node of the routing tree.
3232
"""
3333

34+
var_continue: Optional[StrictBool] = Field(
35+
default=False,
36+
description="Whether an alert should continue matching subsequent sibling nodes.",
37+
alias="continue",
38+
)
3439
group_by: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
3540
default=None,
3641
description="The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.",
@@ -71,6 +76,7 @@ class CreateAlertConfigRoutePayload(BaseModel):
7176
default=None, description="Zero or more child routes."
7277
)
7378
__properties: ClassVar[List[str]] = [
79+
"continue",
7480
"groupBy",
7581
"groupInterval",
7682
"groupWait",
@@ -139,6 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139145

140146
_obj = cls.model_validate(
141147
{
148+
"continue": obj.get("continue") if obj.get("continue") is not None else False,
142149
"groupBy": obj.get("groupBy"),
143150
"groupInterval": obj.get("groupInterval") if obj.get("groupInterval") is not None else "5m",
144151
"groupWait": obj.get("groupWait") if obj.get("groupWait") is not None else "30s",

services/observability/src/stackit/observability/models/create_alert_config_route_payload_routes_inner.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import pprint
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing_extensions import Annotated, Self
2323

2424

@@ -27,6 +27,7 @@ class CreateAlertConfigRoutePayloadRoutesInner(BaseModel):
2727
As in one level above
2828
"""
2929

30+
var_continue: Optional[StrictBool] = Field(default=False, description="As in one level above", alias="continue")
3031
group_by: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
3132
default=None, alias="groupBy"
3233
)
@@ -38,6 +39,9 @@ class CreateAlertConfigRoutePayloadRoutesInner(BaseModel):
3839
)
3940
match: Optional[Dict[str, Any]] = Field(default=None, description="As in one level above")
4041
match_re: Optional[Dict[str, Any]] = Field(default=None, description="As in one level above", alias="matchRe")
42+
matchers: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
43+
default=None, description="As in one level above"
44+
)
4145
receiver: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=100)]] = Field(
4246
default=None, description="As in one level above"
4347
)
@@ -46,11 +50,13 @@ class CreateAlertConfigRoutePayloadRoutesInner(BaseModel):
4650
)
4751
routes: Optional[List[Dict[str, Any]]] = Field(default=None, description="Another child routes")
4852
__properties: ClassVar[List[str]] = [
53+
"continue",
4954
"groupBy",
5055
"groupInterval",
5156
"groupWait",
5257
"match",
5358
"matchRe",
59+
"matchers",
5460
"receiver",
5561
"repeatInterval",
5662
"routes",
@@ -106,11 +112,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
106112

107113
_obj = cls.model_validate(
108114
{
115+
"continue": obj.get("continue") if obj.get("continue") is not None else False,
109116
"groupBy": obj.get("groupBy"),
110117
"groupInterval": obj.get("groupInterval"),
111118
"groupWait": obj.get("groupWait"),
112119
"match": obj.get("match"),
113120
"matchRe": obj.get("matchRe"),
121+
"matchers": obj.get("matchers"),
114122
"receiver": obj.get("receiver"),
115123
"repeatInterval": obj.get("repeatInterval"),
116124
"routes": obj.get("routes"),

services/observability/src/stackit/observability/models/route.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class Route(BaseModel):
4343
match_re: Optional[Dict[str, Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
4444
default=None, alias="matchRe"
4545
)
46+
matchers: Optional[
47+
Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]], Field(max_length=5)]
48+
] = None
4649
receiver: Annotated[str, Field(min_length=1, strict=True, max_length=200)]
4750
repeat_interval: Optional[Annotated[str, Field(min_length=2, strict=True, max_length=8)]] = Field(
4851
default="4h", alias="repeatInterval"
@@ -55,6 +58,7 @@ class Route(BaseModel):
5558
"groupWait",
5659
"match",
5760
"matchRe",
61+
"matchers",
5862
"receiver",
5963
"repeatInterval",
6064
"routes",
@@ -123,6 +127,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
123127
"groupWait": obj.get("groupWait") if obj.get("groupWait") is not None else "30s",
124128
"match": obj.get("match"),
125129
"matchRe": obj.get("matchRe"),
130+
"matchers": obj.get("matchers"),
126131
"receiver": obj.get("receiver"),
127132
"repeatInterval": obj.get("repeatInterval") if obj.get("repeatInterval") is not None else "4h",
128133
"routes": (

services/observability/src/stackit/observability/models/update_alert_config_route_payload.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import pprint
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing_extensions import Annotated, Self
2323

2424
from stackit.observability.models.create_alert_config_route_payload_routes_inner import (
@@ -31,6 +31,11 @@ class UpdateAlertConfigRoutePayload(BaseModel):
3131
The root node of the routing tree.
3232
"""
3333

34+
var_continue: Optional[StrictBool] = Field(
35+
default=False,
36+
description="Whether an alert should continue matching subsequent sibling nodes.",
37+
alias="continue",
38+
)
3439
group_by: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
3540
default=None,
3641
description="The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.",
@@ -71,6 +76,7 @@ class UpdateAlertConfigRoutePayload(BaseModel):
7176
default=None, description="Zero or more child routes."
7277
)
7378
__properties: ClassVar[List[str]] = [
79+
"continue",
7480
"groupBy",
7581
"groupInterval",
7682
"groupWait",
@@ -139,6 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139145

140146
_obj = cls.model_validate(
141147
{
148+
"continue": obj.get("continue") if obj.get("continue") is not None else False,
142149
"groupBy": obj.get("groupBy"),
143150
"groupInterval": obj.get("groupInterval") if obj.get("groupInterval") is not None else "5m",
144151
"groupWait": obj.get("groupWait") if obj.get("groupWait") is not None else "30s",

services/observability/src/stackit/observability/models/update_alert_configs_payload_route.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import pprint
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing_extensions import Annotated, Self
2323

2424
from stackit.observability.models.create_alert_config_route_payload_routes_inner import (
@@ -31,6 +31,11 @@ class UpdateAlertConfigsPayloadRoute(BaseModel):
3131
The root node of the routing tree.
3232
"""
3333

34+
var_continue: Optional[StrictBool] = Field(
35+
default=False,
36+
description="Whether an alert should continue matching subsequent sibling nodes.",
37+
alias="continue",
38+
)
3439
group_by: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=200)]]] = Field(
3540
default=None,
3641
description="The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.",
@@ -71,6 +76,7 @@ class UpdateAlertConfigsPayloadRoute(BaseModel):
7176
default=None, description="Zero or more child routes."
7277
)
7378
__properties: ClassVar[List[str]] = [
79+
"continue",
7480
"groupBy",
7581
"groupInterval",
7682
"groupWait",
@@ -139,6 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139145

140146
_obj = cls.model_validate(
141147
{
148+
"continue": obj.get("continue") if obj.get("continue") is not None else False,
142149
"groupBy": obj.get("groupBy"),
143150
"groupInterval": obj.get("groupInterval") if obj.get("groupInterval") is not None else "5m",
144151
"groupWait": obj.get("groupWait") if obj.get("groupWait") is not None else "30s",

0 commit comments

Comments
 (0)