internal static PublicIPPrefixListResult DeserializePublicIPPrefixListResult(JsonElement element) { Optional <IReadOnlyList <PublicIPPrefix> > value = default; Optional <string> nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <PublicIPPrefix> array = new List <PublicIPPrefix>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(PublicIPPrefix.DeserializePublicIPPrefix(item)); } value = array; continue; } if (property.NameEquals("nextLink")) { nextLink = property.Value.GetString(); continue; } } return(new PublicIPPrefixListResult(Optional.ToList(value), nextLink.Value)); }
internal static PublicIPPrefixListResult DeserializePublicIPPrefixListResult(JsonElement element) { IReadOnlyList <PublicIPPrefix> value = default; string nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <PublicIPPrefix> array = new List <PublicIPPrefix>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(PublicIPPrefix.DeserializePublicIPPrefix(item)); } } value = array; continue; } if (property.NameEquals("nextLink")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } nextLink = property.Value.GetString(); continue; } } return(new PublicIPPrefixListResult(value, nextLink)); }