From a6c5f2f79ca658c3aa79e5292ce25de72c57917a Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 19 Nov 2025 09:44:28 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/vpc/v2/__init__.py | 2 ++ .../scaleway_async/vpc/v2/marshalling.py | 7 +++++++ scaleway-async/scaleway_async/vpc/v2/types.py | 17 +++++++++++++++++ scaleway/scaleway/vpc/v2/__init__.py | 2 ++ scaleway/scaleway/vpc/v2/marshalling.py | 7 +++++++ scaleway/scaleway/vpc/v2/types.py | 17 +++++++++++++++++ 6 files changed, 52 insertions(+) diff --git a/scaleway-async/scaleway_async/vpc/v2/__init__.py b/scaleway-async/scaleway_async/vpc/v2/__init__.py index 991e09457..64958f02c 100644 --- a/scaleway-async/scaleway_async/vpc/v2/__init__.py +++ b/scaleway-async/scaleway_async/vpc/v2/__init__.py @@ -5,6 +5,7 @@ from .types import ListPrivateNetworksRequestOrderBy from .types import ListSubnetsRequestOrderBy from .types import ListVPCsRequestOrderBy +from .types import RouteType from .types import Subnet from .types import PrivateNetwork from .types import Route @@ -47,6 +48,7 @@ "ListPrivateNetworksRequestOrderBy", "ListSubnetsRequestOrderBy", "ListVPCsRequestOrderBy", + "RouteType", "Subnet", "PrivateNetwork", "Route", diff --git a/scaleway-async/scaleway_async/vpc/v2/marshalling.py b/scaleway-async/scaleway_async/vpc/v2/marshalling.py index 8a6132e56..c3645d405 100644 --- a/scaleway-async/scaleway_async/vpc/v2/marshalling.py +++ b/scaleway-async/scaleway_async/vpc/v2/marshalling.py @@ -6,6 +6,7 @@ from scaleway_core.profile import ProfileDefaults from .types import ( + RouteType, Subnet, PrivateNetwork, Route, @@ -242,6 +243,12 @@ def unmarshal_Route(data: Any) -> Route: else: args["updated_at"] = None + field = data.get("type", None) + if field is not None: + args["type_"] = field + else: + args["type_"] = RouteType.UNKNOWN_ROUTE_TYPE + return Route(**args) diff --git a/scaleway-async/scaleway_async/vpc/v2/types.py b/scaleway-async/scaleway_async/vpc/v2/types.py index 5f9f255e7..e9ce3e251 100644 --- a/scaleway-async/scaleway_async/vpc/v2/types.py +++ b/scaleway-async/scaleway_async/vpc/v2/types.py @@ -62,6 +62,18 @@ def __str__(self) -> str: return str(self.value) +class RouteType(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_ROUTE_TYPE = "unknown_route_type" + SUBNET = "subnet" + DEFAULT = "default" + CUSTOM = "custom" + INTERLINK = "interlink" + S2S_VPN = "s2s_vpn" + + def __str__(self) -> str: + return str(self.value) + + @dataclass class Subnet: id: str @@ -220,6 +232,11 @@ class Route: Date the Route was last modified. """ + type_: Optional[RouteType] = RouteType.UNKNOWN_ROUTE_TYPE + """ + Type of the Route. + """ + @dataclass class AclRule: diff --git a/scaleway/scaleway/vpc/v2/__init__.py b/scaleway/scaleway/vpc/v2/__init__.py index 991e09457..64958f02c 100644 --- a/scaleway/scaleway/vpc/v2/__init__.py +++ b/scaleway/scaleway/vpc/v2/__init__.py @@ -5,6 +5,7 @@ from .types import ListPrivateNetworksRequestOrderBy from .types import ListSubnetsRequestOrderBy from .types import ListVPCsRequestOrderBy +from .types import RouteType from .types import Subnet from .types import PrivateNetwork from .types import Route @@ -47,6 +48,7 @@ "ListPrivateNetworksRequestOrderBy", "ListSubnetsRequestOrderBy", "ListVPCsRequestOrderBy", + "RouteType", "Subnet", "PrivateNetwork", "Route", diff --git a/scaleway/scaleway/vpc/v2/marshalling.py b/scaleway/scaleway/vpc/v2/marshalling.py index 8a6132e56..c3645d405 100644 --- a/scaleway/scaleway/vpc/v2/marshalling.py +++ b/scaleway/scaleway/vpc/v2/marshalling.py @@ -6,6 +6,7 @@ from scaleway_core.profile import ProfileDefaults from .types import ( + RouteType, Subnet, PrivateNetwork, Route, @@ -242,6 +243,12 @@ def unmarshal_Route(data: Any) -> Route: else: args["updated_at"] = None + field = data.get("type", None) + if field is not None: + args["type_"] = field + else: + args["type_"] = RouteType.UNKNOWN_ROUTE_TYPE + return Route(**args) diff --git a/scaleway/scaleway/vpc/v2/types.py b/scaleway/scaleway/vpc/v2/types.py index 5f9f255e7..e9ce3e251 100644 --- a/scaleway/scaleway/vpc/v2/types.py +++ b/scaleway/scaleway/vpc/v2/types.py @@ -62,6 +62,18 @@ def __str__(self) -> str: return str(self.value) +class RouteType(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_ROUTE_TYPE = "unknown_route_type" + SUBNET = "subnet" + DEFAULT = "default" + CUSTOM = "custom" + INTERLINK = "interlink" + S2S_VPN = "s2s_vpn" + + def __str__(self) -> str: + return str(self.value) + + @dataclass class Subnet: id: str @@ -220,6 +232,11 @@ class Route: Date the Route was last modified. """ + type_: Optional[RouteType] = RouteType.UNKNOWN_ROUTE_TYPE + """ + Type of the Route. + """ + @dataclass class AclRule: