| | 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.Compute.Models |
| | 13 | | { |
| | 14 | | public partial class VirtualMachineScaleSetVMExtensionsSummary |
| | 15 | | { |
| | 16 | | internal static VirtualMachineScaleSetVMExtensionsSummary DeserializeVirtualMachineScaleSetVMExtensionsSummary(J |
| | 17 | | { |
| 60 | 18 | | string name = default; |
| 60 | 19 | | IReadOnlyList<VirtualMachineStatusCodeCount> statusesSummary = default; |
| 360 | 20 | | foreach (var property in element.EnumerateObject()) |
| | 21 | | { |
| 120 | 22 | | if (property.NameEquals("name")) |
| | 23 | | { |
| 60 | 24 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 25 | | { |
| | 26 | | continue; |
| | 27 | | } |
| 60 | 28 | | name = property.Value.GetString(); |
| 60 | 29 | | continue; |
| | 30 | | } |
| 60 | 31 | | if (property.NameEquals("statusesSummary")) |
| | 32 | | { |
| 60 | 33 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 34 | | { |
| | 35 | | continue; |
| | 36 | | } |
| 60 | 37 | | List<VirtualMachineStatusCodeCount> array = new List<VirtualMachineStatusCodeCount>(); |
| 284 | 38 | | foreach (var item in property.Value.EnumerateArray()) |
| | 39 | | { |
| 82 | 40 | | if (item.ValueKind == JsonValueKind.Null) |
| | 41 | | { |
| 0 | 42 | | array.Add(null); |
| | 43 | | } |
| | 44 | | else |
| | 45 | | { |
| 82 | 46 | | array.Add(VirtualMachineStatusCodeCount.DeserializeVirtualMachineStatusCodeCount(item)); |
| | 47 | | } |
| | 48 | | } |
| 60 | 49 | | statusesSummary = array; |
| | 50 | | continue; |
| | 51 | | } |
| | 52 | | } |
| 60 | 53 | | return new VirtualMachineScaleSetVMExtensionsSummary(name, statusesSummary); |
| | 54 | | } |
| | 55 | | } |
| | 56 | | } |