chore(models): Add commentary for Hetzner Volume replicating Hetzner documentation

This commit is contained in:
NaiJi 2023-07-10 05:44:56 -03:00
parent eeb5dfc642
commit 70991e6bac

View file

@ -137,6 +137,12 @@ class HetznerLocation {
_$HetznerLocationFromJson(json); _$HetznerLocationFromJson(json);
} }
/// A Volume is a highly-available, scalable, and SSD-based block storage for Servers.
///
/// Pricing for Volumes depends on the Volume size and Location, not the actual used storage.
///
/// Please see Hetzner Docs for more details about Volumes.
/// https://docs.hetzner.cloud/#volumes
@JsonSerializable() @JsonSerializable()
class HetznerVolume { class HetznerVolume {
HetznerVolume( HetznerVolume(
@ -146,11 +152,20 @@ class HetznerVolume {
this.name, this.name,
this.linuxDevice, this.linuxDevice,
); );
/// ID of the Resource
final int id; final int id;
/// Size in GB of the Volume
final int size; final int size;
/// ID of the Server the Volume is attached to, null if it is not attached at all
final int? serverId; final int? serverId;
/// Name of the Resource. Is unique per Project.
final String name; final String name;
/// Device path on the file system for the Volume
@JsonKey(name: 'linux_device') @JsonKey(name: 'linux_device')
final String? linuxDevice; final String? linuxDevice;