Skip to content

Commit

Permalink
feat(block): add volume last_detached_at (scaleway#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Nov 16, 2023
1 parent 2a0a08a commit 4ee2f66
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scaleway-async/scaleway_async/block/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def unmarshal_Volume(data: Any) -> Volume:
field = data.get("id", None)
args["id"] = field

field = data.get("last_detached_at", None)
args["last_detached_at"] = parser.isoparse(field) if type(field) is str else field

field = data.get("name", None)
args["name"] = field

Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/block/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ class Volume:
Specifications of the volume.
"""

last_detached_at: Optional[datetime]
"""
Last time the volume was detached.
"""


@dataclass
class VolumeSpecifications:
Expand Down
3 changes: 3 additions & 0 deletions scaleway/scaleway/block/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def unmarshal_Volume(data: Any) -> Volume:
field = data.get("id", None)
args["id"] = field

field = data.get("last_detached_at", None)
args["last_detached_at"] = parser.isoparse(field) if type(field) is str else field

field = data.get("name", None)
args["name"] = field

Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/block/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ class Volume:
Specifications of the volume.
"""

last_detached_at: Optional[datetime]
"""
Last time the volume was detached.
"""


@dataclass
class VolumeSpecifications:
Expand Down

0 comments on commit 4ee2f66

Please sign in to comment.