Skip to content

Commit 03fb2b5

Browse files
committed
feat: update generated APIs
1 parent d5611a9 commit 03fb2b5

File tree

6 files changed

+52
-0
lines changed

6 files changed

+52
-0
lines changed

scaleway-async/scaleway_async/vpc/v2/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from .types import ListPrivateNetworksRequestOrderBy
66
from .types import ListSubnetsRequestOrderBy
77
from .types import ListVPCsRequestOrderBy
8+
from .types import RouteType
89
from .types import Subnet
910
from .types import PrivateNetwork
1011
from .types import Route
@@ -47,6 +48,7 @@
4748
"ListPrivateNetworksRequestOrderBy",
4849
"ListSubnetsRequestOrderBy",
4950
"ListVPCsRequestOrderBy",
51+
"RouteType",
5052
"Subnet",
5153
"PrivateNetwork",
5254
"Route",

scaleway-async/scaleway_async/vpc/v2/marshalling.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from scaleway_core.profile import ProfileDefaults
88
from .types import (
9+
RouteType,
910
Subnet,
1011
PrivateNetwork,
1112
Route,
@@ -242,6 +243,12 @@ def unmarshal_Route(data: Any) -> Route:
242243
else:
243244
args["updated_at"] = None
244245

246+
field = data.get("type", None)
247+
if field is not None:
248+
args["type_"] = field
249+
else:
250+
args["type_"] = RouteType.UNKNOWN_ROUTE_TYPE
251+
245252
return Route(**args)
246253

247254

scaleway-async/scaleway_async/vpc/v2/types.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ def __str__(self) -> str:
6262
return str(self.value)
6363

6464

65+
class RouteType(str, Enum, metaclass=StrEnumMeta):
66+
UNKNOWN_ROUTE_TYPE = "unknown_route_type"
67+
SUBNET = "subnet"
68+
DEFAULT = "default"
69+
CUSTOM = "custom"
70+
INTERLINK = "interlink"
71+
S2S_VPN = "s2s_vpn"
72+
73+
def __str__(self) -> str:
74+
return str(self.value)
75+
76+
6577
@dataclass
6678
class Subnet:
6779
id: str
@@ -220,6 +232,11 @@ class Route:
220232
Date the Route was last modified.
221233
"""
222234

235+
type_: Optional[RouteType] = RouteType.UNKNOWN_ROUTE_TYPE
236+
"""
237+
Type of the Route.
238+
"""
239+
223240

224241
@dataclass
225242
class AclRule:

scaleway/scaleway/vpc/v2/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from .types import ListPrivateNetworksRequestOrderBy
66
from .types import ListSubnetsRequestOrderBy
77
from .types import ListVPCsRequestOrderBy
8+
from .types import RouteType
89
from .types import Subnet
910
from .types import PrivateNetwork
1011
from .types import Route
@@ -47,6 +48,7 @@
4748
"ListPrivateNetworksRequestOrderBy",
4849
"ListSubnetsRequestOrderBy",
4950
"ListVPCsRequestOrderBy",
51+
"RouteType",
5052
"Subnet",
5153
"PrivateNetwork",
5254
"Route",

scaleway/scaleway/vpc/v2/marshalling.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from scaleway_core.profile import ProfileDefaults
88
from .types import (
9+
RouteType,
910
Subnet,
1011
PrivateNetwork,
1112
Route,
@@ -242,6 +243,12 @@ def unmarshal_Route(data: Any) -> Route:
242243
else:
243244
args["updated_at"] = None
244245

246+
field = data.get("type", None)
247+
if field is not None:
248+
args["type_"] = field
249+
else:
250+
args["type_"] = RouteType.UNKNOWN_ROUTE_TYPE
251+
245252
return Route(**args)
246253

247254

scaleway/scaleway/vpc/v2/types.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ def __str__(self) -> str:
6262
return str(self.value)
6363

6464

65+
class RouteType(str, Enum, metaclass=StrEnumMeta):
66+
UNKNOWN_ROUTE_TYPE = "unknown_route_type"
67+
SUBNET = "subnet"
68+
DEFAULT = "default"
69+
CUSTOM = "custom"
70+
INTERLINK = "interlink"
71+
S2S_VPN = "s2s_vpn"
72+
73+
def __str__(self) -> str:
74+
return str(self.value)
75+
76+
6577
@dataclass
6678
class Subnet:
6779
id: str
@@ -220,6 +232,11 @@ class Route:
220232
Date the Route was last modified.
221233
"""
222234

235+
type_: Optional[RouteType] = RouteType.UNKNOWN_ROUTE_TYPE
236+
"""
237+
Type of the Route.
238+
"""
239+
223240

224241
@dataclass
225242
class AclRule:

0 commit comments

Comments
 (0)