From 5e4577f20d0752f44fb4999238edd5cf0b2174e6 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 2 Nov 2026 13:28:27 +0000 Subject: [PATCH] Generate ufw --- services/ufw/oas_commit | 2 +- .../ufw/src/stackit/ufw/api/default_api.py | 22 ++++++------- .../stackit/ufw/models/create_rule_payload.py | 22 +++++++++++-- .../src/stackit/ufw/models/rule_response.py | 31 +++++++++++++++---- 4 files changed, 57 insertions(+), 20 deletions(-) diff --git a/services/ufw/oas_commit b/services/ufw/oas_commit index 3df2932d2..f946725cf 100644 --- a/services/ufw/oas_commit +++ b/services/ufw/oas_commit @@ -1 +1 @@ -1fdef398bea59d49731a7d9ac39394ba5b6bb72c +08b95d7f2e3b9c288a1b5d1f1f6d13b0632b7ad0 diff --git a/services/ufw/src/stackit/ufw/api/default_api.py b/services/ufw/src/stackit/ufw/api/default_api.py index 8acc202f1..4be6e99c1 100644 --- a/services/ufw/src/stackit/ufw/api/default_api.py +++ b/services/ufw/src/stackit/ufw/api/default_api.py @@ -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. @@ -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", @@ -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. @@ -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", @@ -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", @@ -1749,7 +1749,7 @@ def list_rules( Field(description="The ID of the source, similar to a project ID but for the product service instance."), ] = None, type: Annotated[ - Optional[StrictStr], Field(description='The type of the rule (e.g., "ACL", "PublicIP", "SecurityRule").') + Optional[StrictStr], Field(description='The type of the rule (e.g., "ACL", "SecurityRule").') ] = None, source_ip: Annotated[Optional[StrictStr], Field(description="The IP for the rule.")] = None, port_range: Annotated[Optional[StrictStr], Field(description="The port range for the rule.")] = None, @@ -1798,7 +1798,7 @@ def list_rules( :type product: str :param instance_id: The ID of the source, similar to a project ID but for the product service instance. :type instance_id: str - :param type: The type of the rule (e.g., \"ACL\", \"PublicIP\", \"SecurityRule\"). + :param type: The type of the rule (e.g., \"ACL\", \"SecurityRule\"). :type type: str :param source_ip: The IP for the rule. :type source_ip: str @@ -1891,7 +1891,7 @@ def list_rules_with_http_info( Field(description="The ID of the source, similar to a project ID but for the product service instance."), ] = None, type: Annotated[ - Optional[StrictStr], Field(description='The type of the rule (e.g., "ACL", "PublicIP", "SecurityRule").') + Optional[StrictStr], Field(description='The type of the rule (e.g., "ACL", "SecurityRule").') ] = None, source_ip: Annotated[Optional[StrictStr], Field(description="The IP for the rule.")] = None, port_range: Annotated[Optional[StrictStr], Field(description="The port range for the rule.")] = None, @@ -1940,7 +1940,7 @@ def list_rules_with_http_info( :type product: str :param instance_id: The ID of the source, similar to a project ID but for the product service instance. :type instance_id: str - :param type: The type of the rule (e.g., \"ACL\", \"PublicIP\", \"SecurityRule\"). + :param type: The type of the rule (e.g., \"ACL\", \"SecurityRule\"). :type type: str :param source_ip: The IP for the rule. :type source_ip: str @@ -2033,7 +2033,7 @@ def list_rules_without_preload_content( Field(description="The ID of the source, similar to a project ID but for the product service instance."), ] = None, type: Annotated[ - Optional[StrictStr], Field(description='The type of the rule (e.g., "ACL", "PublicIP", "SecurityRule").') + Optional[StrictStr], Field(description='The type of the rule (e.g., "ACL", "SecurityRule").') ] = None, source_ip: Annotated[Optional[StrictStr], Field(description="The IP for the rule.")] = None, port_range: Annotated[Optional[StrictStr], Field(description="The port range for the rule.")] = None, @@ -2082,7 +2082,7 @@ def list_rules_without_preload_content( :type product: str :param instance_id: The ID of the source, similar to a project ID but for the product service instance. :type instance_id: str - :param type: The type of the rule (e.g., \"ACL\", \"PublicIP\", \"SecurityRule\"). + :param type: The type of the rule (e.g., \"ACL\", \"SecurityRule\"). :type type: str :param source_ip: The IP for the rule. :type source_ip: str diff --git a/services/ufw/src/stackit/ufw/models/create_rule_payload.py b/services/ufw/src/stackit/ufw/models/create_rule_payload.py index 281de8b7d..55d1a6dd8 100644 --- a/services/ufw/src/stackit/ufw/models/create_rule_payload.py +++ b/services/ufw/src/stackit/ufw/models/create_rule_payload.py @@ -17,7 +17,14 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, +) from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -43,11 +50,18 @@ class CreateRulePayload(BaseModel): protocol: Optional[StrictStr] = Field( default=None, description='The network protocol (e.g., "TCP", "UDP", "ICMP").' ) + remote_security_group_id: Optional[StrictStr] = Field( + default=None, description="The ID of the Group.", alias="remoteSecurityGroupId" + ) security_group_id: Optional[StrictStr] = Field( default=None, description="The ID of the Group.", alias="securityGroupId" ) source_ip: StrictStr = Field(description="The IP (CIDR) to which the rule applies.", alias="sourceIP") - type: StrictStr = Field(description='The type of the rule (e.g., "ACL", "PublicIP", "SecurityRule").') + stateful: Optional[StrictBool] = Field( + default=None, + description="Indicates whether the security group rule is stateful or stateless (used only for security groups, default value for them will be true).", + ) + type: StrictStr = Field(description='The type of the rule (e.g., "ACL", "SecurityRule").') __properties: ClassVar[List[str]] = [ "description", "direction", @@ -57,8 +71,10 @@ class CreateRulePayload(BaseModel): "portRange", "product", "protocol", + "remoteSecurityGroupId", "securityGroupId", "sourceIP", + "stateful", "type", ] @@ -120,8 +136,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "portRange": obj.get("portRange"), "product": obj.get("product"), "protocol": obj.get("protocol"), + "remoteSecurityGroupId": obj.get("remoteSecurityGroupId"), "securityGroupId": obj.get("securityGroupId"), "sourceIP": obj.get("sourceIP"), + "stateful": obj.get("stateful"), "type": obj.get("type"), } ) diff --git a/services/ufw/src/stackit/ufw/models/rule_response.py b/services/ufw/src/stackit/ufw/models/rule_response.py index 64946ee10..f1c6ac693 100644 --- a/services/ufw/src/stackit/ufw/models/rule_response.py +++ b/services/ufw/src/stackit/ufw/models/rule_response.py @@ -16,8 +16,17 @@ import json import pprint from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from uuid import UUID + +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -39,13 +48,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") + stateful: Optional[StrictBool] = None status: StrictStr = Field(description="The current state of the resource.") - type: StrictStr + type: StrictStr = Field(description='The type of the rule (e.g., "ACL", "SecurityRule").') __properties: ClassVar[List[str]] = [ "description", "destination", @@ -59,11 +69,12 @@ class RuleResponse(BaseModel): "portRange", "product", "protocol", + "refId", "region", "remoteSecurityGroupId", - "securityGroup", "securityGroupId", "sourceIP", + "stateful", "status", "type", ] @@ -77,6 +88,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", "SecurityRule", "SecurityGroup"]): + raise ValueError("must be one of enum values ('ACL', 'SecurityRule', 'SecurityGroup')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, @@ -139,11 +157,12 @@ 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"), "securityGroupId": obj.get("securityGroupId"), "sourceIP": obj.get("sourceIP"), + "stateful": obj.get("stateful"), "status": obj.get("status"), "type": obj.get("type"), }