internal static BgpPeerStatusListResult DeserializeBgpPeerStatusListResult(JsonElement element) { IReadOnlyList <BgpPeerStatus> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <BgpPeerStatus> array = new List <BgpPeerStatus>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(BgpPeerStatus.DeserializeBgpPeerStatus(item)); } } value = array; continue; } } return(new BgpPeerStatusListResult(value)); }
internal static BgpPeerStatusListResult DeserializeBgpPeerStatusListResult(JsonElement element) { Optional <IReadOnlyList <BgpPeerStatus> > value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { List <BgpPeerStatus> array = new List <BgpPeerStatus>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(BgpPeerStatus.DeserializeBgpPeerStatus(item)); } value = array; continue; } } return(new BgpPeerStatusListResult(Optional.ToList(value))); }