File tree Expand file tree Collapse file tree 6 files changed +80
-0
lines changed
scaleway-async/scaleway_async/audit_trail/v1alpha1
scaleway/scaleway/audit_trail/v1alpha1 Expand file tree Collapse file tree 6 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 1010from .types import SecretManagerSecretVersionInfo
1111from .types import EventPrincipal
1212from .types import Resource
13+ from .types import ProductService
1314from .types import Event
1415from .types import Product
1516from .types import ListEventsRequest
2930 "SecretManagerSecretVersionInfo" ,
3031 "EventPrincipal" ,
3132 "Resource" ,
33+ "ProductService" ,
3234 "Event" ,
3335 "Product" ,
3436 "ListEventsRequest" ,
Original file line number Diff line number Diff line change 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+
319339def 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
Original file line number Diff line number Diff 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
106113class 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
197209class ListEventsRequest :
Original file line number Diff line number Diff line change 1010from .types import SecretManagerSecretVersionInfo
1111from .types import EventPrincipal
1212from .types import Resource
13+ from .types import ProductService
1314from .types import Event
1415from .types import Product
1516from .types import ListEventsRequest
2930 "SecretManagerSecretVersionInfo" ,
3031 "EventPrincipal" ,
3132 "Resource" ,
33+ "ProductService" ,
3234 "Event" ,
3335 "Product" ,
3436 "ListEventsRequest" ,
Original file line number Diff line number Diff line change 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+
319339def 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
Original file line number Diff line number Diff 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
106113class 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
197209class ListEventsRequest :
You can’t perform that action at this time.
0 commit comments