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