Skip to content

Commit 9fe66f4

Browse files
authored
Merge branch 'main' into generator-bot-15276090541/observability
2 parents f44be09 + 64be749 commit 9fe66f4

File tree

12 files changed

+217
-4
lines changed

12 files changed

+217
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
- **Feature:** Added `ClusterError`
2626
- `sqlserverflex`: [v1.0.2](services/sqlserverflex/CHANGELOG.md#v102-2025-05-14)
2727
- **Feature:** Added new method `list_metrics`
28+
- `cdn`: [v1.1.0](services/cdn/CHANGELOG.md#v110-2025-05-27)
29+
- **Feature:** Add support for CDN Optimizer feature
30+
- `observability`: [v0.5.0](services/observability/CHANGELOG.md#v050-2025-05-27)
31+
- **Feature:** Add support for `matchers` to route
32+
- **Feature:** Add support for `priority levels`, `sendResolved`, `continue` to alert config models
2833

2934
## Release (2025-05-09)
3035
- `stackitmarketplace`:

services/cdn/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.1.0 (2025-05-27)
2+
- **Feature:** Add support for CDN Optimizer feature
3+
14
## v1.0.1 (2025-05-09)
25
- **Feature:** Update user-agent header
36

services/cdn/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-cdn"
33

44
[tool.poetry]
55
name = "stackit-cdn"
6-
version = "v1.0.1"
6+
version = "v1.1.0"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/cdn/src/stackit/cdn/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
from stackit.cdn.models.http_backend import HttpBackend
7373
from stackit.cdn.models.http_backend_patch import HttpBackendPatch
7474
from stackit.cdn.models.list_distributions_response import ListDistributionsResponse
75+
from stackit.cdn.models.optimizer import Optimizer
76+
from stackit.cdn.models.optimizer_patch import OptimizerPatch
7577
from stackit.cdn.models.patch_distribution_payload import PatchDistributionPayload
7678
from stackit.cdn.models.patch_distribution_response import PatchDistributionResponse
7779
from stackit.cdn.models.purge_cache_payload import PurgeCachePayload

services/cdn/src/stackit/cdn/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
from stackit.cdn.models.http_backend import HttpBackend
5454
from stackit.cdn.models.http_backend_patch import HttpBackendPatch
5555
from stackit.cdn.models.list_distributions_response import ListDistributionsResponse
56+
from stackit.cdn.models.optimizer import Optimizer
57+
from stackit.cdn.models.optimizer_patch import OptimizerPatch
5658
from stackit.cdn.models.patch_distribution_payload import PatchDistributionPayload
5759
from stackit.cdn.models.patch_distribution_response import PatchDistributionResponse
5860
from stackit.cdn.models.purge_cache_payload import PurgeCachePayload

services/cdn/src/stackit/cdn/models/config.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from typing_extensions import Annotated, Self
2222

2323
from stackit.cdn.models.config_backend import ConfigBackend
24+
from stackit.cdn.models.optimizer import Optimizer
2425
from stackit.cdn.models.region import Region
2526

2627

@@ -43,8 +44,16 @@ class Config(BaseModel):
4344
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
4445
alias="monthlyLimitBytes",
4546
)
47+
optimizer: Optional[Optimizer] = None
4648
regions: Annotated[List[Region], Field(min_length=1)]
47-
__properties: ClassVar[List[str]] = ["backend", "blockedCountries", "blockedIPs", "monthlyLimitBytes", "regions"]
49+
__properties: ClassVar[List[str]] = [
50+
"backend",
51+
"blockedCountries",
52+
"blockedIPs",
53+
"monthlyLimitBytes",
54+
"optimizer",
55+
"regions",
56+
]
4857

4958
model_config = ConfigDict(
5059
populate_by_name=True,
@@ -86,6 +95,9 @@ def to_dict(self) -> Dict[str, Any]:
8695
# override the default output from pydantic by calling `to_dict()` of backend
8796
if self.backend:
8897
_dict["backend"] = self.backend.to_dict()
98+
# override the default output from pydantic by calling `to_dict()` of optimizer
99+
if self.optimizer:
100+
_dict["optimizer"] = self.optimizer.to_dict()
89101
# set to None if monthly_limit_bytes (nullable) is None
90102
# and model_fields_set contains the field
91103
if self.monthly_limit_bytes is None and "monthly_limit_bytes" in self.model_fields_set:
@@ -108,6 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
108120
"blockedCountries": obj.get("blockedCountries"),
109121
"blockedIPs": obj.get("blockedIPs"),
110122
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
123+
"optimizer": Optimizer.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
111124
"regions": obj.get("regions"),
112125
}
113126
)

services/cdn/src/stackit/cdn/models/config_patch.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from typing_extensions import Annotated, Self
2222

2323
from stackit.cdn.models.config_patch_backend import ConfigPatchBackend
24+
from stackit.cdn.models.optimizer_patch import OptimizerPatch
2425
from stackit.cdn.models.region import Region
2526

2627

@@ -45,8 +46,16 @@ class ConfigPatch(BaseModel):
4546
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
4647
alias="monthlyLimitBytes",
4748
)
49+
optimizer: Optional[OptimizerPatch] = None
4850
regions: Optional[Annotated[List[Region], Field(min_length=1)]] = None
49-
__properties: ClassVar[List[str]] = ["backend", "blockedCountries", "blockedIPs", "monthlyLimitBytes", "regions"]
51+
__properties: ClassVar[List[str]] = [
52+
"backend",
53+
"blockedCountries",
54+
"blockedIPs",
55+
"monthlyLimitBytes",
56+
"optimizer",
57+
"regions",
58+
]
5059

