feat(models): implement typed response models for PVE 8.x and 9.x

Add C# model classes for all PVE API resources: nodes, VMs, VM config,
containers, storage, network interfaces, SDN zones/vnets, users, roles,
permissions, snapshots, tasks, and cluster status. All models use dual
JSON attributes (System.Text.Json + Newtonsoft.Json), nullable optional
fields, and human-readable ToString() overrides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-17 15:45:06 -05:00
parent 2c7e90d185
commit 4ac38f7714
20 changed files with 2085 additions and 0 deletions
@@ -0,0 +1,21 @@
using Newtonsoft.Json;
namespace PSProxmoxVE.Core.Models.Vms
{
/// <summary>
/// Represents a single log line from a Proxmox VE task log,
/// as returned by the /nodes/{node}/tasks/{upid}/log endpoint.
/// </summary>
public class PveTaskLog
{
/// <summary>Line number (1-based).</summary>
[JsonProperty("n")]
public int LineNumber { get; set; }
/// <summary>Log line text.</summary>
[JsonProperty("t")]
public string Text { get; set; } = string.Empty;
public override string ToString() => $"{LineNumber,4}: {Text}";
}
}