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