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
51 changes: 21 additions & 30 deletions scaleway-async/scaleway_async/instance/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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)

Expand Down
5 changes: 0 additions & 5 deletions scaleway-async/scaleway_async/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
51 changes: 21 additions & 30 deletions scaleway/scaleway/instance/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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)

Expand Down
5 changes: 0 additions & 5 deletions scaleway/scaleway/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down