internal static AnomalyAlertingConfigurationList DeserializeAnomalyAlertingConfigurationList(JsonElement element) { Optional <IReadOnlyList <AnomalyAlertConfiguration> > 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 <AnomalyAlertConfiguration> array = new List <AnomalyAlertConfiguration>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(AnomalyAlertConfiguration.DeserializeAnomalyAlertConfiguration(item)); } value = array; continue; } if (property.NameEquals("@nextLink")) { nextLink = property.Value.GetString(); continue; } } return(new AnomalyAlertingConfigurationList(Optional.ToList(value), nextLink.Value)); }
internal static AnomalyAlertingConfigurationList DeserializeAnomalyAlertingConfigurationList(JsonElement element) { IReadOnlyList <AnomalyAlertConfiguration> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { List <AnomalyAlertConfiguration> array = new List <AnomalyAlertConfiguration>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(AnomalyAlertConfiguration.DeserializeAnomalyAlertConfiguration(item)); } value = array; continue; } } return(new AnomalyAlertingConfigurationList(value)); }