From 475ca4f72adb5929d86ab017096ccc6aba6dde32 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 25 Sep 2026 08:05:25 +0000 Subject: [PATCH] Generate dns --- services/dns/oas_commit | 2 +- .../dns/src/stackit/dns/api/default_api.py | 46 +++++++++++-------- .../dns/models/create_label_payload.py | 2 +- .../stackit/dns/models/create_zone_payload.py | 7 +++ services/dns/src/stackit/dns/models/label.py | 2 +- .../dns/models/partial_update_zone_payload.py | 7 +++ services/dns/src/stackit/dns/models/zone.py | 5 ++ 7 files changed, 50 insertions(+), 21 deletions(-) diff --git a/services/dns/oas_commit b/services/dns/oas_commit index 3df2932d2..91696ac38 100644 --- a/services/dns/oas_commit +++ b/services/dns/oas_commit @@ -1 +1 @@ -1fdef398bea59d49731a7d9ac39394ba5b6bb72c +ad4b5e26c0ce59bd8c21d02bd12f1878a1cc650a diff --git a/services/dns/src/stackit/dns/api/default_api.py b/services/dns/src/stackit/dns/api/default_api.py index 8ecf7d8de..272d15ff6 100644 --- a/services/dns/src/stackit/dns/api/default_api.py +++ b/services/dns/src/stackit/dns/api/default_api.py @@ -12,6 +12,7 @@ Do not edit the class manually. """ # noqa: E501 +import warnings from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import ( @@ -363,9 +364,9 @@ def create_label( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateLabelResponse: - """Create or update label + """(Deprecated) Create or update label [DEPRECATED] - Create or update label + Create or update label DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -394,6 +395,7 @@ def create_label( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PUT /v1/projects/{projectId}/zones/{zoneId}/labels is deprecated.", DeprecationWarning) _param = self._create_label_serialize( project_id=project_id, @@ -435,9 +437,9 @@ def create_label_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateLabelResponse]: - """Create or update label + """(Deprecated) Create or update label [DEPRECATED] - Create or update label + Create or update label DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -466,6 +468,7 @@ def create_label_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PUT /v1/projects/{projectId}/zones/{zoneId}/labels is deprecated.", DeprecationWarning) _param = self._create_label_serialize( project_id=project_id, @@ -507,9 +510,9 @@ def create_label_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create or update label + """(Deprecated) Create or update label [DEPRECATED] - Create or update label + Create or update label DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -538,6 +541,7 @@ def create_label_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PUT /v1/projects/{projectId}/zones/{zoneId}/labels is deprecated.", DeprecationWarning) _param = self._create_label_serialize( project_id=project_id, @@ -1464,9 +1468,9 @@ def delete_label( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> DeleteLabelResponse: - """Delete a label + """(Deprecated) Delete a label [DEPRECATED] - Delete a label + Delete a label DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -1495,6 +1499,7 @@ def delete_label( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId}/zones/{zoneId}/labels/{key} is deprecated.", DeprecationWarning) _param = self._delete_label_serialize( project_id=project_id, @@ -1537,9 +1542,9 @@ def delete_label_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[DeleteLabelResponse]: - """Delete a label + """(Deprecated) Delete a label [DEPRECATED] - Delete a label + Delete a label DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -1568,6 +1573,7 @@ def delete_label_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId}/zones/{zoneId}/labels/{key} is deprecated.", DeprecationWarning) _param = self._delete_label_serialize( project_id=project_id, @@ -1610,9 +1616,9 @@ def delete_label_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a label + """(Deprecated) Delete a label [DEPRECATED] - Delete a label + Delete a label DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -1641,6 +1647,7 @@ def delete_label_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId}/zones/{zoneId}/labels/{key} is deprecated.", DeprecationWarning) _param = self._delete_label_serialize( project_id=project_id, @@ -3622,9 +3629,9 @@ def list_labels( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ListLabelsResponse: - """Get all labels + """(Deprecated) Get all labels [DEPRECATED] - All Labels + All Labels DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -3651,6 +3658,7 @@ def list_labels( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/zones/{zoneId}/labels is deprecated.", DeprecationWarning) _param = self._list_labels_serialize( project_id=project_id, @@ -3691,9 +3699,9 @@ def list_labels_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ListLabelsResponse]: - """Get all labels + """(Deprecated) Get all labels [DEPRECATED] - All Labels + All Labels DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -3720,6 +3728,7 @@ def list_labels_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/zones/{zoneId}/labels is deprecated.", DeprecationWarning) _param = self._list_labels_serialize( project_id=project_id, @@ -3760,9 +3769,9 @@ def list_labels_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get all labels + """(Deprecated) Get all labels [DEPRECATED] - All Labels + All Labels DEPRECATED: Scheduled for sunset on 2027-10-01. Use the labelsMap field in the Zone resource instead. :param project_id: project id (required) :type project_id: str @@ -3789,6 +3798,7 @@ def list_labels_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/zones/{zoneId}/labels is deprecated.", DeprecationWarning) _param = self._list_labels_serialize( project_id=project_id, diff --git a/services/dns/src/stackit/dns/models/create_label_payload.py b/services/dns/src/stackit/dns/models/create_label_payload.py index f9bb77a29..b49bdc39b 100644 --- a/services/dns/src/stackit/dns/models/create_label_payload.py +++ b/services/dns/src/stackit/dns/models/create_label_payload.py @@ -28,7 +28,7 @@ class CreateLabelPayload(BaseModel): CreateLabelPayload """ # noqa: E501 - key: Annotated[str, Field(min_length=1, strict=True, max_length=63)] + key: Annotated[str, Field(min_length=1, strict=True, max_length=314)] value: Optional[Annotated[str, Field(strict=True, max_length=63)]] = None __properties: ClassVar[List[str]] = ["key", "value"] diff --git a/services/dns/src/stackit/dns/models/create_zone_payload.py b/services/dns/src/stackit/dns/models/create_zone_payload.py index 442d4fcc6..5b962a0cd 100644 --- a/services/dns/src/stackit/dns/models/create_zone_payload.py +++ b/services/dns/src/stackit/dns/models/create_zone_payload.py @@ -60,6 +60,11 @@ class CreateZonePayload(BaseModel): is_reverse_zone: Optional[StrictBool] = Field( default=False, description="if the zone is a reverse zone or not", alias="isReverseZone" ) + labels_map: Optional[Dict[str, StrictStr]] = Field( + default=None, + description="labels for the zone - max 64 items. Keys: 1-314 chars (up to 250 prefix, 1 for slash, 1-63 the actual key). Values: 0-63 chars.", + alias="labelsMap", + ) name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(description="user given name") negative_cache: Optional[Annotated[int, Field(strict=True, ge=60)]] = Field( default=None, description="negative caching", alias="negativeCache" @@ -81,6 +86,7 @@ class CreateZonePayload(BaseModel): "expireTime", "extensions", "isReverseZone", + "labelsMap", "name", "negativeCache", "primaries", @@ -164,6 +170,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: ZoneExtensions.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None ), "isReverseZone": obj.get("isReverseZone") if obj.get("isReverseZone") is not None else False, + "labelsMap": obj.get("labelsMap"), "name": obj.get("name"), "negativeCache": obj.get("negativeCache"), "primaries": obj.get("primaries"), diff --git a/services/dns/src/stackit/dns/models/label.py b/services/dns/src/stackit/dns/models/label.py index d5a477dba..8e7e76cf6 100644 --- a/services/dns/src/stackit/dns/models/label.py +++ b/services/dns/src/stackit/dns/models/label.py @@ -28,7 +28,7 @@ class Label(BaseModel): Label """ # noqa: E501 - key: Annotated[str, Field(min_length=1, strict=True, max_length=63)] + key: Annotated[str, Field(min_length=1, strict=True, max_length=314)] value: Optional[Annotated[str, Field(strict=True, max_length=63)]] = None __properties: ClassVar[List[str]] = ["key", "value"] diff --git a/services/dns/src/stackit/dns/models/partial_update_zone_payload.py b/services/dns/src/stackit/dns/models/partial_update_zone_payload.py index bbc9baab2..bd8690f7b 100644 --- a/services/dns/src/stackit/dns/models/partial_update_zone_payload.py +++ b/services/dns/src/stackit/dns/models/partial_update_zone_payload.py @@ -47,6 +47,11 @@ class PartialUpdateZonePayload(BaseModel): default=1209600, description="expire time", alias="expireTime" ) extensions: Optional[ZoneExtensions] = Field(default=None, description="optional extensions") + labels_map: Optional[Dict[str, StrictStr]] = Field( + default=None, + description="labels for the zone - max 64 items. Keys: 1-314 chars (up to 250 prefix, 1 for slash, 1-63 the actual key). Values: 0-63 chars.", + alias="labelsMap", + ) name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=63)]] = Field( default=None, description="user given name" ) @@ -67,6 +72,7 @@ class PartialUpdateZonePayload(BaseModel): "description", "expireTime", "extensions", + "labelsMap", "name", "negativeCache", "primaries", @@ -137,6 +143,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "extensions": ( ZoneExtensions.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None ), + "labelsMap": obj.get("labelsMap"), "name": obj.get("name"), "negativeCache": obj.get("negativeCache"), "primaries": obj.get("primaries"), diff --git a/services/dns/src/stackit/dns/models/zone.py b/services/dns/src/stackit/dns/models/zone.py index 781413f38..75a23377e 100644 --- a/services/dns/src/stackit/dns/models/zone.py +++ b/services/dns/src/stackit/dns/models/zone.py @@ -67,6 +67,9 @@ class Zone(BaseModel): default=None, description="if the zone is a reverse zone or not", alias="isReverseZone" ) labels: Optional[List[Label]] = None + labels_map: Optional[Dict[str, StrictStr]] = Field( + default=None, description="labels for the zone", alias="labelsMap" + ) name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(description="user given name") negative_cache: Annotated[int, Field(le=99999999, strict=True, ge=60)] = Field( description="negative caching", alias="negativeCache" @@ -105,6 +108,7 @@ class Zone(BaseModel): "id", "isReverseZone", "labels", + "labelsMap", "name", "negativeCache", "primaries", @@ -233,6 +237,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": ( [Label.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None ), + "labelsMap": obj.get("labelsMap"), "name": obj.get("name"), "negativeCache": obj.get("negativeCache"), "primaries": obj.get("primaries"),