mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-25 20:06:56 +00:00
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:
@@ -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}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user