| | | 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 ApplicationGatewayBackendHealthPool |
| | | 15 | | { |
| | | 16 | | internal static ApplicationGatewayBackendHealthPool DeserializeApplicationGatewayBackendHealthPool(JsonElement e |
| | | 17 | | { |
| | 0 | 18 | | ApplicationGatewayBackendAddressPool backendAddressPool = default; |
| | 0 | 19 | | IReadOnlyList<ApplicationGatewayBackendHealthHttpSettings> backendHttpSettingsCollection = default; |
| | 0 | 20 | | foreach (var property in element.EnumerateObject()) |
| | | 21 | | { |
| | 0 | 22 | | if (property.NameEquals("backendAddressPool")) |
| | | 23 | | { |
| | 0 | 24 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 25 | | { |
| | | 26 | | continue; |
| | | 27 | | } |
| | 0 | 28 | | backendAddressPool = ApplicationGatewayBackendAddressPool.DeserializeApplicationGatewayBackendAddres |
| | 0 | 29 | | continue; |
| | | 30 | | } |
| | 0 | 31 | | if (property.NameEquals("backendHttpSettingsCollection")) |
| | | 32 | | { |
| | 0 | 33 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | | 34 | | { |
| | | 35 | | continue; |
| | | 36 | | } |
| | 0 | 37 | | List<ApplicationGatewayBackendHealthHttpSettings> array = new List<ApplicationGatewayBackendHealthHt |
| | 0 | 38 | | foreach (var item in property.Value.EnumerateArray()) |
| | | 39 | | { |
| | 0 | 40 | | if (item.ValueKind == JsonValueKind.Null) |
| | | 41 | | { |
| | 0 | 42 | | array.Add(null); |
| | | 43 | | } |
| | | 44 | | else |
| | | 45 | | { |
| | 0 | 46 | | array.Add(ApplicationGatewayBackendHealthHttpSettings.DeserializeApplicationGatewayBackendHe |
| | | 47 | | } |
| | | 48 | | } |
| | 0 | 49 | | backendHttpSettingsCollection = array; |
| | | 50 | | continue; |
| | | 51 | | } |
| | | 52 | | } |
| | 0 | 53 | | return new ApplicationGatewayBackendHealthPool(backendAddressPool, backendHttpSettingsCollection); |
| | | 54 | | } |
| | | 55 | | } |
| | | 56 | | } |