internal static RouteTable DeserializeRouteTable(JsonElement element) { string etag = default; string id = default; string name = default; string type = default; string location = default; IDictionary <string, string> tags = default; IList <Route> routes = default; IList <Subnet> subnets = default; bool? disableBgpRoutePropagation = default; ProvisioningState?provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } etag = property.Value.GetString(); continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } type = property.Value.GetString(); continue; } if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } location = property.Value.GetString(); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, property0.Value.GetString()); } } tags = dictionary; continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("routes")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <Route> array = new List <Route>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(Route.DeserializeRoute(item)); } } routes = array; continue; } if (property0.NameEquals("subnets")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } List <Subnet> array = new List <Subnet>(); foreach (var item in property0.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(Subnet.DeserializeSubnet(item)); } } subnets = array; continue; } if (property0.NameEquals("disableBgpRoutePropagation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } disableBgpRoutePropagation = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new RouteTable(id, name, type, location, tags, etag, routes, subnets, disableBgpRoutePropagation, provisioningState)); }