5160
model_config = ConfigDict(
5261
populate_by_name=True,
@@ -88,6 +97,9 @@ def to_dict(self) -> Dict[str, Any]:
8897
# override the default output from pydantic by calling `to_dict()` of backend
8998
if self.backend:
9099
_dict["backend"] = self.backend.to_dict()
100+
# override the default output from pydantic by calling `to_dict()` of optimizer
101+
if self.optimizer:
102+
_dict["optimizer"] = self.optimizer.to_dict()
91103
# set to None if monthly_limit_bytes (nullable) is None
92104
# and model_fields_set contains the field
93105
if self.monthly_limit_bytes is None and "monthly_limit_bytes" in self.model_fields_set:
@@ -110,6 +122,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
110122
"blockedCountries": obj.get("blockedCountries"),
111123
"blockedIPs": obj.get("blockedIPs"),
112124
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
125+
"optimizer": OptimizerPatch.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
113126
"regions": obj.get("regions"),
114127
}
115128
)

services/cdn/src/stackit/cdn/models/create_distribution_payload.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2121
from typing_extensions import Annotated, Self
2222

23+
from stackit.cdn.models.optimizer import Optimizer
2324
from stackit.cdn.models.region import Region
2425

2526

@@ -48,6 +49,7 @@ class CreateDistributionPayload(BaseModel):
4849
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
4950
alias="monthlyLimitBytes",
5051
)
52+
optimizer: Optional[Optimizer] = None
5153
origin_request_headers: Optional[Dict[str, StrictStr]] = Field(
5254
default=None,
5355
description="Headers that will be sent with every request to the configured origin. WARNING: Do not store sensitive values in the headers. The data is stores as plain text. ",
@@ -65,6 +67,7 @@ class CreateDistributionPayload(BaseModel):
6567
"blockedIPs",
6668
"intentId",
6769
"monthlyLimitBytes",
70+
"optimizer",
6871
"originRequestHeaders",
6972
"originUrl",
7073
"regions",
@@ -107,6 +110,9 @@ def to_dict(self) -> Dict[str, Any]:
107110
exclude=excluded_fields,
108111
exclude_none=True,
109112
)
113+
# override the default output from pydantic by calling `to_dict()` of optimizer
114+
if self.optimizer:
115+
_dict["optimizer"] = self.optimizer.to_dict()
110116
return _dict
111117

