using System.Text.Json.Serialization; namespace JMonAgent; public record SystemMetrics( string MachineName, string OSDescription, double CpuUsagePercentage, long MemoryUsedBytes, long MemoryTotalBytes, long SwapUsedBytes, long SwapTotalBytes, long DiskUsedBytes, long DiskTotalBytes, string DiskMountPoint, DateTime Timestamp, string IpAddress, string HwId, int ProcessId ); public record DeltaMetrics( string MachineName, string? OSDescription, double? CpuUsagePercentage, long? MemoryUsedBytes, long? MemoryTotalBytes, long? SwapUsedBytes, long? SwapTotalBytes, long? DiskUsedBytes, long? DiskTotalBytes, string? DiskMountPoint, DateTime Timestamp, string? IpAddress, string? HwId, int ProcessId ); [JsonSourceGenerationOptions(WriteIndented = true)] [JsonSerializable(typeof(SystemMetrics))] [JsonSerializable(typeof(DeltaMetrics))] internal partial class MetricsJsonContext : JsonSerializerContext { }