using Newtonsoft.Json; namespace PSProxmoxVE.Core.Models.Network; /// /// Represents a Software-Defined Networking (SDN) subnet as returned by /// the /cluster/sdn/vnets/{vnet}/subnets endpoint. /// Available in Proxmox VE 8.0+. /// public class PveSdnSubnet { /// /// The subnet CIDR (e.g. "10.0.0.0/24" or "2001:db8::/64"). /// [JsonProperty("subnet")] public string Subnet { get; set; } = string.Empty; /// /// The VNet this subnet belongs to. /// [JsonProperty("vnet")] public string? Vnet { get; set; } /// /// The gateway IP address for this subnet. /// [JsonProperty("gateway")] public string? Gateway { get; set; } /// /// Whether SNAT (source NAT) is enabled for this subnet. /// [JsonProperty("snat")] public int? Snat { get; set; } /// /// The DNS zone name for this subnet. /// [JsonProperty("dnszoneprefix")] public string? DnsZonePrefix { get; set; } /// /// The DHCP range configurations for automatic IP assignment. /// [JsonProperty("dhcp-range")] public string[]? DhcpRanges { get; set; } /// /// The subnet type identifier used internally by PVE. /// [JsonProperty("type")] public string? Type { get; set; } /// /// Optional comment or description. /// [JsonProperty("comments")] public string? Comments { get; set; } /// public override string ToString() { return $"SDN Subnet: {Subnet} | VNet: {Vnet ?? "N/A"} | " + $"Gateway: {Gateway ?? "N/A"}"; } }