diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py index 1b89c7430..46ce9c832 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py @@ -2,6 +2,7 @@ # If you have any remark or suggestion do not hesitate to open an issue. from .types import ListEventsRequestOrderBy from .types import ResourceType +from .types import KubernetesACLInfo from .types import KubernetesClusterInfo from .types import KubernetesNodeInfo from .types import KubernetesPoolInfo @@ -20,6 +21,7 @@ __all__ = [ "ListEventsRequestOrderBy", "ResourceType", + "KubernetesACLInfo", "KubernetesClusterInfo", "KubernetesNodeInfo", "KubernetesPoolInfo", diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py index 9223aea78..9a4b6e423 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py @@ -5,6 +5,7 @@ from dateutil import parser from .types import ( + KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, KubernetesPoolInfo, @@ -19,6 +20,17 @@ ) +def unmarshal_KubernetesACLInfo(data: Any) -> KubernetesACLInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + return KubernetesACLInfo(**args) + + def unmarshal_KubernetesClusterInfo(data: Any) -> KubernetesClusterInfo: if not isinstance(data, dict): raise TypeError( @@ -187,6 +199,12 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["kube_node_info"] = None + field = data.get("kube_acl_info", None) + if field is not None: + args["kube_acl_info"] = unmarshal_KubernetesACLInfo(field) + else: + args["kube_acl_info"] = None + return Resource(**args) diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py index 2d9381701..f1d474b85 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py @@ -30,11 +30,17 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): KUBE_CLUSTER = "kube_cluster" KUBE_POOL = "kube_pool" KUBE_NODE = "kube_node" + KUBE_ACL = "kube_acl" def __str__(self) -> str: return str(self.value) +@dataclass +class KubernetesACLInfo: + pass + + @dataclass class KubernetesClusterInfo: pass @@ -93,6 +99,8 @@ class Resource: kube_node_info: Optional[KubernetesNodeInfo] + kube_acl_info: Optional[KubernetesACLInfo] + @dataclass class Event: diff --git a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py index 1b89c7430..46ce9c832 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py @@ -2,6 +2,7 @@ # If you have any remark or suggestion do not hesitate to open an issue. from .types import ListEventsRequestOrderBy from .types import ResourceType +from .types import KubernetesACLInfo from .types import KubernetesClusterInfo from .types import KubernetesNodeInfo from .types import KubernetesPoolInfo @@ -20,6 +21,7 @@ __all__ = [ "ListEventsRequestOrderBy", "ResourceType", + "KubernetesACLInfo", "KubernetesClusterInfo", "KubernetesNodeInfo", "KubernetesPoolInfo", diff --git a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py index 9223aea78..9a4b6e423 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py @@ -5,6 +5,7 @@ from dateutil import parser from .types import ( + KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, KubernetesPoolInfo, @@ -19,6 +20,17 @@ ) +def unmarshal_KubernetesACLInfo(data: Any) -> KubernetesACLInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + return KubernetesACLInfo(**args) + + def unmarshal_KubernetesClusterInfo(data: Any) -> KubernetesClusterInfo: if not isinstance(data, dict): raise TypeError( @@ -187,6 +199,12 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["kube_node_info"] = None + field = data.get("kube_acl_info", None) + if field is not None: + args["kube_acl_info"] = unmarshal_KubernetesACLInfo(field) + else: + args["kube_acl_info"] = None + return Resource(**args) diff --git a/scaleway/scaleway/audit_trail/v1alpha1/types.py b/scaleway/scaleway/audit_trail/v1alpha1/types.py index 2d9381701..f1d474b85 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/types.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/types.py @@ -30,11 +30,17 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): KUBE_CLUSTER = "kube_cluster" KUBE_POOL = "kube_pool" KUBE_NODE = "kube_node" + KUBE_ACL = "kube_acl" def __str__(self) -> str: return str(self.value) +@dataclass +class KubernetesACLInfo: + pass + + @dataclass class KubernetesClusterInfo: pass @@ -93,6 +99,8 @@ class Resource: kube_node_info: Optional[KubernetesNodeInfo] + kube_acl_info: Optional[KubernetesACLInfo] + @dataclass class Event: