From c7395483e81889d466203b7bfa9e742ad839eb55 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 7 Oct 2026 07:47:10 +0000 Subject: [PATCH] Generate dns --- services/dns/oas_commit | 2 +- .../dns/src/stackit/dns/api/default_api.py | 94 ++++++++++++------- .../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 | 13 ++- services/dns/src/stackit/dns/models/zone.py | 5 + 7 files changed, 83 insertions(+), 42 deletions(-) diff --git a/services/dns/oas_commit b/services/dns/oas_commit index 3df2932d2..fa742ff4a 100644 --- a/services/dns/oas_commit +++ b/services/dns/oas_commit @@ -1 +1 @@ -1fdef398bea59d49731a7d9ac39394ba5b6bb72c +7fd0fb8e513021dfbad1f5ee736785ec72987b40 diff --git a/services/dns/src/stackit/dns/api/default_api.py b/services/dns/src/stackit/dns/api/default_api.py index 8ecf7d8de..9331069f9 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, @@ -3875,7 +3885,9 @@ def list_record_sets( name_eq: Annotated[Optional[StrictStr], Field(description="filter name equal")] = None, name_like: Annotated[Optional[StrictStr], Field(description="filter name like")] = None, type_eq: Annotated[Optional[StrictStr], Field(description="filter type")] = None, - state_eq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, + state_eq: Annotated[ + Optional[StrictStr], Field(description="filter state (DELETE_SUCCEEDED is excluded by default)") + ] = None, state_neq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, active_eq: Annotated[Optional[StrictBool], Field(description="filter active equal")] = None, creation_started_gt: Annotated[ @@ -3948,7 +3960,7 @@ def list_record_sets( ) -> ListRecordSetsResponse: """All get selected RRSets - All RRSet + Retrieve all RRSets. By default, records in the 'DELETE_SUCCEEDED' state are excluded. To retrieve them, explicitly specify 'state[eq]=DELETE_SUCCEEDED' in the query parameters. :param project_id: project id (required) :type project_id: str @@ -3964,7 +3976,7 @@ def list_record_sets( :type name_like: str :param type_eq: filter type :type type_eq: str - :param state_eq: filter state + :param state_eq: filter state (DELETE_SUCCEEDED is excluded by default) :type state_eq: str :param state_neq: filter state :type state_neq: str @@ -4107,7 +4119,9 @@ def list_record_sets_with_http_info( name_eq: Annotated[Optional[StrictStr], Field(description="filter name equal")] = None, name_like: Annotated[Optional[StrictStr], Field(description="filter name like")] = None, type_eq: Annotated[Optional[StrictStr], Field(description="filter type")] = None, - state_eq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, + state_eq: Annotated[ + Optional[StrictStr], Field(description="filter state (DELETE_SUCCEEDED is excluded by default)") + ] = None, state_neq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, active_eq: Annotated[Optional[StrictBool], Field(description="filter active equal")] = None, creation_started_gt: Annotated[ @@ -4180,7 +4194,7 @@ def list_record_sets_with_http_info( ) -> ApiResponse[ListRecordSetsResponse]: """All get selected RRSets - All RRSet + Retrieve all RRSets. By default, records in the 'DELETE_SUCCEEDED' state are excluded. To retrieve them, explicitly specify 'state[eq]=DELETE_SUCCEEDED' in the query parameters. :param project_id: project id (required) :type project_id: str @@ -4196,7 +4210,7 @@ def list_record_sets_with_http_info( :type name_like: str :param type_eq: filter type :type type_eq: str - :param state_eq: filter state + :param state_eq: filter state (DELETE_SUCCEEDED is excluded by default) :type state_eq: str :param state_neq: filter state :type state_neq: str @@ -4339,7 +4353,9 @@ def list_record_sets_without_preload_content( name_eq: Annotated[Optional[StrictStr], Field(description="filter name equal")] = None, name_like: Annotated[Optional[StrictStr], Field(description="filter name like")] = None, type_eq: Annotated[Optional[StrictStr], Field(description="filter type")] = None, - state_eq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, + state_eq: Annotated[ + Optional[StrictStr], Field(description="filter state (DELETE_SUCCEEDED is excluded by default)") + ] = None, state_neq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, active_eq: Annotated[Optional[StrictBool], Field(description="filter active equal")] = None, creation_started_gt: Annotated[ @@ -4412,7 +4428,7 @@ def list_record_sets_without_preload_content( ) -> RESTResponseType: """All get selected RRSets - All RRSet + Retrieve all RRSets. By default, records in the 'DELETE_SUCCEEDED' state are excluded. To retrieve them, explicitly specify 'state[eq]=DELETE_SUCCEEDED' in the query parameters. :param project_id: project id (required) :type project_id: str @@ -4428,7 +4444,7 @@ def list_record_sets_without_preload_content( :type name_like: str :param type_eq: filter type :type type_eq: str - :param state_eq: filter state + :param state_eq: filter state (DELETE_SUCCEEDED is excluded by default) :type state_eq: str :param state_neq: filter state :type state_neq: str @@ -4785,7 +4801,9 @@ def list_zones( description_eq: Annotated[Optional[StrictStr], Field(description="filter description equal")] = None, description_neq: Annotated[Optional[StrictStr], Field(description="filter description not equal")] = None, description_like: Annotated[Optional[StrictStr], Field(description="filter description like")] = None, - state_eq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, + state_eq: Annotated[ + Optional[StrictStr], Field(description="filter state (DELETE_SUCCEEDED is excluded by default)") + ] = None, state_neq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, primary_name_server_eq: Annotated[ Optional[StrictStr], Field(description="filter primary name server equal") @@ -4872,7 +4890,7 @@ def list_zones( ) -> ListZonesResponse: """All get selected zones - All zone + Retrieve all zones. By default, zones in the 'DELETE_SUCCEEDED' state are excluded. To retrieve them, explicitly specify 'state[eq]=DELETE_SUCCEEDED' in the query parameters. :param project_id: project id (required) :type project_id: str @@ -4898,7 +4916,7 @@ def list_zones( :type description_neq: str :param description_like: filter description like :type description_like: str - :param state_eq: filter state + :param state_eq: filter state (DELETE_SUCCEEDED is excluded by default) :type state_eq: str :param state_neq: filter state :type state_neq: str @@ -5069,7 +5087,9 @@ def list_zones_with_http_info( description_eq: Annotated[Optional[StrictStr], Field(description="filter description equal")] = None, description_neq: Annotated[Optional[StrictStr], Field(description="filter description not equal")] = None, description_like: Annotated[Optional[StrictStr], Field(description="filter description like")] = None, - state_eq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, + state_eq: Annotated[ + Optional[StrictStr], Field(description="filter state (DELETE_SUCCEEDED is excluded by default)") + ] = None, state_neq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, primary_name_server_eq: Annotated[ Optional[StrictStr], Field(description="filter primary name server equal") @@ -5156,7 +5176,7 @@ def list_zones_with_http_info( ) -> ApiResponse[ListZonesResponse]: """All get selected zones - All zone + Retrieve all zones. By default, zones in the 'DELETE_SUCCEEDED' state are excluded. To retrieve them, explicitly specify 'state[eq]=DELETE_SUCCEEDED' in the query parameters. :param project_id: project id (required) :type project_id: str @@ -5182,7 +5202,7 @@ def list_zones_with_http_info( :type description_neq: str :param description_like: filter description like :type description_like: str - :param state_eq: filter state + :param state_eq: filter state (DELETE_SUCCEEDED is excluded by default) :type state_eq: str :param state_neq: filter state :type state_neq: str @@ -5353,7 +5373,9 @@ def list_zones_without_preload_content( description_eq: Annotated[Optional[StrictStr], Field(description="filter description equal")] = None, description_neq: Annotated[Optional[StrictStr], Field(description="filter description not equal")] = None, description_like: Annotated[Optional[StrictStr], Field(description="filter description like")] = None, - state_eq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, + state_eq: Annotated[ + Optional[StrictStr], Field(description="filter state (DELETE_SUCCEEDED is excluded by default)") + ] = None, state_neq: Annotated[Optional[StrictStr], Field(description="filter state")] = None, primary_name_server_eq: Annotated[ Optional[StrictStr], Field(description="filter primary name server equal") @@ -5440,7 +5462,7 @@ def list_zones_without_preload_content( ) -> RESTResponseType: """All get selected zones - All zone + Retrieve all zones. By default, zones in the 'DELETE_SUCCEEDED' state are excluded. To retrieve them, explicitly specify 'state[eq]=DELETE_SUCCEEDED' in the query parameters. :param project_id: project id (required) :type project_id: str @@ -5466,7 +5488,7 @@ def list_zones_without_preload_content( :type description_neq: str :param description_like: filter description like :type description_like: str - :param state_eq: filter state + :param state_eq: filter state (DELETE_SUCCEEDED is excluded by default) :type state_eq: str :param state_neq: filter state :type state_neq: str 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..70ceedb07 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 @@ -22,7 +22,7 @@ from pydantic_core import to_jsonable_python from typing_extensions import Annotated, Self -from stackit.dns.models.zone_extensions import ZoneExtensions +from stackit.dns.models.domain_extensions import DomainExtensions class PartialUpdateZonePayload(BaseModel): @@ -46,7 +46,12 @@ class PartialUpdateZonePayload(BaseModel): expire_time: Optional[Annotated[int, Field(strict=True, ge=60)]] = Field( default=1209600, description="expire time", alias="expireTime" ) - extensions: Optional[ZoneExtensions] = Field(default=None, description="optional extensions") + extensions: Optional[DomainExtensions] = 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", @@ -135,8 +141,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "expireTime": obj.get("expireTime") if obj.get("expireTime") is not None else 1209600, "extensions": ( - ZoneExtensions.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None + DomainExtensions.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"),