diff --git a/scaleway-async/scaleway_async/function/v1beta1/marshalling.py b/scaleway-async/scaleway_async/function/v1beta1/marshalling.py index 4ddc446a6..5cfe3355e 100644 --- a/scaleway-async/scaleway_async/function/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/function/v1beta1/marshalling.py @@ -209,6 +209,30 @@ def unmarshal_Function(data: Any) -> Function: else None ) + field = data.get("timeout", None) + if field is not None: + args["timeout"] = field + else: + args["timeout"] = None + + field = data.get("error_message", None) + if field is not None: + args["error_message"] = field + else: + args["error_message"] = None + + field = data.get("build_message", None) + if field is not None: + args["build_message"] = field + else: + args["build_message"] = None + + field = data.get("description", None) + if field is not None: + args["description"] = field + else: + args["description"] = None + field = data.get("region", None) if field is not None: args["region"] = field @@ -225,29 +249,23 @@ def unmarshal_Function(data: Any) -> Function: if field is not None: args["sandbox"] = field - field = data.get("timeout", None) + field = data.get("created_at", None) if field is not None: - args["timeout"] = field + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field else: - args["timeout"] = None + args["created_at"] = None - field = data.get("error_message", None) + field = data.get("updated_at", None) if field is not None: - args["error_message"] = field + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field else: - args["error_message"] = None + args["updated_at"] = None - field = data.get("build_message", None) + field = data.get("ready_at", None) if field is not None: - args["build_message"] = field + args["ready_at"] = parser.isoparse(field) if isinstance(field, str) else field else: - args["build_message"] = None - - field = data.get("description", None) - if field is not None: - args["description"] = field - else: - args["description"] = None + args["ready_at"] = None return Function(**args) diff --git a/scaleway-async/scaleway_async/function/v1beta1/types.py b/scaleway-async/scaleway_async/function/v1beta1/types.py index 813102139..6e8f36162 100644 --- a/scaleway-async/scaleway_async/function/v1beta1/types.py +++ b/scaleway-async/scaleway_async/function/v1beta1/types.py @@ -519,6 +519,26 @@ class Function: Secret environment variables of the function. """ + timeout: Optional[str] + """ + Request processing time limit for the function. + """ + + error_message: Optional[str] + """ + Error message if the function is in "error" state. + """ + + build_message: Optional[str] + """ + Description of the current build step. + """ + + description: Optional[str] + """ + Description of the function. + """ + region: Region """ Region in which the function is deployed. @@ -538,24 +558,19 @@ class Function: Execution environment of the function. """ - timeout: Optional[str] + created_at: Optional[datetime] """ - Request processing time limit for the function. + Creation date of the function. """ - error_message: Optional[str] + updated_at: Optional[datetime] """ - Error message if the function is in "error" state. + Last update date of the function. """ - build_message: Optional[str] - """ - Description of the current build step. + ready_at: Optional[datetime] """ - - description: Optional[str] - """ - Description of the function. + Last date when the function was successfully deployed and set to ready. """ diff --git a/scaleway/scaleway/function/v1beta1/marshalling.py b/scaleway/scaleway/function/v1beta1/marshalling.py index 4ddc446a6..5cfe3355e 100644 --- a/scaleway/scaleway/function/v1beta1/marshalling.py +++ b/scaleway/scaleway/function/v1beta1/marshalling.py @@ -209,6 +209,30 @@ def unmarshal_Function(data: Any) -> Function: else None ) + field = data.get("timeout", None) + if field is not None: + args["timeout"] = field + else: + args["timeout"] = None + + field = data.get("error_message", None) + if field is not None: + args["error_message"] = field + else: + args["error_message"] = None + + field = data.get("build_message", None) + if field is not None: + args["build_message"] = field + else: + args["build_message"] = None + + field = data.get("description", None) + if field is not None: + args["description"] = field + else: + args["description"] = None + field = data.get("region", None) if field is not None: args["region"] = field @@ -225,29 +249,23 @@ def unmarshal_Function(data: Any) -> Function: if field is not None: args["sandbox"] = field - field = data.get("timeout", None) + field = data.get("created_at", None) if field is not None: - args["timeout"] = field + args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field else: - args["timeout"] = None + args["created_at"] = None - field = data.get("error_message", None) + field = data.get("updated_at", None) if field is not None: - args["error_message"] = field + args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field else: - args["error_message"] = None + args["updated_at"] = None - field = data.get("build_message", None) + field = data.get("ready_at", None) if field is not None: - args["build_message"] = field + args["ready_at"] = parser.isoparse(field) if isinstance(field, str) else field else: - args["build_message"] = None - - field = data.get("description", None) - if field is not None: - args["description"] = field - else: - args["description"] = None + args["ready_at"] = None return Function(**args) diff --git a/scaleway/scaleway/function/v1beta1/types.py b/scaleway/scaleway/function/v1beta1/types.py index 813102139..6e8f36162 100644 --- a/scaleway/scaleway/function/v1beta1/types.py +++ b/scaleway/scaleway/function/v1beta1/types.py @@ -519,6 +519,26 @@ class Function: Secret environment variables of the function. """ + timeout: Optional[str] + """ + Request processing time limit for the function. + """ + + error_message: Optional[str] + """ + Error message if the function is in "error" state. + """ + + build_message: Optional[str] + """ + Description of the current build step. + """ + + description: Optional[str] + """ + Description of the function. + """ + region: Region """ Region in which the function is deployed. @@ -538,24 +558,19 @@ class Function: Execution environment of the function. """ - timeout: Optional[str] + created_at: Optional[datetime] """ - Request processing time limit for the function. + Creation date of the function. """ - error_message: Optional[str] + updated_at: Optional[datetime] """ - Error message if the function is in "error" state. + Last update date of the function. """ - build_message: Optional[str] - """ - Description of the current build step. + ready_at: Optional[datetime] """ - - description: Optional[str] - """ - Description of the function. + Last date when the function was successfully deployed and set to ready. """