Skip to content

Commit 74e35bf

Browse files
Generate ufw
1 parent 4d6d0db commit 74e35bf

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

services/ufw/oas_commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1fdef398bea59d49731a7d9ac39394ba5b6bb72c
1+
6be6bdfa4a2046e6a401eeedf822ce9fa520d979

services/ufw/src/stackit/ufw/api/default_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ def list_provider_options(
15131513
_content_type: Optional[StrictStr] = None,
15141514
_headers: Optional[Dict[StrictStr, Any]] = None,
15151515
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1516-
) -> List[ProviderOptionsResponse]:
1516+
) -> ProviderOptionsResponse:
15171517
"""Get Provider Options
15181518
15191519
Returns a list of supported configuration options for this region.
@@ -1551,7 +1551,7 @@ def list_provider_options(
15511551
)
15521552

15531553
_response_types_map: Dict[str, Optional[str]] = {
1554-
"200": "List[ProviderOptionsResponse]",
1554+
"200": "ProviderOptionsResponse",
15551555
"400": "ErrorResponse",
15561556
"401": "ErrorResponse",
15571557
"500": "ErrorResponse",
@@ -1576,7 +1576,7 @@ def list_provider_options_with_http_info(
15761576
_content_type: Optional[StrictStr] = None,
15771577
_headers: Optional[Dict[StrictStr, Any]] = None,
15781578
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1579-
) -> ApiResponse[List[ProviderOptionsResponse]]:
1579+
) -> ApiResponse[ProviderOptionsResponse]:
15801580
"""Get Provider Options
15811581
15821582
Returns a list of supported configuration options for this region.
@@ -1614,7 +1614,7 @@ def list_provider_options_with_http_info(
16141614
)
16151615

16161616
_response_types_map: Dict[str, Optional[str]] = {
1617-
"200": "List[ProviderOptionsResponse]",
1617+
"200": "ProviderOptionsResponse",
16181618
"400": "ErrorResponse",
16191619
"401": "ErrorResponse",
16201620
"500": "ErrorResponse",
@@ -1677,7 +1677,7 @@ def list_provider_options_without_preload_content(
16771677
)
16781678

16791679
_response_types_map: Dict[str, Optional[str]] = {
1680-
"200": "List[ProviderOptionsResponse]",
1680+
"200": "ProviderOptionsResponse",
16811681
"400": "ErrorResponse",
16821682
"401": "ErrorResponse",
16831683
"500": "ErrorResponse",

services/ufw/src/stackit/ufw/models/rule_response.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import json
1717
import pprint
1818
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
from uuid import UUID
1920

2021
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
2122
from pydantic_core import to_jsonable_python
@@ -39,13 +40,14 @@ class RuleResponse(BaseModel):
3940
port_range: Optional[StrictStr] = Field(default=None, alias="portRange")
4041
product: StrictStr
4142
protocol: Optional[StrictStr] = None
43+
ref_id: Optional[UUID] = Field(default=None, alias="refId")
4244
region: Optional[StrictStr] = None
4345
remote_security_group_id: Optional[StrictStr] = Field(default=None, alias="remoteSecurityGroupId")
4446
security_group: Optional[StrictStr] = Field(default=None, alias="securityGroup")
4547
security_group_id: Optional[StrictStr] = Field(default=None, alias="securityGroupId")
4648
source_ip: StrictStr = Field(alias="sourceIP")
4749
status: StrictStr = Field(description="The current state of the resource.")
48-
type: StrictStr
50+
type: StrictStr = Field(description='The type of the rule (e.g., "ACL", "PublicIP", "SecurityRule").')
4951
__properties: ClassVar[List[str]] = [
5052
"description",
5153
"destination",
@@ -59,6 +61,7 @@ class RuleResponse(BaseModel):
5961
"portRange",
6062
"product",
6163
"protocol",
64+
"refId",
6265
"region",
6366
"remoteSecurityGroupId",
6467
"securityGroup",
@@ -77,6 +80,13 @@ def status_validate_enum(cls, value):
7780
)
7881
return value
7982

83+
@field_validator("type")
84+
def type_validate_enum(cls, value):
85+
"""Validates the enum"""
86+
if value not in set(["ACL", "PublicIP", "SecurityRule", "SecurityGroup"]):
87+
raise ValueError("must be one of enum values ('ACL', 'PublicIP', 'SecurityRule', 'SecurityGroup')")
88+
return value
89+
8090
model_config = ConfigDict(
8191
validate_by_name=True,
8292
validate_by_alias=True,
@@ -139,6 +149,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139149
"portRange": obj.get("portRange"),
140150
"product": obj.get("product"),
141151
"protocol": obj.get("protocol"),
152+
"refId": obj.get("refId"),
142153
"region": obj.get("region"),
143154
"remoteSecurityGroupId": obj.get("remoteSecurityGroupId"),
144155
"securityGroup": obj.get("securityGroup"),

0 commit comments

Comments
 (0)