Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ad06bb

Browse files
Generator: Update SDK /services/cdn (#2275)
* Generate cdn* Generate stackitmarketplace* Add changelogSigned-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>---------Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parentcf47200 commit4ad06bb

21 files changed

+714
-25
lines changed

‎CHANGELOG.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
##Release (2025-MM-DD)
2+
-`cdn`:[v1.6.0](services/cdn/CHANGELOG.md#v160)
3+
-**Feature:** Added Attribute`LogSink` to`ConfigPatch`
4+
-**Feature:** Added Attribute`Geofencing` to`DistributionPayload`,`HttpBackend` and`HttpBackendPatch`
5+
-**Feature:** Added new function`GetLogsSearchFilters`
26
-`modelserving`:[v0.2.1](services/modelserving/CHANGELOG.md#v021)
37
-**Feature:** Extend enums in field`type` in model`Model`:`audio`,`image`
48
-`objectstorage`:[v1.2.0](services/objectstorage/CHANGELOG.md#v120)
@@ -23,8 +27,11 @@
2327
-**Feature:** Add new field`kubernetes` to`Nodepool` model
2428
-`serviceaccount`:[v0.4.1](services/serviceaccount/CHANGELOG.md#v041)
2529
-**Improvement:** Improve error handling for`CreateShortLivedAccessToken`
26-
-`stackitmarketplace`:[v1.8.0](services/stackitmarketplace/CHANGELOG.md#v180)
27-
-**Feature:** Add new field`free_trial` in`CatalogProductOverview` model
30+
-`stackitmarketplace`:
31+
-[v1.9.0](services/stackitmarketplace/CHANGELOG.md#v190)
32+
-**Feature:** Added`RequestPrivatePlan` to`InquiriesCreateInquiryPayload`
33+
-[v1.8.0](services/stackitmarketplace/CHANGELOG.md#v180)
34+
-**Feature:** Add new field`free_trial` in`CatalogProductOverview` model
2835

2936
##Release (2025-08-29)
3037
-`kms`:[v0.3.0](services/kms/CHANGELOG.md#v030)

‎services/cdn/CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##v1.6.0
2+
-**Feature:** Added Attribute`LogSink` to`ConfigPatch`
3+
-**Feature:** Added Attribute`Geofencing` to`DistributionPayload`,`HttpBackend` and`HttpBackendPatch`
4+
-**Feature:** Added new function`GetLogsSearchFilters`
5+
16
##v1.5.0
27
-**Feature:** Added new filter functions`DataCenterRegion`,`RequestCountryCode`,`StatusCode` and`CacheHit`
38
-**Feature:** Added Attribute`LogSink` and`Certificate`

‎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.5.0"
6+
version ="v1.6.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"GetCustomDomainResponseCertificate",
5555
"GetDistributionResponse",
5656
"GetLogsResponse",
57+
"GetLogsSearchFiltersResponse",
5758
"GetStatisticsResponse",
5859
"HttpBackend",
5960
"HttpBackendPatch",
@@ -152,6 +153,9 @@
152153
GetDistributionResponseasGetDistributionResponse,
153154
)
154155
fromstackit.cdn.models.get_logs_responseimportGetLogsResponseasGetLogsResponse
156+
fromstackit.cdn.models.get_logs_search_filters_responseimport (
157+
GetLogsSearchFiltersResponseasGetLogsSearchFiltersResponse,
158+
)
155159
fromstackit.cdn.models.get_statistics_responseimport (
156160
GetStatisticsResponseasGetStatisticsResponse,
157161
)

‎services/cdn/src/stackit/cdn/api/default_api.py‎

Lines changed: 291 additions & 6 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
)
5757
fromstackit.cdn.models.get_distribution_responseimportGetDistributionResponse
5858
fromstackit.cdn.models.get_logs_responseimportGetLogsResponse
59+
fromstackit.cdn.models.get_logs_search_filters_responseimport (
60+
GetLogsSearchFiltersResponse,
61+
)
5962
fromstackit.cdn.models.get_statistics_responseimportGetStatisticsResponse
6063
fromstackit.cdn.models.http_backendimportHttpBackend
6164
fromstackit.cdn.models.http_backend_patchimportHttpBackendPatch

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
fromstackit.cdn.models.http_backend_patchimportHttpBackendPatch
2424
fromstackit.cdn.models.optimizer_patchimportOptimizerPatch
25+
fromstackit.cdn.models.patch_loki_log_sinkimportPatchLokiLogSink
2526
fromstackit.cdn.models.regionimportRegion
2627

2728

@@ -46,6 +47,7 @@ class ConfigPatch(BaseModel):
4647
description="Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) ",
4748
alias="defaultCacheDuration",
4849
)
50+
log_sink:Optional[PatchLokiLogSink]=Field(default=None,alias="logSink")
4951
monthly_limit_bytes:Optional[Annotated[int,Field(strict=True,ge=0)]]=Field(
5052
default=None,
5153
description="Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. ",
@@ -58,6 +60,7 @@ class ConfigPatch(BaseModel):
5860
"blockedCountries",
5961
"blockedIPs",
6062
"defaultCacheDuration",
63+
"logSink",
6164
"monthlyLimitBytes",
6265
"optimizer",
6366
"regions",
@@ -103,6 +106,9 @@ def to_dict(self) -> Dict[str, Any]:
103106
# override the default output from pydantic by calling `to_dict()` of backend
104107
ifself.backend:
105108
_dict["backend"]=self.backend.to_dict()
109+
# override the default output from pydantic by calling `to_dict()` of log_sink
110+
ifself.log_sink:
111+
_dict["logSink"]=self.log_sink.to_dict()
106112
# override the default output from pydantic by calling `to_dict()` of optimizer
107113
ifself.optimizer:
108114
_dict["optimizer"]=self.optimizer.to_dict()
@@ -111,6 +117,11 @@ def to_dict(self) -> Dict[str, Any]:
111117
ifself.default_cache_durationisNoneand"default_cache_duration"inself.model_fields_set:
112118
_dict["defaultCacheDuration"]=None
113119

120+
# set to None if log_sink (nullable) is None
121+
# and model_fields_set contains the field
122+
ifself.log_sinkisNoneand"log_sink"inself.model_fields_set:
123+
_dict["logSink"]=None
124+
114125
# set to None if monthly_limit_bytes (nullable) is None
115126
# and model_fields_set contains the field
116127
ifself.monthly_limit_bytesisNoneand"monthly_limit_bytes"inself.model_fields_set:
@@ -133,6 +144,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
133144
"blockedCountries":obj.get("blockedCountries"),
134145
"blockedIPs":obj.get("blockedIPs"),
135146
"defaultCacheDuration":obj.get("defaultCacheDuration"),
147+
"logSink":PatchLokiLogSink.from_dict(obj["logSink"])ifobj.get("logSink")isnotNoneelseNone,
136148
"monthlyLimitBytes":obj.get("monthlyLimitBytes"),
137149
"optimizer":OptimizerPatch.from_dict(obj["optimizer"])ifobj.get("optimizer")isnotNoneelseNone,
138150
"regions":obj.get("regions"),

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class CreateDistributionPayload(BaseModel):
4545
description="Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) ",
4646
alias="defaultCacheDuration",
4747
)
48+
geofencing:Optional[Dict[str,List[StrictStr]]]=Field(
49+
default=None,
50+
description="An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You can not have a country be assigned to multiple alternative origins. ",
51+
)
4852
intent_id:Optional[StrictStr]=Field(
4953
default=None,
5054
description="While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple POST-Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. ",
@@ -73,6 +77,7 @@ class CreateDistributionPayload(BaseModel):
7377
"blockedCountries",
7478
"blockedIPs",
7579
"defaultCacheDuration",
80+
"geofencing",
7681
"intentId",
7782
"logSink",
7883
"monthlyLimitBytes",
@@ -141,6 +146,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
141146
"blockedCountries":obj.get("blockedCountries"),
142147
"blockedIPs":obj.get("blockedIPs"),
143148
"defaultCacheDuration":obj.get("defaultCacheDuration"),
149+
"geofencing":obj.get("geofencing"),
144150
"intentId":obj.get("intentId"),
145151
"logSink":PatchLokiLogSink.from_dict(obj["logSink"])ifobj.get("logSink")isnotNoneelseNone,
146152
"monthlyLimitBytes":obj.get("monthlyLimitBytes"),
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
13+
14+
from __future__importannotations
15+
16+
importjson
17+
importpprint
18+
fromtypingimportAny,ClassVar,Dict,List,Optional,Set
19+
20+
frompydanticimportBaseModel,ConfigDict,StrictStr
21+
fromtyping_extensionsimportSelf
22+
23+
24+
classGetLogsSearchFiltersResponse(BaseModel):
25+
"""
26+
GetLogsSearchFiltersResponse
27+
"""# noqa: E501
28+
29+
filters:List[StrictStr]
30+
__properties:ClassVar[List[str]]= ["filters"]
31+
32+
model_config=ConfigDict(
33+
populate_by_name=True,
34+
validate_assignment=True,
35+
protected_namespaces=(),
36+
)
37+
38+
defto_str(self)->str:
39+
"""Returns the string representation of the model using alias"""
40+
returnpprint.pformat(self.model_dump(by_alias=True))
41+
42+
defto_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+
returnjson.dumps(self.to_dict())
46+
47+
@classmethod
48+
deffrom_json(cls,json_str:str)->Optional[Self]:
49+
"""Create an instance of GetLogsSearchFiltersResponse from a JSON string"""
50+
returncls.from_dict(json.loads(json_str))
51+
52+
defto_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+
deffrom_dict(cls,obj:Optional[Dict[str,Any]])->Optional[Self]:
73+
"""Create an instance of GetLogsSearchFiltersResponse from a dict"""
74+
ifobjisNone:
75+
returnNone
76+
77+
ifnotisinstance(obj,dict):
78+
returncls.model_validate(obj)
79+
80+
_obj=cls.model_validate({"filters":obj.get("filters")})
81+
return_obj

‎services/cdn/src/stackit/cdn/models/http_backend.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ class HttpBackend(BaseModel):
2626
HttpBackend
2727
"""# noqa: E501
2828

29+
geofencing:Dict[str,List[StrictStr]]=Field(
30+
description="An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. "
31+
)
2932
origin_request_headers:Dict[str,StrictStr]=Field(
3033
description="Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. ",
3134
alias="originRequestHeaders",
3235
)
3336
origin_url:StrictStr=Field(alias="originUrl")
3437
type:StrictStr
35-
__properties:ClassVar[List[str]]= ["originRequestHeaders","originUrl","type"]
38+
__properties:ClassVar[List[str]]= ["geofencing","originRequestHeaders","originUrl","type"]
3639

3740
model_config=ConfigDict(
3841
populate_by_name=True,
@@ -84,6 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8487

8588
_obj=cls.model_validate(
8689
{
90+
"geofencing":obj.get("geofencing"),
8791
"originRequestHeaders":obj.get("originRequestHeaders"),
8892
"originUrl":obj.get("originUrl"),
8993
"type":obj.get("type"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp