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
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .types import ListExportJobsRequestOrderBy
from .types import ListSystemEventsRequestOrderBy
from .types import ResourceType
from .types import ServerlessContainersTriggerInfoSourceType
from .types import SystemEventKind
from .types import AccountContractSignatureInfoAccountContractInfo
from .types import AccountContractSignatureInfo
Expand Down Expand Up @@ -59,6 +60,10 @@
from .types import ObservabilityContactPointInfo
from .types import SecretManagerSecretInfo
from .types import SecretManagerSecretVersionInfo
from .types import ServerlessContainersContainerInfo
from .types import ServerlessContainersDomainInfo
from .types import ServerlessContainersNamespaceInfo
from .types import ServerlessContainersTriggerInfo
from .types import VpcConnectorInfo
from .types import VpcGwGatewayInfo
from .types import VpcGwGatewayNetworkInfo
Expand Down Expand Up @@ -134,6 +139,7 @@
"ListExportJobsRequestOrderBy",
"ListSystemEventsRequestOrderBy",
"ResourceType",
"ServerlessContainersTriggerInfoSourceType",
"SystemEventKind",
"AccountContractSignatureInfoAccountContractInfo",
"AccountContractSignatureInfo",
Expand Down Expand Up @@ -176,6 +182,10 @@
"ObservabilityContactPointInfo",
"SecretManagerSecretInfo",
"SecretManagerSecretVersionInfo",
"ServerlessContainersContainerInfo",
"ServerlessContainersDomainInfo",
"ServerlessContainersNamespaceInfo",
"ServerlessContainersTriggerInfo",
"VpcConnectorInfo",
"VpcGwGatewayInfo",
"VpcGwGatewayNetworkInfo",
Expand Down
112 changes: 112 additions & 0 deletions scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
ObservabilityContactPointInfo,
SecretManagerSecretInfo,
SecretManagerSecretVersionInfo,
ServerlessContainersContainerInfo,
ServerlessContainersDomainInfo,
ServerlessContainersNamespaceInfo,
ServerlessContainersTriggerInfo,
VpcConnectorInfo,
VpcGwGatewayInfo,
VpcGwGatewayNetworkInfo,
Expand Down Expand Up @@ -1204,6 +1208,82 @@ def unmarshal_SecretManagerSecretVersionInfo(
return SecretManagerSecretVersionInfo(**args)


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

args: dict[str, Any] = {}

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

return ServerlessContainersContainerInfo(**args)


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

args: dict[str, Any] = {}

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

return ServerlessContainersDomainInfo(**args)


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

args: dict[str, Any] = {}

return ServerlessContainersNamespaceInfo(**args)


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

args: dict[str, Any] = {}

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

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

return ServerlessContainersTriggerInfo(**args)


def unmarshal_VpcConnectorInfo(data: Any) -> VpcConnectorInfo:
if not isinstance(data, dict):
raise TypeError(
Expand Down Expand Up @@ -1788,6 +1868,38 @@ def unmarshal_Resource(data: Any) -> Resource:
else:
args["audit_trail_custom_alert_rule_info"] = None

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

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

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

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

return Resource(**args)


Expand Down
47 changes: 47 additions & 0 deletions scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,20 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta):
AUTOSCALING_GROUP = "autoscaling_group"
GAPI_DEDICATED_DEPLOYMENT = "gapi_dedicated_deployment"
GAPI_DEDICATED_MODEL = "gapi_dedicated_model"
SERVERLESS_CONTAINERS_NAMESPACE = "serverless_containers_namespace"
SERVERLESS_CONTAINERS_CONTAINER = "serverless_containers_container"
SERVERLESS_CONTAINERS_DOMAIN = "serverless_containers_domain"
SERVERLESS_CONTAINERS_TRIGGER = "serverless_containers_trigger"

def __str__(self) -> str:
return str(self.value)


class ServerlessContainersTriggerInfoSourceType(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_SOURCE_TYPE = "unknown_source_type"
CRON = "cron"
SQS = "sqs"
NATS = "nats"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -496,6 +510,27 @@ class SecretManagerSecretVersionInfo:
revision: int


@dataclass
class ServerlessContainersContainerInfo:
namespace_id: str


@dataclass
class ServerlessContainersDomainInfo:
container_id: str


@dataclass
class ServerlessContainersNamespaceInfo:
pass


@dataclass
class ServerlessContainersTriggerInfo:
container_id: str
source_type: ServerlessContainersTriggerInfoSourceType


@dataclass
class VpcConnectorInfo:
vpc_id: str
Expand Down Expand Up @@ -654,6 +689,18 @@ class Resource:

audit_trail_custom_alert_rule_info: Optional[AuditTrailCustomAlertRuleInfo] = None

serverless_containers_namespace_info: Optional[
ServerlessContainersNamespaceInfo
] = None

serverless_containers_container_info: Optional[
ServerlessContainersContainerInfo
] = None

serverless_containers_domain_info: Optional[ServerlessContainersDomainInfo] = None

serverless_containers_trigger_info: Optional[ServerlessContainersTriggerInfo] = None


@dataclass
class EventPrincipal:
Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/audit_trail/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .types import ListExportJobsRequestOrderBy
from .types import ListSystemEventsRequestOrderBy
from .types import ResourceType
from .types import ServerlessContainersTriggerInfoSourceType
from .types import SystemEventKind
from .types import AccountContractSignatureInfoAccountContractInfo
from .types import AccountContractSignatureInfo
Expand Down Expand Up @@ -59,6 +60,10 @@
from .types import ObservabilityContactPointInfo
from .types import SecretManagerSecretInfo
from .types import SecretManagerSecretVersionInfo
from .types import ServerlessContainersContainerInfo
from .types import ServerlessContainersDomainInfo
from .types import ServerlessContainersNamespaceInfo
from .types import ServerlessContainersTriggerInfo
from .types import VpcConnectorInfo
from .types import VpcGwGatewayInfo
from .types import VpcGwGatewayNetworkInfo
Expand Down Expand Up @@ -134,6 +139,7 @@
"ListExportJobsRequestOrderBy",
"ListSystemEventsRequestOrderBy",
"ResourceType",
"ServerlessContainersTriggerInfoSourceType",
"SystemEventKind",
"AccountContractSignatureInfoAccountContractInfo",
"AccountContractSignatureInfo",
Expand Down Expand Up @@ -176,6 +182,10 @@
"ObservabilityContactPointInfo",
"SecretManagerSecretInfo",
"SecretManagerSecretVersionInfo",
"ServerlessContainersContainerInfo",
"ServerlessContainersDomainInfo",
"ServerlessContainersNamespaceInfo",
"ServerlessContainersTriggerInfo",
"VpcConnectorInfo",
"VpcGwGatewayInfo",
"VpcGwGatewayNetworkInfo",
Expand Down
Loading
Loading