| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System.Collections.Generic; |
| | 9 | | using System.Text.Json; |
| | 10 | | using Azure.Core; |
| | 11 | |
|
| | 12 | | namespace Azure.ResourceManager.Network.Models |
| | 13 | | { |
| | 14 | | public partial class ListVpnSiteLinkConnectionsResult |
| | 15 | | { |
| | 16 | | internal static ListVpnSiteLinkConnectionsResult DeserializeListVpnSiteLinkConnectionsResult(JsonElement element |
| | 17 | | { |
| 0 | 18 | | IReadOnlyList<VpnSiteLinkConnection> value = default; |
| 0 | 19 | | string nextLink = default; |
| 0 | 20 | | foreach (var property in element.EnumerateObject()) |
| | 21 | | { |
| 0 | 22 | | if (property.NameEquals("value")) |
| | 23 | | { |
| 0 | 24 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 25 | | { |
| | 26 | | continue; |
| | 27 | | } |
| 0 | 28 | | List<VpnSiteLinkConnection> array = new List<VpnSiteLinkConnection>(); |
| 0 | 29 | | foreach (var item in property.Value.EnumerateArray()) |
| | 30 | | { |
| 0 | 31 | | if (item.ValueKind == JsonValueKind.Null) |
| | 32 | | { |
| 0 | 33 | | array.Add(null); |
| | 34 | | } |
| | 35 | | else |
| | 36 | | { |
| 0 | 37 | | array.Add(VpnSiteLinkConnection.DeserializeVpnSiteLinkConnection(item)); |
| | 38 | | } |
| | 39 | | } |
| 0 | 40 | | value = array; |
| 0 | 41 | | continue; |
| | 42 | | } |
| 0 | 43 | | if (property.NameEquals("nextLink")) |
| | 44 | | { |
| 0 | 45 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 46 | | { |
| | 47 | | continue; |
| | 48 | | } |
| 0 | 49 | | nextLink = property.Value.GetString(); |
| | 50 | | continue; |
| | 51 | | } |
| | 52 | | } |
| 0 | 53 | | return new ListVpnSiteLinkConnectionsResult(value, nextLink); |
| | 54 | | } |
| | 55 | | } |
| | 56 | | } |