Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .types import BaremetalServerInfo
from .types import BaremetalSettingInfo
from .types import InstanceServerInfo
from .types import IpamIpInfo
from .types import KeyManagerKeyInfo
from .types import KubernetesACLInfo
from .types import KubernetesClusterInfo
Expand Down Expand Up @@ -38,6 +39,7 @@
"BaremetalServerInfo",
"BaremetalSettingInfo",
"InstanceServerInfo",
"IpamIpInfo",
"KeyManagerKeyInfo",
"KubernetesACLInfo",
"KubernetesClusterInfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
BaremetalServerInfo,
BaremetalSettingInfo,
InstanceServerInfo,
IpamIpInfo,
KeyManagerKeyInfo,
KubernetesACLInfo,
KubernetesClusterInfo,
Expand Down Expand Up @@ -161,6 +162,23 @@ def unmarshal_InstanceServerInfo(data: Any) -> InstanceServerInfo:
return InstanceServerInfo(**args)


def unmarshal_IpamIpInfo(data: Any) -> IpamIpInfo:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}

field = data.get("address", None)
if field is not None:
args["address"] = field
else:
args["address"] = None

return IpamIpInfo(**args)


def unmarshal_KeyManagerKeyInfo(data: Any) -> KeyManagerKeyInfo:
if not isinstance(data, dict):
raise TypeError(
Expand Down Expand Up @@ -466,6 +484,12 @@ def unmarshal_Resource(data: Any) -> Resource:
else:
args["baremetal_setting_info"] = None

field = data.get("ipam_ip_info", None)
if field is not None:
args["ipam_ip_info"] = unmarshal_IpamIpInfo(field)
else:
args["ipam_ip_info"] = None

return Resource(**args)


Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta):
ACCOUNT_ORGANIZATION = "account_organization"
ACCOUNT_PROJECT = "account_project"
INSTANCE_SERVER = "instance_server"
INSTANCE_PLACEMENT_GROUP = "instance_placement_group"
INSTANCE_SECURITY_GROUP = "instance_security_group"
APPLE_SILICON_SERVER = "apple_silicon_server"
BAREMETAL_SERVER = "baremetal_server"
BAREMETAL_SETTING = "baremetal_setting"
IPAM_IP = "ipam_ip"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -92,6 +95,11 @@ class InstanceServerInfo:
name: str


@dataclass
class IpamIpInfo:
address: str


@dataclass
class KeyManagerKeyInfo:
pass
Expand Down Expand Up @@ -182,6 +190,8 @@ class Resource:

baremetal_setting_info: Optional[BaremetalSettingInfo] = None

ipam_ip_info: Optional[IpamIpInfo] = None


@dataclass
class ProductService:
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/audit_trail/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .types import BaremetalServerInfo
from .types import BaremetalSettingInfo
from .types import InstanceServerInfo
from .types import IpamIpInfo
from .types import KeyManagerKeyInfo
from .types import KubernetesACLInfo
from .types import KubernetesClusterInfo
Expand Down Expand Up @@ -38,6 +39,7 @@
"BaremetalServerInfo",
"BaremetalSettingInfo",
"InstanceServerInfo",
"IpamIpInfo",
"KeyManagerKeyInfo",
"KubernetesACLInfo",
"KubernetesClusterInfo",
Expand Down
24 changes: 24 additions & 0 deletions scaleway/scaleway/audit_trail/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
BaremetalServerInfo,
BaremetalSettingInfo,
InstanceServerInfo,
IpamIpInfo,
KeyManagerKeyInfo,
KubernetesACLInfo,
KubernetesClusterInfo,
Expand Down Expand Up @@ -161,6 +162,23 @@ def unmarshal_InstanceServerInfo(data: Any) -> InstanceServerInfo:
return InstanceServerInfo(**args)


def unmarshal_IpamIpInfo(data: Any) -> IpamIpInfo:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary."
)

args: Dict[str, Any] = {}

field = data.get("address", None)
if field is not None:
args["address"] = field
else:
args["address"] = None

return IpamIpInfo(**args)


def unmarshal_KeyManagerKeyInfo(data: Any) -> KeyManagerKeyInfo:
if not isinstance(data, dict):
raise TypeError(
Expand Down Expand Up @@ -466,6 +484,12 @@ def unmarshal_Resource(data: Any) -> Resource:
else:
args["baremetal_setting_info"] = None

field = data.get("ipam_ip_info", None)
if field is not None:
args["ipam_ip_info"] = unmarshal_IpamIpInfo(field)
else:
args["ipam_ip_info"] = None

return Resource(**args)


Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta):
ACCOUNT_ORGANIZATION = "account_organization"
ACCOUNT_PROJECT = "account_project"
INSTANCE_SERVER = "instance_server"
INSTANCE_PLACEMENT_GROUP = "instance_placement_group"
INSTANCE_SECURITY_GROUP = "instance_security_group"
APPLE_SILICON_SERVER = "apple_silicon_server"
BAREMETAL_SERVER = "baremetal_server"
BAREMETAL_SETTING = "baremetal_setting"
IPAM_IP = "ipam_ip"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -92,6 +95,11 @@ class InstanceServerInfo:
name: str


@dataclass
class IpamIpInfo:
address: str


@dataclass
class KeyManagerKeyInfo:
pass
Expand Down Expand Up @@ -182,6 +190,8 @@ class Resource:

baremetal_setting_info: Optional[BaremetalSettingInfo] = None

ipam_ip_info: Optional[IpamIpInfo] = None


@dataclass
class ProductService:
Expand Down
Loading