diff --git a/scaleway-async/scaleway_async/instance/v1/marshalling.py b/scaleway-async/scaleway_async/instance/v1/marshalling.py index 3a1fb782b..305a16d70 100644 --- a/scaleway-async/scaleway_async/instance/v1/marshalling.py +++ b/scaleway-async/scaleway_async/instance/v1/marshalling.py @@ -377,11 +377,23 @@ def unmarshal_Volume(data: Any) -> Volume: else: args["project"] = None - field = data.get("export_uri", None) + field = data.get("tags", None) if field is not None: - args["export_uri"] = field + args["tags"] = field else: - args["export_uri"] = None + args["tags"] = [] + + field = data.get("state", None) + if field is not None: + args["state"] = field + else: + args["state"] = VolumeState.AVAILABLE + + field = data.get("zone", None) + if field is not None: + args["zone"] = field + else: + args["zone"] = None field = data.get("creation_date", None) if field is not None: @@ -399,24 +411,6 @@ def unmarshal_Volume(data: Any) -> Volume: else: args["modification_date"] = None - field = data.get("tags", None) - if field is not None: - args["tags"] = field - else: - args["tags"] = [] - - field = data.get("state", None) - if field is not None: - args["state"] = field - else: - args["state"] = VolumeState.AVAILABLE - - field = data.get("zone", None) - if field is not None: - args["zone"] = field - else: - args["zone"] = None - field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) @@ -4030,15 +4024,6 @@ def marshal_Volume( else: output["project"] = defaults.default_project_id - if request.export_uri is not None: - output["export_uri"] = request.export_uri - - if request.creation_date is not None: - output["creation_date"] = request.creation_date.isoformat() - - if request.modification_date is not None: - output["modification_date"] = request.modification_date.isoformat() - if request.tags is not None: output["tags"] = request.tags @@ -4050,6 +4035,12 @@ def marshal_Volume( else: output["zone"] = defaults.default_zone + if request.creation_date is not None: + output["creation_date"] = request.creation_date.isoformat() + + if request.modification_date is not None: + output["modification_date"] = request.modification_date.isoformat() + if request.server is not None: output["server"] = marshal_ServerSummary(request.server, defaults) diff --git a/scaleway-async/scaleway_async/instance/v1/types.py b/scaleway-async/scaleway_async/instance/v1/types.py index 54dbf9232..08fc2e565 100644 --- a/scaleway-async/scaleway_async/instance/v1/types.py +++ b/scaleway-async/scaleway_async/instance/v1/types.py @@ -382,11 +382,6 @@ class Volume: Zone in which the volume is located. """ - export_uri: Optional[str] = None - """ - Show the volume NBD export URI. - """ - creation_date: Optional[datetime] = None """ Volume creation date. diff --git a/scaleway/scaleway/instance/v1/marshalling.py b/scaleway/scaleway/instance/v1/marshalling.py index 3a1fb782b..305a16d70 100644 --- a/scaleway/scaleway/instance/v1/marshalling.py +++ b/scaleway/scaleway/instance/v1/marshalling.py @@ -377,11 +377,23 @@ def unmarshal_Volume(data: Any) -> Volume: else: args["project"] = None - field = data.get("export_uri", None) + field = data.get("tags", None) if field is not None: - args["export_uri"] = field + args["tags"] = field else: - args["export_uri"] = None + args["tags"] = [] + + field = data.get("state", None) + if field is not None: + args["state"] = field + else: + args["state"] = VolumeState.AVAILABLE + + field = data.get("zone", None) + if field is not None: + args["zone"] = field + else: + args["zone"] = None field = data.get("creation_date", None) if field is not None: @@ -399,24 +411,6 @@ def unmarshal_Volume(data: Any) -> Volume: else: args["modification_date"] = None - field = data.get("tags", None) - if field is not None: - args["tags"] = field - else: - args["tags"] = [] - - field = data.get("state", None) - if field is not None: - args["state"] = field - else: - args["state"] = VolumeState.AVAILABLE - - field = data.get("zone", None) - if field is not None: - args["zone"] = field - else: - args["zone"] = None - field = data.get("server", None) if field is not None: args["server"] = unmarshal_ServerSummary(field) @@ -4030,15 +4024,6 @@ def marshal_Volume( else: output["project"] = defaults.default_project_id - if request.export_uri is not None: - output["export_uri"] = request.export_uri - - if request.creation_date is not None: - output["creation_date"] = request.creation_date.isoformat() - - if request.modification_date is not None: - output["modification_date"] = request.modification_date.isoformat() - if request.tags is not None: output["tags"] = request.tags @@ -4050,6 +4035,12 @@ def marshal_Volume( else: output["zone"] = defaults.default_zone + if request.creation_date is not None: + output["creation_date"] = request.creation_date.isoformat() + + if request.modification_date is not None: + output["modification_date"] = request.modification_date.isoformat() + if request.server is not None: output["server"] = marshal_ServerSummary(request.server, defaults) diff --git a/scaleway/scaleway/instance/v1/types.py b/scaleway/scaleway/instance/v1/types.py index 54dbf9232..08fc2e565 100644 --- a/scaleway/scaleway/instance/v1/types.py +++ b/scaleway/scaleway/instance/v1/types.py @@ -382,11 +382,6 @@ class Volume: Zone in which the volume is located. """ - export_uri: Optional[str] = None - """ - Show the volume NBD export URI. - """ - creation_date: Optional[datetime] = None """ Volume creation date.