112118
@classmethod
@@ -124,6 +130,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
124130
"blockedIPs": obj.get("blockedIPs"),
125131
"intentId": obj.get("intentId"),
126132
"monthlyLimitBytes": obj.get("monthlyLimitBytes"),
133+
"optimizer": Optimizer.from_dict(obj["optimizer"]) if obj.get("optimizer") is not None else None,
127134
"originRequestHeaders": obj.get("originRequestHeaders"),
128135
"originUrl": obj.get("originUrl"),
129136
"regions": obj.get("regions"),
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# coding: utf-8
2+
3+
"""
4+
CDN API
5+
6+
API used to create and manage your CDN distributions.
7+
8+
The version of the OpenAPI document: 1beta.0.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501 docstring might be too long
13+
14+
from __future__ import annotations
15+
16+
import json
17+
import pprint
18+
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
20+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
21+
from typing_extensions import Self
22+
23+
24+
class Optimizer(BaseModel):
25+
"""
26+
Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery.
27+
"""
28+
29+
enabled: StrictBool = Field(
30+
description="Determines if the optimizer should be enabled for this distribution and incurs a monthly fee"
31+
)
32+
__properties: ClassVar[List[str]] = ["enabled"]
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 Optimizer 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 Optimizer 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({"enabled": obj.get("enabled")})
83+
return _obj
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# coding: utf-8
2+
3+
"""
4+
CDN API
5+
6+
API used to create and manage your CDN distributions.
7+
8+
The version of the OpenAPI document: 1beta.0.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501 docstring might be too long
13+
14+
from __future__ import annotations
15+
16+
import json
17+
import pprint
18+
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
20+
from pydantic import BaseModel, ConfigDict, StrictBool
21+
from typing_extensions import Self
22+
23+
24+
class OptimizerPatch(BaseModel):
25+
"""
26+
OptimizerPatch
27+
"""
28+
29+
enabled: Optional[StrictBool] = None
30+
__properties: ClassVar[List[str]] = ["enabled"]
31+
32+
model_config = ConfigDict(
33+
populate_by_name=True,
34+
validate_assignment=True,
35+
protected_namespaces=(),
36+
)
37+
38+
def to_str(self) -> str:
39+
"""Returns the string representation of the model using alias"""
40+
return pprint.pformat(self.model_dump(by_alias=True))
41+
42+
def to_json(self) -> str:
43+
"""Returns the JSON representation of the model using alias"""
44+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
45+
return json.dumps(self.to_dict())
46+
47+
@classmethod
48+
def from_json(cls, json_str: str) -> Optional[Self]:
49+
"""Create an instance of OptimizerPatch from a JSON string"""
50+
return cls.from_dict(json.loads(json_str))
51+
52+
def to_dict(self) -> Dict[str, Any]:
53+
"""Return the dictionary representation of the model using alias.
54+
55+
This has the following differences from calling pydantic's
56+
`self.model_dump(by_alias=True)`:
57+
58+
* `None` is only added to the output dict for nullable fields that
59+
were set at model initialization. Other fields with value `None`
60+
are ignored.
61+
"""
62+
excluded_fields: Set[str] = set([])
63+
64+
_dict = self.model_dump(
65+
by_alias=True,
66+
exclude=excluded_fields,
67+
exclude_none=True,
68+
)
69+
return _dict
70+
71+
@classmethod
72+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
73+
"""Create an instance of OptimizerPatch from a dict"""
74+
if obj is None:
75+
return None
76+
77+
if not isinstance(obj, dict):
78+
return cls.model_validate(obj)
79+
80+
_obj = cls.model_validate({"enabled": obj.get("enabled")})
81+
return _obj

services/observability/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v0.5.0 (2025-05-27)
2+
- **Feature:** Add support for `matchers` to route
3+
- **Feature:** Add support for `priority levels`, `sendResolved`, `continue` to alert config models
4+
15
## v0.4.1 (2025-05-09)
26
- **Feature:** Update user-agent header
37

services/observability/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-observability"
33

44
[tool.poetry]
55
name = "stackit-observability"
6-
version = "v0.4.1"
6+
version = "v0.5.0"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

0 commit comments

Comments
 (0)