| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | VolumeModel.h |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | This file contains the VolumeModel definitions |
| 12 | |
| 13 | --*/ |
| 14 | |
| 15 | #pragma once |
| 16 | |
| 17 | #include "JsonUtils.h" |
| 18 | #include <string> |
| 19 | |
| 20 | namespace wsl::windows::wslc::models { |
| 21 | |
| 22 | struct CreateVolumeOptions |
| 23 | { |
| 24 | std::string Name; |
| 25 | std::optional<std::string> Driver; |
| 26 | std::vector<std::pair<std::string, std::string>> DriverOpts{}; |
| 27 | std::vector<std::pair<std::string, std::string>> Labels{}; |
| 28 | }; |
| 29 | |
| 30 | struct PruneVolumesResult |
| 31 | { |
| 32 | std::vector<std::string> PrunedVolumes; |
| 33 | ULONGLONG SpaceReclaimed{}; |
| 34 | }; |
| 35 | |
| 36 | // The shape emitted by "volume list --format json"; every value is reported as a string. |
| 37 | struct VolumeOutputInformation |
| 38 | { |
| 39 | std::string Availability; |
| 40 | std::string Driver; |
| 41 | std::string Group; |
| 42 | std::string Labels; |
| 43 | std::string Links; |
| 44 | std::string Mountpoint; |
| 45 | std::string Name; |
| 46 | std::string Scope; |
| 47 | std::string Size; |
| 48 | std::string Status; |
| 49 | |
| 50 | NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(VolumeOutputInformation, Availability, Driver, Group, Labels, Links, Mountpoint, Name, Scope, Size, Status); |
| 51 | }; |
| 52 | |
| 53 | } // namespace wsl::windows::wslc::models |