diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py index aecfda29..53c8f9f9 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py @@ -251,10 +251,6 @@ def unmarshal_Event(data: Any) -> Event: if field is not None: args["source_ip"] = field - field = data.get("product_name", None) - if field is not None: - args["product_name"] = field - field = data.get("recorded_at", None) if field is not None: args["recorded_at"] = ( @@ -281,6 +277,10 @@ def unmarshal_Event(data: Any) -> Event: else: args["user_agent"] = None + field = data.get("product_name", None) + if field is not None: + args["product_name"] = field + field = data.get("service_name", None) if field is not None: args["service_name"] = field @@ -289,6 +289,12 @@ def unmarshal_Event(data: Any) -> Event: if field is not None: args["method_name"] = field + field = data.get("resources", None) + if field is not None: + args["resources"] = ( + [unmarshal_Resource(v) for v in field] if field is not None else None + ) + field = data.get("request_id", None) if field is not None: args["request_id"] = field diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py index 3db3219e..6f78c25b 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py @@ -145,11 +145,6 @@ class Event: IP address at the origin of the event. """ - product_name: str - """ - Product name of the resource attached to the event. - """ - recorded_at: Optional[datetime] """ Timestamp of the event. @@ -170,6 +165,11 @@ class Event: User Agent at the origin of the event. """ + product_name: str + """ + Product name of the resource attached to the event. + """ + service_name: str """ API name called to trigger the event. @@ -180,6 +180,11 @@ class Event: API method called to trigger the event. """ + resources: List[Resource] + """ + Resources attached to the event. + """ + request_id: str """ Unique identifier of the request at the origin of the event. diff --git a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py index aecfda29..53c8f9f9 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py @@ -251,10 +251,6 @@ def unmarshal_Event(data: Any) -> Event: if field is not None: args["source_ip"] = field - field = data.get("product_name", None) - if field is not None: - args["product_name"] = field - field = data.get("recorded_at", None) if field is not None: args["recorded_at"] = ( @@ -281,6 +277,10 @@ def unmarshal_Event(data: Any) -> Event: else: args["user_agent"] = None + field = data.get("product_name", None) + if field is not None: + args["product_name"] = field + field = data.get("service_name", None) if field is not None: args["service_name"] = field @@ -289,6 +289,12 @@ def unmarshal_Event(data: Any) -> Event: if field is not None: args["method_name"] = field + field = data.get("resources", None) + if field is not None: + args["resources"] = ( + [unmarshal_Resource(v) for v in field] if field is not None else None + ) + field = data.get("request_id", None) if field is not None: args["request_id"] = field diff --git a/scaleway/scaleway/audit_trail/v1alpha1/types.py b/scaleway/scaleway/audit_trail/v1alpha1/types.py index 3db3219e..6f78c25b 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/types.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/types.py @@ -145,11 +145,6 @@ class Event: IP address at the origin of the event. """ - product_name: str - """ - Product name of the resource attached to the event. - """ - recorded_at: Optional[datetime] """ Timestamp of the event. @@ -170,6 +165,11 @@ class Event: User Agent at the origin of the event. """ + product_name: str + """ + Product name of the resource attached to the event. + """ + service_name: str """ API name called to trigger the event. @@ -180,6 +180,11 @@ class Event: API method called to trigger the event. """ + resources: List[Resource] + """ + Resources attached to the event. + """ + request_id: str """ Unique identifier of the request at the origin of the event.