| | 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 ServiceTagInformationPropertiesFormat |
| | 15 | | { |
| | 16 | | internal static ServiceTagInformationPropertiesFormat DeserializeServiceTagInformationPropertiesFormat(JsonEleme |
| | 17 | | { |
| 0 | 18 | | string changeNumber = default; |
| 0 | 19 | | string region = default; |
| 0 | 20 | | string systemService = default; |
| 0 | 21 | | IReadOnlyList<string> addressPrefixes = default; |
| 0 | 22 | | foreach (var property in element.EnumerateObject()) |
| | 23 | | { |
| 0 | 24 | | if (property.NameEquals("changeNumber")) |
| | 25 | | { |
| 0 | 26 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 27 | | { |
| | 28 | | continue; |
| | 29 | | } |
| 0 | 30 | | changeNumber = property.Value.GetString(); |
| 0 | 31 | | continue; |
| | 32 | | } |
| 0 | 33 | | if (property.NameEquals("region")) |
| | 34 | | { |
| 0 | 35 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 36 | | { |
| | 37 | | continue; |
| | 38 | | } |
| 0 | 39 | | region = property.Value.GetString(); |
| 0 | 40 | | continue; |
| | 41 | | } |
| 0 | 42 | | if (property.NameEquals("systemService")) |
| | 43 | | { |
| 0 | 44 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 45 | | { |
| | 46 | | continue; |
| | 47 | | } |
| 0 | 48 | | systemService = property.Value.GetString(); |
| 0 | 49 | | continue; |
| | 50 | | } |
| 0 | 51 | | if (property.NameEquals("addressPrefixes")) |
| | 52 | | { |
| 0 | 53 | | if (property.Value.ValueKind == JsonValueKind.Null) |
| | 54 | | { |
| | 55 | | continue; |
| | 56 | | } |
| 0 | 57 | | List<string> array = new List<string>(); |
| 0 | 58 | | foreach (var item in property.Value.EnumerateArray()) |
| | 59 | | { |
| 0 | 60 | | if (item.ValueKind == JsonValueKind.Null) |
| | 61 | | { |
| 0 | 62 | | array.Add(null); |
| | 63 | | } |
| | 64 | | else |
| | 65 | | { |
| 0 | 66 | | array.Add(item.GetString()); |
| | 67 | | } |
| | 68 | | } |
| 0 | 69 | | addressPrefixes = array; |
| | 70 | | continue; |
| | 71 | | } |
| | 72 | | } |
| 0 | 73 | | return new ServiceTagInformationPropertiesFormat(changeNumber, region, systemService, addressPrefixes); |
| | 74 | | } |
| | 75 | | } |
| | 76 | | } |