diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py index 74b110dcb..6325b9583 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py @@ -3,8 +3,11 @@ from .types import ListEventsRequestOrderBy from .types import ResourceType from .types import AccountOrganizationInfo +from .types import AccountProjectInfo from .types import AccountUserInfo from .types import AppleSiliconServerInfo +from .types import BaremetalServerInfo +from .types import BaremetalSettingInfo from .types import InstanceServerInfo from .types import KeyManagerKeyInfo from .types import KubernetesACLInfo @@ -28,8 +31,11 @@ "ListEventsRequestOrderBy", "ResourceType", "AccountOrganizationInfo", + "AccountProjectInfo", "AccountUserInfo", "AppleSiliconServerInfo", + "BaremetalServerInfo", + "BaremetalSettingInfo", "InstanceServerInfo", "KeyManagerKeyInfo", "KubernetesACLInfo", diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py index d558104bf..32ea3154c 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py @@ -6,8 +6,11 @@ from .types import ( AccountOrganizationInfo, + AccountProjectInfo, AccountUserInfo, AppleSiliconServerInfo, + BaremetalServerInfo, + BaremetalSettingInfo, InstanceServerInfo, KeyManagerKeyInfo, KubernetesACLInfo, @@ -37,6 +40,21 @@ def unmarshal_AccountOrganizationInfo(data: Any) -> AccountOrganizationInfo: return AccountOrganizationInfo(**args) +def unmarshal_AccountProjectInfo(data: Any) -> AccountProjectInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("description", None) + if field is not None: + args["description"] = field + + return AccountProjectInfo(**args) + + def unmarshal_AccountUserInfo(data: Any) -> AccountUserInfo: if not isinstance(data, dict): raise TypeError( @@ -77,6 +95,40 @@ def unmarshal_AppleSiliconServerInfo(data: Any) -> AppleSiliconServerInfo: return AppleSiliconServerInfo(**args) +def unmarshal_BaremetalServerInfo(data: Any) -> BaremetalServerInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("description", None) + if field is not None: + args["description"] = field + + field = data.get("tags", None) + if field is not None: + args["tags"] = field + + return BaremetalServerInfo(**args) + + +def unmarshal_BaremetalSettingInfo(data: Any) -> BaremetalSettingInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("type", None) + if field is not None: + args["type_"] = field + + return BaremetalSettingInfo(**args) + + def unmarshal_InstanceServerInfo(data: Any) -> InstanceServerInfo: if not isinstance(data, dict): raise TypeError( @@ -344,6 +396,24 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["apple_silicon_server_info"] = None + field = data.get("account_project_info", None) + if field is not None: + args["account_project_info"] = unmarshal_AccountProjectInfo(field) + else: + args["account_project_info"] = None + + field = data.get("baremetal_server_info", None) + if field is not None: + args["baremetal_server_info"] = unmarshal_BaremetalServerInfo(field) + else: + args["baremetal_server_info"] = None + + field = data.get("baremetal_setting_info", None) + if field is not None: + args["baremetal_setting_info"] = unmarshal_BaremetalSettingInfo(field) + else: + args["baremetal_setting_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 d17db9ad2..16fd831c7 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py @@ -44,8 +44,11 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): KEY_MANAGER_KEY = "key_manager_key" ACCOUNT_USER = "account_user" ACCOUNT_ORGANIZATION = "account_organization" + ACCOUNT_PROJECT = "account_project" INSTANCE_SERVER = "instance_server" APPLE_SILICON_SERVER = "apple_silicon_server" + BAREMETAL_SERVER = "baremetal_server" + BAREMETAL_SETTING = "baremetal_setting" def __str__(self) -> str: return str(self.value) @@ -56,6 +59,11 @@ class AccountOrganizationInfo: pass +@dataclass +class AccountProjectInfo: + description: str + + @dataclass class AccountUserInfo: email: str @@ -70,6 +78,18 @@ class AppleSiliconServerInfo: name: str +@dataclass +class BaremetalServerInfo: + description: str + + tags: List[str] + + +@dataclass +class BaremetalSettingInfo: + type_: str + + @dataclass class InstanceServerInfo: name: str @@ -163,6 +183,12 @@ class Resource: apple_silicon_server_info: Optional[AppleSiliconServerInfo] + account_project_info: Optional[AccountProjectInfo] + + baremetal_server_info: Optional[BaremetalServerInfo] + + baremetal_setting_info: Optional[BaremetalSettingInfo] + @dataclass class ProductService: diff --git a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py index 74b110dcb..6325b9583 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py @@ -3,8 +3,11 @@ from .types import ListEventsRequestOrderBy from .types import ResourceType from .types import AccountOrganizationInfo +from .types import AccountProjectInfo from .types import AccountUserInfo from .types import AppleSiliconServerInfo +from .types import BaremetalServerInfo +from .types import BaremetalSettingInfo from .types import InstanceServerInfo from .types import KeyManagerKeyInfo from .types import KubernetesACLInfo @@ -28,8 +31,11 @@ "ListEventsRequestOrderBy", "ResourceType", "AccountOrganizationInfo", + "AccountProjectInfo", "AccountUserInfo", "AppleSiliconServerInfo", + "BaremetalServerInfo", + "BaremetalSettingInfo", "InstanceServerInfo", "KeyManagerKeyInfo", "KubernetesACLInfo", diff --git a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py index d558104bf..32ea3154c 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/marshalling.py @@ -6,8 +6,11 @@ from .types import ( AccountOrganizationInfo, + AccountProjectInfo, AccountUserInfo, AppleSiliconServerInfo, + BaremetalServerInfo, + BaremetalSettingInfo, InstanceServerInfo, KeyManagerKeyInfo, KubernetesACLInfo, @@ -37,6 +40,21 @@ def unmarshal_AccountOrganizationInfo(data: Any) -> AccountOrganizationInfo: return AccountOrganizationInfo(**args) +def unmarshal_AccountProjectInfo(data: Any) -> AccountProjectInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("description", None) + if field is not None: + args["description"] = field + + return AccountProjectInfo(**args) + + def unmarshal_AccountUserInfo(data: Any) -> AccountUserInfo: if not isinstance(data, dict): raise TypeError( @@ -77,6 +95,40 @@ def unmarshal_AppleSiliconServerInfo(data: Any) -> AppleSiliconServerInfo: return AppleSiliconServerInfo(**args) +def unmarshal_BaremetalServerInfo(data: Any) -> BaremetalServerInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("description", None) + if field is not None: + args["description"] = field + + field = data.get("tags", None) + if field is not None: + args["tags"] = field + + return BaremetalServerInfo(**args) + + +def unmarshal_BaremetalSettingInfo(data: Any) -> BaremetalSettingInfo: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("type", None) + if field is not None: + args["type_"] = field + + return BaremetalSettingInfo(**args) + + def unmarshal_InstanceServerInfo(data: Any) -> InstanceServerInfo: if not isinstance(data, dict): raise TypeError( @@ -344,6 +396,24 @@ def unmarshal_Resource(data: Any) -> Resource: else: args["apple_silicon_server_info"] = None + field = data.get("account_project_info", None) + if field is not None: + args["account_project_info"] = unmarshal_AccountProjectInfo(field) + else: + args["account_project_info"] = None + + field = data.get("baremetal_server_info", None) + if field is not None: + args["baremetal_server_info"] = unmarshal_BaremetalServerInfo(field) + else: + args["baremetal_server_info"] = None + + field = data.get("baremetal_setting_info", None) + if field is not None: + args["baremetal_setting_info"] = unmarshal_BaremetalSettingInfo(field) + else: + args["baremetal_setting_info"] = None + return Resource(**args) diff --git a/scaleway/scaleway/audit_trail/v1alpha1/types.py b/scaleway/scaleway/audit_trail/v1alpha1/types.py index d17db9ad2..16fd831c7 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/types.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/types.py @@ -44,8 +44,11 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): KEY_MANAGER_KEY = "key_manager_key" ACCOUNT_USER = "account_user" ACCOUNT_ORGANIZATION = "account_organization" + ACCOUNT_PROJECT = "account_project" INSTANCE_SERVER = "instance_server" APPLE_SILICON_SERVER = "apple_silicon_server" + BAREMETAL_SERVER = "baremetal_server" + BAREMETAL_SETTING = "baremetal_setting" def __str__(self) -> str: return str(self.value) @@ -56,6 +59,11 @@ class AccountOrganizationInfo: pass +@dataclass +class AccountProjectInfo: + description: str + + @dataclass class AccountUserInfo: email: str @@ -70,6 +78,18 @@ class AppleSiliconServerInfo: name: str +@dataclass +class BaremetalServerInfo: + description: str + + tags: List[str] + + +@dataclass +class BaremetalSettingInfo: + type_: str + + @dataclass class InstanceServerInfo: name: str @@ -163,6 +183,12 @@ class Resource: apple_silicon_server_info: Optional[AppleSiliconServerInfo] + account_project_info: Optional[AccountProjectInfo] + + baremetal_server_info: Optional[BaremetalServerInfo] + + baremetal_setting_info: Optional[BaremetalSettingInfo] + @dataclass class ProductService: