Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/dns/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1fdef398bea59d49731a7d9ac39394ba5b6bb72c
ad4b5e26c0ce59bd8c21d02bd12f1878a1cc650a
46 changes: 28 additions & 18 deletions services/dns/src/stackit/dns/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
7 changes: 7 additions & 0 deletions services/dns/src/stackit/dns/models/create_zone_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -81,6 +86,7 @@ class CreateZonePayload(BaseModel):
"expireTime",
"extensions",
"isReverseZone",
"labelsMap",
"name",
"negativeCache",
"primaries",
Expand Down Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion services/dns/src/stackit/dns/models/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -67,6 +72,7 @@ class PartialUpdateZonePayload(BaseModel):
"description",
"expireTime",
"extensions",
"labelsMap",
"name",
"negativeCache",
"primaries",
Expand Down Expand Up @@ -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"),
Expand Down
5 changes: 5 additions & 0 deletions services/dns/src/stackit/dns/models/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -105,6 +108,7 @@ class Zone(BaseModel):
"id",
"isReverseZone",
"labels",
"labelsMap",
"name",
"negativeCache",
"primaries",
Expand Down Expand Up @@ -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"),
Expand Down
Loading