using Newtonsoft.Json; namespace PSProxmoxVE.Core.Models.Cluster; /// /// Represents a node entry from the GET /cluster/config/nodes endpoint. /// public class PveClusterConfigNode { /// /// The node name. /// [JsonProperty("node")] public string? Name { get; set; } /// /// The numeric node ID within the cluster Corosync configuration. /// [JsonProperty("nodeid")] public int? NodeId { get; set; } /// /// The address used for Corosync ring 0 communication. /// [JsonProperty("ring0_addr")] public string? Ring0Addr { get; set; } /// /// The address used for Corosync ring 1 communication. /// [JsonProperty("ring1_addr")] public string? Ring1Addr { get; set; } /// /// The number of quorum votes assigned to this node. /// [JsonProperty("quorum_votes")] public int? QuorumVotes { get; set; } /// public override string ToString() { var nodeIdStr = NodeId.HasValue ? $" (ID {NodeId})" : string.Empty; return $"Node: {Name ?? "N/A"}{nodeIdStr} | Ring0: {Ring0Addr ?? "N/A"}"; } }