internal static PoolNodeCounts DeserializePoolNodeCounts(JsonElement element) { string poolId = default; NodeCounts dedicated = default; NodeCounts lowPriority = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("poolId")) { poolId = property.Value.GetString(); continue; } if (property.NameEquals("dedicated")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } dedicated = NodeCounts.DeserializeNodeCounts(property.Value); continue; } if (property.NameEquals("lowPriority")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } lowPriority = NodeCounts.DeserializeNodeCounts(property.Value); continue; } } return(new PoolNodeCounts(poolId, dedicated, lowPriority)); }
internal PoolNodeCounts(string poolId, NodeCounts dedicated, NodeCounts lowPriority) { PoolId = poolId; Dedicated = dedicated; LowPriority = lowPriority; }