Skip to content

Commit 0affb5f

Browse files
committed
feat: update generated APIs
1 parent fac0156 commit 0affb5f

File tree

6 files changed

+80
-0
lines changed

6 files changed

+80
-0
lines changed

scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from .types import SecretManagerSecretVersionInfo
1111
from .types import EventPrincipal
1212
from .types import Resource
13+
from .types import ProductService
1314
from .types import Event
1415
from .types import Product
1516
from .types import ListEventsRequest
@@ -29,6 +30,7 @@
2930
"SecretManagerSecretVersionInfo",
3031
"EventPrincipal",
3132
"Resource",
33+
"ProductService",
3234
"Event",
3335
"Product",
3436
"ListEventsRequest",

scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Resource,
1616
Event,
1717
ListEventsResponse,
18+
ProductService,
1819
Product,
1920
ListProductsResponse,
2021
)
@@ -316,6 +317,25 @@ def unmarshal_ListEventsResponse(data: Any) -> ListEventsResponse:
316317
return ListEventsResponse(**args)
317318

318319

320+
def unmarshal_ProductService(data: Any) -> ProductService:
321+
if not isinstance(data, dict):
322+
raise TypeError(
323+
"Unmarshalling the type 'ProductService' failed as data isn't a dictionary."
324+
)
325+
326+
args: Dict[str, Any] = {}
327+
328+
field = data.get("name", None)
329+
if field is not None:
330+
args["name"] = field
331+
332+
field = data.get("methods", None)
333+
if field is not None:
334+
args["methods"] = field
335+
336+
return ProductService(**args)
337+
338+
319339
def unmarshal_Product(data: Any) -> Product:
320340
if not isinstance(data, dict):
321341
raise TypeError(
@@ -332,6 +352,12 @@ def unmarshal_Product(data: Any) -> Product:
332352
if field is not None:
333353
args["name"] = field
334354

355+
field = data.get("services", None)
356+
if field is not None:
357+
args["services"] = (
358+
[unmarshal_ProductService(v) for v in field] if field is not None else None
359+
)
360+
335361
return Product(**args)
336362

337363

scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ class Resource:
102102
kube_acl_info: Optional[KubernetesACLInfo]
103103

104104

105+
@dataclass
106+
class ProductService:
107+
name: str
108+
109+
methods: List[str]
110+
111+
105112
@dataclass
106113
class Event:
107114
id: str
@@ -192,6 +199,11 @@ class Product:
192199
Product name.
193200
"""
194201

202+
services: List[ProductService]
203+
"""
204+
Specifies the API versions of the products integrated with Audit Trail. Each version defines the methods logged by Audit Trail.
205+
"""
206+
195207

196208
@dataclass
197209
class ListEventsRequest:

scaleway/scaleway/audit_trail/v1alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from .types import SecretManagerSecretVersionInfo
1111
from .types import EventPrincipal
1212
from .types import Resource
13+
from .types import ProductService
1314
from .types import Event
1415
from .types import Product
1516
from .types import ListEventsRequest
@@ -29,6 +30,7 @@
2930
"SecretManagerSecretVersionInfo",
3031
"EventPrincipal",
3132
"Resource",
33+
"ProductService",
3234
"Event",
3335
"Product",
3436
"ListEventsRequest",

scaleway/scaleway/audit_trail/v1alpha1/marshalling.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Resource,
1616
Event,
1717
ListEventsResponse,
18+
ProductService,
1819
Product,
1920
ListProductsResponse,
2021
)
@@ -316,6 +317,25 @@ def unmarshal_ListEventsResponse(data: Any) -> ListEventsResponse:
316317
return ListEventsResponse(**args)
317318

318319

320+
def unmarshal_ProductService(data: Any) -> ProductService:
321+
if not isinstance(data, dict):
322+
raise TypeError(
323+
"Unmarshalling the type 'ProductService' failed as data isn't a dictionary."
324+
)
325+
326+
args: Dict[str, Any] = {}
327+
328+
field = data.get("name", None)
329+
if field is not None:
330+
args["name"] = field
331+
332+
field = data.get("methods", None)
333+
if field is not None:
334+
args["methods"] = field
335+
336+
return ProductService(**args)
337+
338+
319339
def unmarshal_Product(data: Any) -> Product:
320340
if not isinstance(data, dict):
321341
raise TypeError(
@@ -332,6 +352,12 @@ def unmarshal_Product(data: Any) -> Product:
332352
if field is not None:
333353
args["name"] = field
334354

355+
field = data.get("services", None)
356+
if field is not None:
357+
args["services"] = (
358+
[unmarshal_ProductService(v) for v in field] if field is not None else None
359+
)
360+
335361
return Product(**args)
336362

337363

scaleway/scaleway/audit_trail/v1alpha1/types.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ class Resource:
102102
kube_acl_info: Optional[KubernetesACLInfo]
103103

104104

105+
@dataclass
106+
class ProductService:
107+
name: str
108+
109+
methods: List[str]
110+
111+
105112
@dataclass
106113
class Event:
107114
id: str
@@ -192,6 +199,11 @@ class Product:
192199
Product name.
193200
"""
194201

202+
services: List[ProductService]
203+
"""
204+
Specifies the API versions of the products integrated with Audit Trail. Each version defines the methods logged by Audit Trail.
205+
"""
206+
195207

196208
@dataclass
197209
class ListEventsRequest:

0 commit comments

Comments
 (0)