| | | 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 VpnServerConfigurationsResponse |
| | | 15 | | { |
| | | 16 | | internal static VpnServerConfigurationsResponse DeserializeVpnServerConfigurationsResponse(JsonElement element) |
| | | 17 | | { |
| | 0 | 18 | | IReadOnlyList<string> vpnServerConfigurationResourceIds = default; |
| | 0 | 19 | | foreach (var property in element.EnumerateObject()) |
| | | 20 | | { |
| | 0 | 21 | | if (property.NameEquals("vpnServerConfigurationResourceIds")) |
| | | 22 | | { |
| | 0 | 23 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 24 | | { |
| | | 25 | | continue; |
| | | 26 | | } |
| | 0 | 27 | | List<string> array = new List<string>(); |
| | 0 | 28 | | foreach (var item in property.Value.EnumerateArray()) |
| | | 29 | | { |
| | 0 | 30 | | if (item.ValueKind == JsonValueKind.Null) |
| | | 31 | | { |
| | 0 | 32 | | array.Add(null); |
| | | 33 | | } |
| | | 34 | | else |
| | | 35 | | { |
| | 0 | 36 | | array.Add(item.GetString()); |
| | | 37 | | } |
| | | 38 | | } |
| | 0 | 39 | | vpnServerConfigurationResourceIds = array; |
| | | 40 | | continue; |
| | | 41 | | } |
| | | 42 | | } |
| | 0 | 43 | | return new VpnServerConfigurationsResponse(vpnServerConfigurationResourceIds); |
| | | 44 | | } |
| | | 45 | | } |
| | | 46 | | } |