using System.Text.Json.Serialization;
using Newtonsoft.Json;
namespace PSProxmoxVE.Core.Models.Network;
///
/// Represents a Software-Defined Networking (SDN) IPAM plugin as returned by
/// the /cluster/sdn/ipams endpoint. Requires Proxmox VE 8.0+.
///
public class PveSdnIpam
{
///
/// The IPAM plugin identifier.
///
[JsonPropertyName("ipam")]
[JsonProperty("ipam")]
public string Ipam { get; set; } = string.Empty;
///
/// The IPAM type (e.g. "pve", "netbox", "phpipam").
///
[JsonPropertyName("type")]
[JsonProperty("type")]
public string Type { get; set; } = string.Empty;
///
/// The URL of the external IPAM service (for netbox/phpipam types).
///
[JsonPropertyName("url")]
[JsonProperty("url")]
public string? Url { get; set; }
///
/// The API token for the external IPAM service.
///
[JsonPropertyName("token")]
[JsonProperty("token")]
public string? Token { get; set; }
///
/// The configuration section identifier.
///
[JsonPropertyName("section")]
[JsonProperty("section")]
public int? Section { get; set; }
///
public override string ToString()
{
return $"SDN IPAM: {Ipam} | Type: {Type}";
}
}