From 3cade6da071bac75694084a200a4a97ad688a179 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 30 Oct 2024 15:21:16 +0000 Subject: [PATCH] feat: update generated APIs --- scaleway-async/scaleway_async/container/v1beta1/api.py | 2 ++ .../scaleway_async/container/v1beta1/marshalling.py | 7 +++++++ scaleway-async/scaleway_async/container/v1beta1/types.py | 5 +++++ scaleway/scaleway/container/v1beta1/api.py | 2 ++ scaleway/scaleway/container/v1beta1/marshalling.py | 7 +++++++ scaleway/scaleway/container/v1beta1/types.py | 5 +++++ 6 files changed, 28 insertions(+) diff --git a/scaleway-async/scaleway_async/container/v1beta1/api.py b/scaleway-async/scaleway_async/container/v1beta1/api.py index e7b36fdb0..8b2d1663c 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/api.py +++ b/scaleway-async/scaleway_async/container/v1beta1/api.py @@ -630,6 +630,7 @@ async def create_container( :param local_storage_limit: Local storage limit of the container (in MB). :param scaling_option: Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. + - cpu_usage_threshold: Scale depending on the CPU usage of a container instance. :return: :class:`Container ` Usage: @@ -728,6 +729,7 @@ async def update_container( :param local_storage_limit: Local storage limit of the container (in MB). :param scaling_option: Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. + - cpu_usage_threshold: Scale depending on the CPU usage of a container instance. :return: :class:`Container ` Usage: diff --git a/scaleway-async/scaleway_async/container/v1beta1/marshalling.py b/scaleway-async/scaleway_async/container/v1beta1/marshalling.py index 77998357f..7606d9b08 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/container/v1beta1/marshalling.py @@ -59,6 +59,12 @@ def unmarshal_ContainerScalingOption(data: Any) -> ContainerScalingOption: else: args["concurrent_requests_threshold"] = None + field = data.get("cpu_usage_threshold", None) + if field is not None: + args["cpu_usage_threshold"] = field + else: + args["cpu_usage_threshold"] = None + return ContainerScalingOption(**args) @@ -702,6 +708,7 @@ def marshal_ContainerScalingOption( "concurrent_requests_threshold", request.concurrent_requests_threshold, ), + OneOfPossibility("cpu_usage_threshold", request.cpu_usage_threshold), ] ), ) diff --git a/scaleway-async/scaleway_async/container/v1beta1/types.py b/scaleway-async/scaleway_async/container/v1beta1/types.py index c96afa2b3..43a090c07 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/types.py +++ b/scaleway-async/scaleway_async/container/v1beta1/types.py @@ -195,6 +195,8 @@ def __str__(self) -> str: class ContainerScalingOption: concurrent_requests_threshold: Optional[int] + cpu_usage_threshold: Optional[int] + @dataclass class SecretHashedValue: @@ -447,6 +449,7 @@ class Container: """ Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. """ created_at: Optional[datetime] @@ -790,6 +793,7 @@ class CreateContainerRequest: """ Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. """ @@ -1462,6 +1466,7 @@ class UpdateContainerRequest: """ Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. """ diff --git a/scaleway/scaleway/container/v1beta1/api.py b/scaleway/scaleway/container/v1beta1/api.py index 06a6201cb..648620a42 100644 --- a/scaleway/scaleway/container/v1beta1/api.py +++ b/scaleway/scaleway/container/v1beta1/api.py @@ -626,6 +626,7 @@ def create_container( :param local_storage_limit: Local storage limit of the container (in MB). :param scaling_option: Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. + - cpu_usage_threshold: Scale depending on the CPU usage of a container instance. :return: :class:`Container ` Usage: @@ -724,6 +725,7 @@ def update_container( :param local_storage_limit: Local storage limit of the container (in MB). :param scaling_option: Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. + - cpu_usage_threshold: Scale depending on the CPU usage of a container instance. :return: :class:`Container ` Usage: diff --git a/scaleway/scaleway/container/v1beta1/marshalling.py b/scaleway/scaleway/container/v1beta1/marshalling.py index 77998357f..7606d9b08 100644 --- a/scaleway/scaleway/container/v1beta1/marshalling.py +++ b/scaleway/scaleway/container/v1beta1/marshalling.py @@ -59,6 +59,12 @@ def unmarshal_ContainerScalingOption(data: Any) -> ContainerScalingOption: else: args["concurrent_requests_threshold"] = None + field = data.get("cpu_usage_threshold", None) + if field is not None: + args["cpu_usage_threshold"] = field + else: + args["cpu_usage_threshold"] = None + return ContainerScalingOption(**args) @@ -702,6 +708,7 @@ def marshal_ContainerScalingOption( "concurrent_requests_threshold", request.concurrent_requests_threshold, ), + OneOfPossibility("cpu_usage_threshold", request.cpu_usage_threshold), ] ), ) diff --git a/scaleway/scaleway/container/v1beta1/types.py b/scaleway/scaleway/container/v1beta1/types.py index c96afa2b3..43a090c07 100644 --- a/scaleway/scaleway/container/v1beta1/types.py +++ b/scaleway/scaleway/container/v1beta1/types.py @@ -195,6 +195,8 @@ def __str__(self) -> str: class ContainerScalingOption: concurrent_requests_threshold: Optional[int] + cpu_usage_threshold: Optional[int] + @dataclass class SecretHashedValue: @@ -447,6 +449,7 @@ class Container: """ Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. """ created_at: Optional[datetime] @@ -790,6 +793,7 @@ class CreateContainerRequest: """ Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. """ @@ -1462,6 +1466,7 @@ class UpdateContainerRequest: """ Possible values: - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. """