Skip to content
Closed
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/ufw/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1fdef398bea59d49731a7d9ac39394ba5b6bb72c
6be6bdfa4a2046e6a401eeedf822ce9fa520d979
10 changes: 5 additions & 5 deletions services/ufw/src/stackit/ufw/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def list_provider_options(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[ProviderOptionsResponse]:
) -> ProviderOptionsResponse:
"""Get Provider Options

Returns a list of supported configuration options for this region.
Expand Down Expand Up @@ -1551,7 +1551,7 @@ def list_provider_options(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "List[ProviderOptionsResponse]",
"200": "ProviderOptionsResponse",
"400": "ErrorResponse",
"401": "ErrorResponse",
"500": "ErrorResponse",
Expand All @@ -1576,7 +1576,7 @@ def list_provider_options_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[ProviderOptionsResponse]]:
) -> ApiResponse[ProviderOptionsResponse]:
"""Get Provider Options

Returns a list of supported configuration options for this region.
Expand Down Expand Up @@ -1614,7 +1614,7 @@ def list_provider_options_with_http_info(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "List[ProviderOptionsResponse]",
"200": "ProviderOptionsResponse",
"400": "ErrorResponse",
"401": "ErrorResponse",
"500": "ErrorResponse",
Expand Down Expand Up @@ -1677,7 +1677,7 @@ def list_provider_options_without_preload_content(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "List[ProviderOptionsResponse]",
"200": "ProviderOptionsResponse",
"400": "ErrorResponse",
"401": "ErrorResponse",
"500": "ErrorResponse",
Expand Down
13 changes: 12 additions & 1 deletion services/ufw/src/stackit/ufw/models/rule_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from pydantic_core import to_jsonable_python
Expand All @@ -39,13 +40,14 @@ class RuleResponse(BaseModel):
port_range: Optional[StrictStr] = Field(default=None, alias="portRange")
product: StrictStr
protocol: Optional[StrictStr] = None
ref_id: Optional[UUID] = Field(default=None, alias="refId")
region: Optional[StrictStr] = None
remote_security_group_id: Optional[StrictStr] = Field(default=None, alias="remoteSecurityGroupId")
security_group: Optional[StrictStr] = Field(default=None, alias="securityGroup")
security_group_id: Optional[StrictStr] = Field(default=None, alias="securityGroupId")
source_ip: StrictStr = Field(alias="sourceIP")
status: StrictStr = Field(description="The current state of the resource.")
type: StrictStr
type: StrictStr = Field(description='The type of the rule (e.g., "ACL", "PublicIP", "SecurityRule").')
__properties: ClassVar[List[str]] = [
"description",
"destination",
Expand All @@ -59,6 +61,7 @@ class RuleResponse(BaseModel):
"portRange",
"product",
"protocol",
"refId",
"region",
"remoteSecurityGroupId",
"securityGroup",
Expand All @@ -77,6 +80,13 @@ def status_validate_enum(cls, value):
)
return value

@field_validator("type")
def type_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["ACL", "PublicIP", "SecurityRule", "SecurityGroup"]):
raise ValueError("must be one of enum values ('ACL', 'PublicIP', 'SecurityRule', 'SecurityGroup')")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down Expand Up @@ -139,6 +149,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"portRange": obj.get("portRange"),
"product": obj.get("product"),
"protocol": obj.get("protocol"),
"refId": obj.get("refId"),
"region": obj.get("region"),
"remoteSecurityGroupId": obj.get("remoteSecurityGroupId"),
"securityGroup": obj.get("securityGroup"),
Expand Down
Loading