mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-11 06:46:53 +00:00
0532327d46
The codebase uses Newtonsoft.Json (JObject.Parse + ToObject<T>) exclusively. Removed all [JsonPropertyName] attributes and [System.Text.Json.Serialization. JsonIgnore] attributes from 41 model files, along with the now-unused using System.Text.Json.Serialization imports. [JsonProperty] (Newtonsoft) attributes remain as the sole serialization annotations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
839 B
C#
35 lines
839 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace PSProxmoxVE.Core.Models.Firewall;
|
|
|
|
/// <summary>
|
|
/// Represents a Proxmox VE firewall IP alias as returned by
|
|
/// the firewall/aliases endpoints.
|
|
/// </summary>
|
|
public class PveFirewallAlias
|
|
{
|
|
/// <summary>
|
|
/// The alias name.
|
|
/// </summary>
|
|
[JsonProperty("name")]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// The CIDR network or IP address (e.g. "10.0.0.0/8" or "192.168.1.1").
|
|
/// </summary>
|
|
[JsonProperty("cidr")]
|
|
public string Cidr { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Optional comment describing the alias.
|
|
/// </summary>
|
|
[JsonProperty("comment")]
|
|
public string? Comment { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public override string ToString()
|
|
{
|
|
return $"Alias: {Name} → {Cidr}";
|
|
}
|
|
}
|