using Newtonsoft.Json; using System; namespace PSProxmox.Models { /// /// Represents a cluster backup in Proxmox VE. /// public class ProxmoxClusterBackup { /// /// Gets or sets the backup ID. /// [JsonProperty("backup-id")] public string BackupID { get; set; } /// /// Gets or sets the backup time. /// [JsonProperty("time")] public long Time { get; set; } /// /// Gets or sets the backup type. /// [JsonProperty("type")] public string Type { get; set; } /// /// Gets or sets the backup version. /// [JsonProperty("version")] public string Version { get; set; } /// /// Gets or sets the backup size. /// [JsonProperty("size")] public long Size { get; set; } /// /// Gets or sets the backup compression. /// [JsonProperty("compression")] public string Compression { get; set; } /// /// Gets or sets the backup node. /// [JsonProperty("node")] public string Node { get; set; } /// /// Gets or sets the backup file path. /// [JsonProperty("path")] public string Path { get; set; } /// /// Gets the backup date. /// [JsonIgnore] public DateTime Date => DateTimeOffset.FromUnixTimeSeconds(Time).DateTime; /// /// Gets the backup size in megabytes. /// [JsonIgnore] public double SizeMB => Size / 1024.0 / 1024.0; /// /// Gets the backup size in gigabytes. /// [JsonIgnore] public double SizeGB => Size / 1024.0 / 1024.0 / 1024.0; } }