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/ufw/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d3f51a99ec81d4226be8c6d4826ed2547014edb0
d420d9614787c2c3ea295aad2a2fa9b907014505
13 changes: 13 additions & 0 deletions services/ufw/src/stackit/ufw/models/rule_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class RuleResponse(BaseModel):
source_ip: StrictStr = Field(alias="sourceIP")
stateful: Optional[StrictBool] = None
status: StrictStr = Field(description="The current state of the resource.")
sync_status: Optional[StrictStr] = Field(default=None, alias="syncStatus")
type: StrictStr = Field(description='The type of the rule (e.g., "ACL", "SecurityRule").')
__properties: ClassVar[List[str]] = [
"description",
Expand All @@ -78,6 +79,7 @@ class RuleResponse(BaseModel):
"sourceIP",
"stateful",
"status",
"syncStatus",
"type",
]

Expand All @@ -90,6 +92,16 @@ def status_validate_enum(cls, value):
)
return value

@field_validator("sync_status")
def sync_status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(["SYNCED", "NOT_SYNCED"]):
raise ValueError("must be one of enum values ('SYNCED', 'NOT_SYNCED')")
return value

@field_validator("type")
def type_validate_enum(cls, value):
"""Validates the enum"""
Expand Down Expand Up @@ -167,6 +179,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"sourceIP": obj.get("sourceIP"),
"stateful": obj.get("stateful"),
"status": obj.get("status"),
"syncStatus": obj.get("syncStatus"),
"type": obj.get("type"),
}
)
Expand Down
Loading